On Monday, 17 February 2003, at 17:37:58 +0100,
Benoit Lathiere wrote:

> I'm using the 'ifconfig' command to manage dynamically my intefaces.
> I up and down eth0... but Debian  add some eth0:0:2 !!!
> If I down all my interfaces and reload /etc/network/intefaces (which is 
> correct), eth0:x:y are added again !!!
> How to radically "remove" these bad interfaces and restart on a clean 
> config.. ??
> 
The following is not what you asked for, but maybe if you use a better
thought tool, like "ip", for managing your network interfaces and
assigned addresses maybe your problems will go away.

With "ip address" you assign addresses to interfaces, with no need of
artifacts like "virtual interfaces" like eth0:0, eth0:1 and so on.
# Add another IP address to the first ethernet device
ip address add 1.2.3.4/8 broad + dev eth0
# ...and another one
ip address add 100.22.33.44/16 broad + dev eth0
# And now for some results...
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:05:1c:09:f2:14 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.12/24 brd 192.168.1.255 scope global eth0
    inet 100.22.33.44/16 brd 100.22.255.255 scope global eth0
    inet 1.2.3.4/8 brd 1.255.255.255 scope global eth0

As you see, no artifacts here, just IP addresses assigned to interfaces.
To remove a certain IP address, just subsitute "del" for "add".

Hope it helps.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.4.20-xfsip)

Reply via email to