RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 970680 - Try to delete an IPv4 alias adds an extra and unexpected static route
Summary: Try to delete an IPv4 alias adds an extra and unexpected static route
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-tools
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jiri Popelka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-04 15:00 UTC by charlie.vuillemez
Modified: 2013-11-05 15:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-05 15:11:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description charlie.vuillemez 2013-06-04 15:00:29 UTC
Description of problem:
When trying to delete an IPv4 alias, unexpected static route is added.
Issue occurs on very particular condition.

Version-Release number of selected component (if applicable):
Reproducible on RHEL5/6 i686/x86_64
with net-tools-1.60-110.el6_2.x86_64

How reproducible:

- First step, check IP routes:

[root@tstrhel6~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.200.100.0    0.0.0.0         255.255.252.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         10.200.100.1    0.0.0.0         UG        0 0          0 eth0

- Second, delete an IP alias:

[root@tstrhel6~]# ip addr del 10.200.100.100 dev eth0:1
Warning: Executing wildcard deletion to stay compatible with old scripts.
         Explicitly specify the prefix length (10.200.100.100/32) to avoid this warning.
         This special behaviour is likely to disappear in furth

- After that, IP alias is deleted but if you think it's not the case (because the warning misled you..) and try another command like this one:

[root@tstrhel6~]# ifconfig eth0:1 10.200.100.100 delete
delete: Unknown host
ifconfig: `--help' gives usage information.

Then a static route is added, in the associated network of the IP you wanted to delete ..  This occurs even so the previously entered command syntax was wrong ! :

[root@tstrhel6~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.200.100.0    0.0.0.0         255.255.252.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
10.0.0.0        0.0.0.0         255.0.0.0       U         0 0          0 eth0
0.0.0.0         10.200.100.1    0.0.0.0         UG        0 0          0 eth0

Issue is easily reproducible, but "works" only if all steps are applied.
Because of this unexpected route, outside network become unreachable.
I'm aware than second step is purely a mistake, but why this result which have no relation with IP alias ?


Expected results:

Alias is deleted, and wrong syntax have no consequences.

Comment 2 Jiri Popelka 2013-06-04 15:10:47 UTC
(In reply to charlie.vuillemez from comment #0)
> - Second, delete an IP alias:
> [root@tstrhel6~]# ip addr del 10.200.100.100 dev eth0:1

If I understand it correctly the problem occurs when using 'ip' command, which is part of iproute package, reassigning.

Comment 3 charlie.vuillemez 2013-06-04 15:17:46 UTC
(In reply to Jiri Popelka from comment #2)
> (In reply to charlie.vuillemez from comment #0)
> > - Second, delete an IP alias:
> > [root@tstrhel6~]# ip addr del 10.200.100.100 dev eth0:1
> 
> If I understand it correctly the problem occurs when using 'ip' command,
> which is part of iproute package, reassigning.

Yes but 3rd step is with ifconfig.

Comment 4 Petr Šabata 2013-06-04 17:05:27 UTC
Could you post the netstat output after using the 'ip' tool too?

Comment 5 charlie.vuillemez 2013-06-04 19:36:47 UTC
In fact it seems to be an issue *or not* with ifconfig cmd.

-first I check netstat & ifconfig outputs:
(test realized on another server)

[root@tstvm6 ~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.222.0   0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         192.168.222.1   0.0.0.0         UG        0 0          0 eth0
[root@tstvm6 ~]# ifconfig 
eth0      Link encap:Ethernet  HWaddr 52:54:00:80:88:2A  
          inet addr:192.168.222.10  Bcast:192.168.222.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe80:882a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4158 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1992 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:348878 (340.7 KiB)  TX bytes:307798 (300.5 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


- Then I try to delete alias (which no longer exist), with wrong way:

[root@tstvm6 ~]# ifconfig eth0:1 10.200.100.100 delete
delete: Unknown host
ifconfig: `--help' gives usage information.
[root@tstvm6 ~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.222.0   0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
10.0.0.0        0.0.0.0         255.0.0.0       U         0 0          0 eth0
0.0.0.0         192.168.222.1   0.0.0.0         UG        0 0          0 eth0

Route is added, exactly in the same way than if I would execute "ifconfig eth0:1 10.200.100.100".
I understand that "delete" word is unknown from ifconfig program, but first address is applied.

So maybe not a bug ? (with an obsolete program ?)
I reassign to net-tools team.

Comment 6 RHEL Program Management 2013-10-13 23:31:08 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 7 Petr Šabata 2013-10-31 06:31:31 UTC
Assigning to the component maintainer.

Comment 8 Jaromír Končický 2013-11-05 15:11:24 UTC
I investigated this a bit and consider it NOTABUG.
The "unsexpected route" (according to you) is added after running the ifconfig command. But I'd say it's rather expected.
'ifconfig interface address' assigns address to the interface. When this address is assigned, its prefix is automatically added into routing tables.
Say, you run 'ifconfig eth0:1 10.10.10.20', then new alias eth0:1 is created with assigned address 10.10.10.20 and 10.0.0.0 is added into routing table. When you remove the alias by 'ifconfig eth0:1 down', then also 10.0.0.0 is removed from routing table.
ifcongig doesn't know any keyword 'delete' and considers it as hostname. Because it is invalid hostname, it takes the address instead.


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