Bug 22891

Summary: ifconfig not bringing down interface
Product: [Retired] Red Hat Linux Reporter: Viraj Alankar <valankar>
Component: net-toolsAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-12-27 19:41:11 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 Viraj Alankar 2000-12-27 19:41:08 UTC
When trying to bring up my 2nd interface up I noticed a strange problem. 
Let me try to explain exactly what I was doing. My real IPs have been 
changed.

Currently we have eth0 up and connected to a 
network, /etc/sysconfig/network-scripts/ifcfg-eth0 reads:

DEVICE=eth0
BOOTPROTO=static
IPADDR=1.2.3.80
NETMASK=255.255.255.192
ONBOOT=yes

and /etc/sysconfig/network reads:

NETWORKING=yes
HOSTNAME=bb0.mydomain.com
GATEWAY=1.2.3.65

Currently, there is an external machine 1.2.4.3 which I can ping and have 
access to.

Now I created /etc/sysconfig/network-scripts/ifcfg-eth1 to read:

DEVICE=eth1
BOOTPROTO=static
IPADDR=1.2.4.3
NETMASK=255.255.255.0
GATEWAY=1.2.4.1
ONBOOT=no

This interface has no cable connected to it. I then brought up the 
interface with ifup eth1, and it failed on adding the route with network 
unreachable. Now 1.2.4.3 goes to the local machine and is no longer the 
external one.

Next, I did ifdown eth1, verified that ifconfig did not show eth1 as being 
up, then tried to ping 1.2.4.3. It was then still going to the local 
machine (I verified it was local machine from the services running and 
ping times), instead of the external 1.2.4.3 as it did before.

In order to get access back to the external 1.2.4.3 machine, I changed 
eth1's IP to be 1.2.4.4, brought it up, then back down, and everything was 
ok.

This does not seem normal to me, am I doing something wrong when bringing 
the interface down? ifconfig -a did not show it as being UP when I could 
still access 1.2.4.3 as the local machine.

Any help appreciated.

Viraj.

Comment 1 Tim Waugh 2001-02-03 11:41:22 UTC
It is normal.  IPADDR specifies _your_ IP address on that interface.

Comment 2 Viraj Alankar 2001-02-03 15:44:21 UTC
But is it normal to keep the IP even when the interface is down? Is there any 
other way to truly bring down that interface?