[lug] ip aliasing with a 2.4 kernel

Hugh Brown hugh at vecna.com
Wed Feb 20 09:25:04 MST 2002


Nothing like relying on someone else's stuff without taking the time to
do it right.

In the past, I have just added the ifcfg-eth0:n and things just worked
when I did a 'service network start'

I tried it again on a rh machine with 2.4 and it didn't work anymore.  I
had read the comment that things were being changed from 2.2 to 2.4 and
assumed that this was what was happening.

I went playing/prodding again just now and discovered that the redhat
scripts require linuxconf (which I abhor and routinely remove after
installing a new system) in order to the aliasing right if you just use
the rc network script to start it up.

I tried the right incantation of ifconfig and it worked fine.  Now I am
going to see if I can't fiddle with the ifcfg-eth0:n file a little so
that the rc script will work even without linuxconf

Hugh


On Tue, 2002-02-19 at 20:40, Chip Atkinson wrote:
> I've used the old 2.2 commands pretty successfully and I believe it was on
> 2.4.17 as well.  You can also put in aliases in
> /etc/sysconfig/network-scripts/ifcfg-eth0:n where n is the alias number.
> The weird thing about putting it in these scripts though is that you don't
> get an address for the "real" interface.  I didn't spend too much time
> playing with it, but it didn't look like you could.
> 
> Good question about the arp.  I believe that there is an arp cache, but
> you'd think that the destination in the IP header wouldn't match and the
> packet would be ignored.
> 
> 
> Chip
> 
> On 19 Feb 2002, Hugh Brown wrote:
> 
> > I'm trying to figure out how to do ip aliasing under the 2.4 kernel.
> > There is a mini how to that says the 2.2 method has been replaced by a
> > new powerful method in 2.4 but doesn't say what it is.  It looks like
> > the ip command is my friend but I can't find any good documentation for
> > it.
> >
> > I tried something earlier and got some complaints.  I just tried it
> > again and it seems to have worked.
> >
> > I'll send this anyway, because I found it useful and I hope someone else
> > will (and that my epiphany won't be a "well, duh" for everyone else).
> >
> > The command I used was
> >
> > ip addr add 192.168.0.7/24 broadcast 192.168.0.255 dev eth0
> >
> > Anyone know of a slick way to make this part of the startup process
> > (e.g. something in /etc/sysctl.conf or similar)?
> >
> > Okay, I played a bit more and then decided I was done so I deleted the
> > new address assignment.  The problem is that it still responds to ping
> > and if I ssh to the box it takes me to the right place (i.e. the machine
> > that I had previous assigned the address to).  What gives?  Is there an
> > arp cache somewhere that I have to wait for it to timeout?
> >
> > Hugh
> >
> >
> >
> > _______________________________________________
> > Web Page:  http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> >
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
-- 
------------------------------------
System Administrator/Unix Consultant
hugh at vecna.com
Vecna Technologies, Inc
6525 Belcrest Rd, Suite 612
Hyattsville MD, 20782
301.864.7253
http://www.vecna.com
------------------------------------
Linux Professional Institute Certified - Level 1
Sair Linux and GNU Certified Administrator
AIX Certified Specialist - System Support
------------------------------------




More information about the LUG mailing list