On Sun, 20 Feb 2000, Duhaut Renaud wrote:
> On my linux Box (kernel 2.2.14), I use ipv6 stack and interface aliasing
> too.
> It seems to be a little problematic with net-tools (v1.52 or v1.53)
> because, when I try to
> shut down one alias, all the adresses of the interface go down !
> For example :
> Without Ipv6 :
> ifconfig eth0 192.168.1.1 up
> ifconfig eth0:0 192.168.1.2 up
> ifconfig eth0 down
> I keep my eth0:0 running.Cool.
Use Alexey's ip utility instead to do aliases. The xxx:# form of aliasing
is a kludge that really hurts the routing structures. Using ip you can
have multiple addresses on an interface and you can have groups of
addresses that all delete out together as well.
IE:
ip addr add 192.168.1.1/32 dev eth0
ip addr add 192.168.1.2/32 dev eth0
Will add two independant addresses to eth0. These addresses can be deleted
independantly.
Now if you want to delete both (or more) at once then you do:
ip addr add 192.168.1.1/24 dev eth0
ip addr add 192.168.1.2/24 dev eth0
And since these addresses are both within the same network (as per the
netmask) whenever you delete the primary address (the first one added in
the netbloack) then all related secondary addresses are deleted.
Extended example:
ip addr add 192.168.1.1/24 dev eth0
ip addr add 192.168.1.2/24 dev eth0
ip addr add 192.168.1.3/32 dev eth0
ip addr add 192.168.1.4/32 dev eth0
Then when you delete 192.168.1.1/24 you will take out the first two
addresses (1.1, 1.2) and leave the second two running.
And ip will work the same with IPv6 as well. I run both multiple aliases
and IPv6 on multihomed connections and play all types of games like this.
Works very well.
> With Ipv6:
> ifconfig eth0 down
> Drop down eth0:0 AND eth0 ! Bad.
>
> I need to use aliasing AND ipv6 stack, because i have virtual hosts on
> my Linux Box and all are also visible through IPv6.
> For instance I use 2 versions of net-tools , one without IPv6
> and one who have it.
> But I want to know if this is "A feature or a bug" ?
> I've looked in ipv6 code of the 2.2 kernel and not seen any reference
> to aliasing stuff.It seems logic because v6 don't need aliasing, but it
> must handle it for v4 compatabilities,
> No ?
> Thanks you.
> --
> Duhaut Renaud .~.
> Network Admin /V\
> 13eme B.C.A // \\
> Guilde-Reseau /( )\
> renaud@xxxxxxxxxx ^`~'^
Enjoy!
--------------------------------------------------
Matthew G. Marsh, President
Paktronix Systems LLC
1506 North 59th Street
Omaha NE 68104
Phone: (402) 932-7250
Email: mgm@xxxxxxxxxxxxx
WWW: http://www.paktronix.com
--------------------------------------------------
|