Bug 55665 - ifconfig does not reflect changed ipaddress configuration
Summary: ifconfig does not reflect changed ipaddress configuration
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: net-tools
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-04 12:14 UTC by Nilesh Chaudhari
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-11-05 06:16:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Nilesh Chaudhari 2001-11-04 12:14:35 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:
when the ip address of the machine is changed from dhcp to a static ip or 
vice versa, after doing `/etc/rc.d/init.d/network restart', the program 
`ifconfig' does not reflect the new ip address on its output. The earlier 
ip address is displayed. 

Only after a reboot, ifconfig displays the new ip address.

Version-Release number of selected component (if applicable): net-tools-
1.56-2

How reproducible:
Always

Steps to Reproduce:
1. Login as `root' user.
2. Run `setup' on command line and go to the networking option.
3. Change your ipaddress to a different one from the earlier one.
4. Restart the network by `/etc/rc.d/init.d/network restart'.
5. Run `ifconfig'.

	

Actual Results:  It is observed that the new ip address is not reflected 
immediately.

Expected Results:  ifconfig should have shown the new ipaddress 
configuration.

Additional info: -

Comment 1 Kazutoshi Morioka 2001-11-04 16:38:50 UTC
That problem come from /sbin/ifdown.
Since RH7.2, /sbin/ifup and /sbin/ifdown use /sbin/ip to create and delete
IP addresses. You change your address in step 3. and then restart network.
So, /sbin/ifdown attempt to remove NEW address instead of OLD address.
This causes error.
RTNETLINK answers: Cannot assign requested address
The OLD address not removed, and when /sbin/ifup create new address,
That interface have two address, OLD and NEW one.

Workaround is
1. /etc/init.d/network stop ; CHANGE configuration ; /etc/init.d/network start
or
2. /etc/init.d/network stop ; /sbin/ip addr flush eth0 ; /etc/init.d/network start

Anyway, it's a serious bug. Must be fixed soon.

Comment 2 Nilesh Chaudhari 2001-11-05 06:16:28 UTC
The workaround works perfectly. It seems the problems arises only when the ip 
address is changed from dhcp to static or from static to static. 

The other way (i.e. static to dhcp) runs fine without any errors.

Comment 3 Bill Nottingham 2001-11-05 15:36:59 UTC
This is fixed in a later initscritps package (6.40.2-1, for example.)


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