Bug 65084 - ifconfig, ifdown only works the second time
ifconfig, ifdown only works the second time
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: net-tools (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-17 01:41 EDT by liug
Modified: 2015-03-04 20:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-12 08:04:20 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 liug 2002-05-17 01:41:52 EDT
Description of Problem:
when I try to bring up an interface, it always give me an error the
first time, but if I type the command again, it will work:
[root@beta fliu]# ifconfig eth0 10.10.10.10/24 up
SIOCSIFNETMASK: Cannot assign requested address
[root@beta fliu]# ifconfig eth0 10.10.10.10/24 up

Now, when I need to bring down the interface using "ifdown eth0",
first time, it will give me the following error, but if I type
the same command again, it will work with no error.
[root@beta fliu]# ifdown eth0
ipcalc: ip address expected
Usage: ipcalc [OPTION...]
  -b, --broadcast     Display calculated broadcast address
  -h, --hostname      Show hostname determined via DNS
  -m, --netmask       Display default netmask for IP (class A, B, or C)
  -n, --network       Display network address
  -p, --prefix        Display network prefix
  -s, --silent        Don't ever display error messages 

Help options:
  -?, --help          Show this help message
  --usage             Display brief usage message
ipcalc: ip address expected
Usage: ipcalc [OPTION...]
  -b, --broadcast     Display calculated broadcast address
  -h, --hostname      Show hostname determined via DNS
  -m, --netmask       Display default netmask for IP (class A, B, or C)
  -n, --network       Display network address
  -p, --prefix        Display network prefix
  -s, --silent        Don't ever display error messages 

Help options:
  -?, --help          Show this help message
  --usage             Display brief usage message
ipcalc: ip address expected
Usage: ipcalc [OPTION...]
  -b, --broadcast     Display calculated broadcast address
  -h, --hostname      Show hostname determined via DNS
  -m, --netmask       Display default netmask for IP (class A, B, or C)
  -n, --network       Display network address
  -p, --prefix        Display network prefix
  -s, --silent        Don't ever display error messages 

Help options:
  -?, --help          Show this help message
  --usage             Display brief usage message
ipcalc: ip address expected
Usage: ipcalc [OPTION...]
  -b, --broadcast     Display calculated broadcast address
  -h, --hostname      Show hostname determined via DNS
  -m, --netmask       Display default netmask for IP (class A, B, or C)
  -n, --network       Display network address
  -p, --prefix        Display network prefix
  -s, --silent        Don't ever display error messages 

Help options:
  -?, --help          Show this help message
  --usage             Display brief usage message
[root@beta fliu]# ifdown eth0
[root@beta fliu]# 



Version-Release number of selected component (if applicable):


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:
Comment 1 Phil Knirsch 2002-05-27 04:29:46 EDT
Strange. This might be some module loading problem. Will look into it.

Read ya, Phil
Comment 2 Phil Knirsch 2003-05-23 04:31:06 EDT
Does this still happen in newer releases (e.g. RH 8 or RH 9)? I was never able
to reproduce this bug, so i have a hard time fixing it. :-)

Read ya, Phil
Comment 3 liug 2003-05-23 12:57:50 EDT
just tried again on redhat9:
ifconfig eth0 10.10.10.10/24 up
SIOCSIFNETMASK: Cannot assign requested address
e100: eth0 NIC Link is Up 100 Mbps Full duplex
ifconfig -a
did show the "eth0" is up fine with the correct IP.
Now, if I do "ifconfig eth0 10.10.10.10/24 up", there is NO "SIOCSIFNETMASK:"
error messages.

ifdown eth0
no errors anymore.

I am using IBM thinkpad t21 laptop with built-in Intel eepro100 ethernet card.
Comment 4 Phil Knirsch 2003-06-27 06:24:36 EDT
What does your /etc/modules.conf and /etc/sysconfig/network-scripts/ifcfg-eth0
look like?

And could you attach the output of

/sbin/lspci -v

too?

Thanks,

Read ya, Phil
Comment 5 liug 2003-07-03 17:00:06 EDT
cat /etc/modules.conf
alias eth0 e100
alias sound-slot-0 cs46xx
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1
|| :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :
alias usb-controller usb-uhci

cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
#BOOTPROTO=none
ONBOOT=no
USERCTL=yes

(I have this ifcfg-eth0 just in case I am on a dhcp network, I set ONBOOT=no, 
so that:
1) If I am a dhcp network, I manually do "ifup eth0" to bring up the network.
2) Otherwise, I can manually bring up the eth0 with the specified IP, eg:
    ifconfig eth0 10.10.10.10/24 up
)

/sbin/lspci -v
00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03)
        Flags: bus master, medium devsel, latency 64
        Memory at f8000000 (32-bit, prefetchable) [size=64M]
        Capabilities: [a0] AGP version 1.0

00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)
(prog-if 00 [Normal decode])
        Flags: bus master, 66Mhz, medium devsel, latency 128
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
        Memory behind bridge: f0000000-f7ffffff

00:02.0 CardBus bridge: Texas Instruments PCI1450 (rev 03)
        Subsystem: IBM: Unknown device 0130
        Flags: bus master, medium devsel, latency 168, IRQ 11
        Memory at 50000000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=02, subordinate=04, sec-latency=176
        Memory window 0: 20000000-203ff000 (prefetchable)
        Memory window 1: 20400000-207ff000
        I/O window 0: 00004000-000040ff
        I/O window 1: 00004400-000044ff
        16-bit legacy interface ports at 0001

00:02.1 CardBus bridge: Texas Instruments PCI1450 (rev 03)
        Subsystem: IBM: Unknown device 0130
        Flags: bus master, medium devsel, latency 168, IRQ 11
        Memory at 50100000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=05, subordinate=07, sec-latency=176
        Memory window 0: 20800000-20bff000 (prefetchable)
        Memory window 1: 20c00000-20fff000
        I/O window 0: 00004800-000048ff
        I/O window 1: 00004c00-00004cff
        16-bit legacy interface ports at 0001

00:03.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 09)
        Subsystem: Intel Corp. EtherExpress PRO/100+ MiniPCI
        Flags: bus master, medium devsel, latency 66, IRQ 11
        Memory at e8120000 (32-bit, non-prefetchable) [size=4K]
        I/O ports at 1800 [size=64]
        Memory at e8100000 (32-bit, non-prefetchable) [size=128K]
        Expansion ROM at <unassigned> [disabled] [size=1M]
        Capabilities: [dc] Power Management version 2

00:03.1 Serial controller: Xircom Mini-PCI V.90 56k Modem (prog-if 02 [16550])
        Subsystem: Intel Corp.: Unknown device 2408
        Flags: medium devsel, IRQ 11
        I/O ports at 1840 [size=8]
        Memory at e8121000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [dc] Power Management version 2

00:05.0 Multimedia audio controller: Cirrus Logic CS 4614/22/24 [CrystalClear
SoundFusion Audio Accelerator] (rev 01)
        Subsystem: IBM: Unknown device 0153
        Flags: slow devsel, IRQ 11
        Memory at e8122000 (32-bit, non-prefetchable) [size=4K]
        Memory at e8000000 (32-bit, non-prefetchable) [size=1M]
        Capabilities: [40] Power Management version 2

00:07.0 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
        Flags: bus master, medium devsel, latency 0
 
00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80
[Master])
        Flags: bus master, medium devsel, latency 64
        I/O ports at 1850 [size=16]
 
00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01) (prog-if 00
[UHCI])
        Flags: bus master, medium devsel, latency 64, IRQ 11
        I/O ports at 1860 [size=32]
 
00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 03)
        Flags: medium devsel, IRQ 9
 
01:00.0 VGA compatible controller: S3 Inc. 86C270-294 Savage/IX-MV (rev 13)
(prog-if 00 [VGA])
        Subsystem: IBM ThinkPad T20
        Flags: bus master, 66Mhz, medium devsel, latency 64, IRQ 11
        Memory at f0000000 (32-bit, non-prefetchable) [size=128M]
        Expansion ROM at <unassigned> [disabled] [size=64K]
        Capabilities: [dc] Power Management version 1
        Capabilities: [80] AGP version 1.0
Comment 6 liug 2003-07-03 17:02:35 EDT
BTW, in Comment #3, 


e100: eth0 NIC Link is Up 100 Mbps Full duplex
comes a few seconds later after
SIOCSIFNETMASK: Cannot assign requested address

It seems the "SIOCSIFNETMASK" message triggers the OS to load the module and
thus gives the message:
e100: eth0 NIC Link is Up 100 Mbps Full duplex
Comment 7 Phil Knirsch 2004-01-12 08:04:20 EST
Yes, this looks very much like a kernel message which get printed to
the console.

Did you change you syslog behaviour? Because it looks like it. And
that modules might spit out kernel messages when they are loaded is
pretty normal.

As the bug seems to have gone in RH9 and newer i'm closing this bug
now as current release.

Read ya, Phil

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