Bug 602368
| Summary: | Downing a single IP aliased eth interface leads to multiple interfaces downed | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Jason Strobush <jason> |
| Component: | net-tools | Assignee: | Jiri Popelka <jpopelka> |
| Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-daemons |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 5.4 | CC: | fge |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-06-10 15:22:54 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Jason Strobush
2010-06-09 17:39:45 UTC
Works for me.
[root@dhcp-29-33]# ifconfig eth1:1 192.168.17.110 netmask 255.255.0.0 up
[root@dhcp-29-33]# ifconfig eth1:3 192.168.17.130 netmask 255.255.0.0 up
[root@dhcp-29-33]# ifconfig eth1:8 192.168.17.180 netmask 255.255.0.0 up
[root@dhcp-29-33]# ifconfig eth1:9 192.168.17.190 netmask 255.255.0.0 up
[root@dhcp-29-33]# ifconfig -a
eth1 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.10.1 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::a00:27ff:feba:dccf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:541 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4239 (4.1 KiB) TX bytes:88294 (86.2 KiB)
Interrupt:9 Base address:0xd060
eth1:1 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.17.110 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xd060
eth1:3 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.17.130 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xd060
eth1:8 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.17.180 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xd060
eth1:9 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.17.190 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xd060
[root@dhcp-29-33]# ip a
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 08:00:27:ba:dc:cf brd ff:ff:ff:ff:ff:ff
inet 192.168.10.1/16 brd 192.168.255.255 scope global eth1
inet 192.168.17.110/16 brd 192.168.255.255 scope global secondary eth1:1
inet 192.168.17.130/16 brd 192.168.255.255 scope global secondary eth1:3
inet 192.168.17.180/16 brd 192.168.255.255 scope global secondary eth1:8
inet 192.168.17.190/16 brd 192.168.255.255 scope global secondary eth1:9
inet6 fe80::a00:27ff:feba:dccf/64 scope link
valid_lft forever preferred_lft forever
[root@dhcp-29-33]# ifconfig eth1:3 down
[root@dhcp-29-33]# ifconfig -a
eth1 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.10.1 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::a00:27ff:feba:dccf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:542 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4239 (4.1 KiB) TX bytes:88421 (86.3 KiB)
Interrupt:9 Base address:0xd060
eth1:1 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.17.110 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xd060
eth1:8 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.17.180 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xd060
eth1:9 Link encap:Ethernet HWaddr 08:00:27:BA:DC:CF
inet addr:192.168.17.190 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xd060
[root@dhcp-29-33]# ip a
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 08:00:27:ba:dc:cf brd ff:ff:ff:ff:ff:ff
inet 192.168.10.1/16 brd 192.168.255.255 scope global eth1
inet 192.168.17.110/16 brd 192.168.255.255 scope global secondary eth1:1
inet 192.168.17.180/16 brd 192.168.255.255 scope global secondary eth1:8
inet 192.168.17.190/16 brd 192.168.255.255 scope global secondary eth1:9
inet6 fe80::a00:27ff:feba:dccf/64 scope link
valid_lft forever preferred_lft forever
The errored behavior only appears when eth0:x is used. Other interfaces tested (eth1 through 3) worked without issue. Interface doesn't matter. I guess I know what's going on here. Please show me what 'ip a' command does when you add all the aliases. Jiri -
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:1c:29:d8 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.1/24 brd 192.168.10.255 scope global eth0
inet 192.168.17.170/24 brd 192.168.17.255 scope global eth0:3
inet 192.168.17.150/24 brd 192.168.17.255 scope global secondary eth0:8
inet 192.168.17.190/24 brd 192.168.17.255 scope global secondary eth0:9
inet6 fe80::20c:29ff:fe1c:29d8/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:1c:29:e2 brd ff:ff:ff:ff:ff:ff
inet 192.168.11.1/24 brd 192.168.11.255 scope global eth1
inet6 fe80::20c:29ff:fe1c:29e2/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:1c:29:ec brd ff:ff:ff:ff:ff:ff
inet 172.31.246.9/16 brd 172.31.255.255 scope global eth2
inet6 2001:a9fe:3100:10:20c:29ff:fe1c:29ec/64 scope global dynamic
valid_lft 2591890sec preferred_lft 604690sec
inet6 2001:a9fe:3100:1:20c:29ff:fe1c:29ec/64 scope global dynamic
valid_lft 2591890sec preferred_lft 604690sec
inet6 fe80::20c:29ff:fe1c:29ec/64 scope link
valid_lft forever preferred_lft forever
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:1c:29:f6 brd ff:ff:ff:ff:ff:ff
inet 192.168.17.166/24 brd 192.168.17.255 scope global eth3
inet6 fe80::20c:29ff:fe1c:29f6/64 scope link
valid_lft forever preferred_lft forever
6: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
Thanks Jason,
let's finish this :-)
When you look at the eth0 section
inet 192.168.10.1/24 brd 192.168.10.255 scope global eth0
inet 192.168.17.170/24 brd 192.168.17.255 scope global eth0:3
inet 192.168.17.150/24 brd 192.168.17.255 scope global secondary eth0:8
inet 192.168.17.190/24 brd 192.168.17.255 scope global secondary eth0:9
you can see that some addresses are marked secondary and some not. If you look (http://linux-ip.net/gl/ip-cref/node33.html) at what secondary means:
"
An IP address becomes secondary if another address with the same prefix bits already exists. The first address is primary. It is the leader of the group of all secondary addresses. When the leader is deleted, all secondaries are purged too.
"
So, what you do is that you add address (alias eth0:3)
with different prefix (192.168.17.0/24)
than the first one has (192.168.10.0/24).
That creates primary address.
When you add other aliases with the same prefix (192.168.17.0/24),
secondary addresses are created.
When you then delete (try it please) one of the secondaries (eth0:8 or eth0:9) only this address gets removed.
But when you delete the primary (eth0:3) all secondaries are purged too.
In my case it was OK, because I used the same prefix in all cases,
so only secondaries were created in my case.
I used /16 netmask so 192.168.10.1/16 and 192.168.17.110/16 have the same prefix (192.168.0.0/16).
I hope this clarifies it.
I encourage you to learn and use ip command
instead of ifconfig (it is obsolete).
With ip command you can do the same (and more)
as with ifconfig, but it's much more
suitable for current linux kernels.
With ip you can add address (alias):
ip addr add 192.168.17.170/24 brd + dev eth0 label eth0:3
And delete address (alias):
ip addr del 192.168.17.170/24 dev eth0
See
http://linux-ip.net/gl/ip-cref/
*** Bug 682147 has been marked as a duplicate of this bug. *** |