Bug 3835 - ifconfig messes up removing aliased interfaces
ifconfig messes up removing aliased interfaces
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
6.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
:
: 6032 20752 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-06-30 15:12 EDT by dharris
Modified: 2008-05-01 11:37 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-03 00:30:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description dharris 1999-06-30 15:12:04 EDT
When I configure eth0:0 and eth0:23 and then remove eth0:0,
eth0:23 gets removed without my asking.

Here's the stuff:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:40:05:16:91:49
          inet addr:192.168.10.1  Bcast:192.168.255.255
Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28377 errors:0 dropped:0 overruns:0
frame:0
          TX packets:42746 errors:0 dropped:0 overruns:0
carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11 Base address:0x300

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0
frame:0
          TX packets:13 errors:0 dropped:0 overruns:0
carrier:0
          collisions:0 txqueuelen:0

# ifconfig eth0:0 192.168.10.5 netmask 255.255.255.0
broadcast 192.168.10.255
# ifconfig eth0:23 192.168.10.2 netmask 255.255.255.0
broadcast 192.168.10.255
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:40:05:16:91:49
          inet addr:192.168.10.1  Bcast:192.168.255.255
Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28511 errors:0 dropped:0 overruns:0
frame:0
          TX packets:42926 errors:0 dropped:0 overruns:0
carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11 Base address:0x300

eth0:0    Link encap:Ethernet  HWaddr 00:40:05:16:91:49
          inet addr:192.168.10.5  Bcast:192.168.10.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 Base address:0x300

eth0:23   Link encap:Ethernet  HWaddr 00:40:05:16:91:49
          inet addr:192.168.10.2  Bcast:192.168.10.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 Base address:0x300

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0
frame:0
          TX packets:13 errors:0 dropped:0 overruns:0
carrier:0
          collisions:0 txqueuelen:0

# ifconfig eth0:0 down
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:40:05:16:91:49
          inet addr:192.168.10.1  Bcast:192.168.255.255
Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28527 errors:0 dropped:0 overruns:0
frame:0
          TX packets:42950 errors:0 dropped:0 overruns:0
carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11 Base address:0x300

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0
frame:0
          TX packets:13 errors:0 dropped:0 overruns:0
carrier:0
          collisions:0 txqueuelen:0

#
Comment 1 Bill Nottingham 1999-07-26 12:59:59 EDT
I would think that that's the desired behavior; having an
alias for a non-existent device doesn't seem to make much
sense. (Perhaps it should print a warning that it's removing
the aliases, though...)
Comment 2 dharris 1999-07-26 13:54:59 EDT
I don't understand. Where is the alias for the non-existent device?
Let me quickly summarize the text in my initial report:

enabled interfaces: eth0, lo
turn on eth0:0
turn on eth0:23
enabled interfaces: eth0, eth0:0, eth0:23, lo
turn off eth0:0
enabled interfaces: eth0, lo

Seems to me that eth0:23 should still be running at the end of the
test, as no one turned it off and its base device is still there.
Comment 3 Bill Nottingham 1999-07-26 14:27:59 EDT
Whoops, sorry, misread that as 'remove eth0'.
Comment 4 Bill Nottingham 1999-07-26 15:28:59 EDT
What kernel are you running?
Comment 5 dharris 1999-07-26 15:54:59 EDT
I've seen the problem on your kernel-2.2.5-15 package and on
Mandrake's kernel-2.2.9-19mdk package. (BTW, that Mandrake kernel was
transplanted into a Red Hat 6.0 system, so it was using the exact
same ifconfig package.)

I had thought the problem was something weird with non-consecutive
aliased numbers, but I just did the following test:

configured interfaces: eth0, lo
ifconfig eth0:0 192.168.40.1
ifconfig eth0:1 192.168.40.2
configured interfaces: eth0, eth0:0, eth0:1, lo
ifconfig eth0:0 down
configured interfaces: eth0, lo
Comment 6 ross1 1999-09-06 00:29:59 EDT
Im running into this problem as well as several others.  I've tried
multiple kernels as well as net-tools 1.53 and havent found an
acceptable solutions.  It seems from my testing that if I try to down
the lowest logical interface, it deletes all logical interfaces.  I've
even found with net-tools 1.52-2 update rpm from redhat, and when IPX
protocl is compiling into the kernel, even the eth0 physical interface
is downed too!!!
Comment 7 Miles Lott 1999-09-06 00:34:59 EDT
Stock 1.46-1 rpm and net-tools 1.53 works on rh5.2 kernel 2.0.36.
This was with ipx as a module, but it was loaded.
On RH 6 with kernel 2.2.12, ifconfig eth0:0 down takes all the aliased
interfaces down.  With IPX compiled in, even eth0 goes down.
net-tools 1.49 self-compiled does not remove eth0 in the same
situation.
Comment 8 Jeff Johnson 2000-01-14 10:57:59 EST
*** Bug 6032 has been marked as a duplicate of this bug. ***
Comment 9 Jeff Johnson 2000-01-14 14:00:59 EST
The semantics underlying this problem are almost certainly in the kernel
driver code. Changing the component to kernel ...
Comment 10 Bill Nottingham 2000-11-13 13:14:37 EST
*** Bug 20752 has been marked as a duplicate of this bug. ***
Comment 11 Need Real Name 2000-11-14 16:58:16 EST
It seems to be a bug in the linked list logic for storing the alias names. 
Removing the first alias name in the list incorrects removes (or loses) all 
alias names in the list.

For example, add some aliases in this order:
ifconfig eth0:1 10.1.1.1
ifconfig eth0:2 10.1.1.2
ifconfig eth0:3 10.1.1.3
ifconfig eth0:4 10.1.1.4

Then choose one and mark it as down. If you choose the first alias from the 
above order, that you added, (eth0:1) ifconfig will incorrect lose or remove 
all aliases for eth0. If you choose any of the others, besides the first alias 
that you added, ifconfig works correctly and removes only the one alias.
Comment 12 Ben LaHaise 2002-06-03 17:38:59 EDT
The 2.4 kernel has a different mechanism for supporting aliases.  See the ip
command in newer releases.

Note You need to log in before you can comment on or make changes to this bug.