[lug] ip aliasing with a 2.4 kernel

Chip Atkinson chip at rmpg.org
Tue Feb 19 18:40:22 MST 2002


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
>




More information about the LUG mailing list