Red Hat Bugzilla – Bug 53704
Changing IP address, ifdown/ifup causes old IP and route to show up
Last modified: 2008-05-01 11:38:00 EDT
Description of problem:
When I change an interface address i.e. from 220.127.116.11 to 18.104.22.168,
either via netconfig -d ethN or manually editing /etc/sysconfig/network-
scripts/ifcfg-ethN, ifdown ethN and ifup ethN, and do a route, I still see
the old IP and two routing entries (one for the old IP, one for the new).
Version-Release number of selected component (if applicable): 1.6.0-3
Steps to Reproduce:
1. use netconfig -d eth0 to assign eth0 IP 22.214.171.124, bring interface up.
2. type route, 126.96.36.199 route exists as expected
2. use netconfig -d eth0 to assign eth0 IP 188.8.131.52, bring interface
down (gets error) and up
3. type ifconfig, old IP (184.108.40.206) still shows up; 220.127.116.11 should
4. type route, 18.104.22.168 AND 22.214.171.124 exists (only 126.96.36.199 should
Actual Results: When bringing interface down after IP change in step 2, I
get "RTNETLINK answers: Cannot assign requested address." and it doesn't
appear to remove the 188.8.131.52 route, because running route after bringing
the interface up after the IP change shows both networks:
Destination Gateway Genmask Flags Metric Ref Use Iface
184.108.40.206 * 255.255.255.0 U 0 0 0 eth0
220.127.116.11 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.255.255.0 U 0 0 0 lo
ifconfig shows old IP address for eth0 (18.104.22.168).
Expected Results: ifconfig should show 22.214.171.124 IP after all the above
It should have correctly removed the 126.96.36.199 route on ifdown, and
brought ONLY 188.8.131.52 route up and assigned 184.108.40.206 IP.
It seems that the problem lies in the ifdown; if you change the IP
in /etc/sysconfig/network-scripts/ifcfg-ethN while the interface is still
up, it gives an error when you try to ifdown it. Therefore when you try
to ifup with the new IP, it still has the old IP and route (along with the
new route which is useless).
This should be fixed in initscripts-6.40.1-1.