Bug 55665 - ifconfig does not reflect changed ipaddress configuration
ifconfig does not reflect changed ipaddress configuration
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: net-tools (Show other bugs)
7.2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-04 07:14 EST by Nilesh Chaudhari
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-05 01:16:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nilesh Chaudhari 2001-11-04 07:14:35 EST
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 11:38:50 EST
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 01:16:28 EST
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 10:36:59 EST
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.