Bug 55665

Summary: ifconfig does not reflect changed ipaddress configuration
Product: [Retired] Red Hat Linux Reporter: Nilesh Chaudhari <nileshch>
Component: net-toolsAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-11-05 06:16:36 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 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.)