Bug 745189 - Need "manual" method of configuring network interfaces
Summary: Need "manual" method of configuring network interfaces
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: busybox
Version: 5.8
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Denys Vlasenko
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 682359 752458
TreeView+ depends on / blocked
 
Reported: 2011-10-11 15:40 UTC by Cong Wang
Modified: 2013-09-30 02:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-14 12:33:18 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Cong Wang 2011-10-11 15:40:02 UTC
Description of problem:

The busybox on RHEL5 doesn't understand "manual" method to configure a network interface, so without it, we can't use ifup to bring the interface up without assigning any IP address.

IOW, ifup from busybox should support the following configuration:

/etc/network/interfaces
auto eth0
iface eth0 inet manual
       up ifconfig $IFACE 0.0.0.0 up
       down ifconfig $IFACE down

Additional info:
Upstream busybox supports this, see:
http://git.busybox.net/busybox/tree/networking/ifupdown.c

Comment 1 Denys Vlasenko 2011-10-12 11:31:52 UTC
I was able to up eth0 interface without assigning an address to it using busybox from RHEL5 and the following configuration in /etc/network/interfaces:

auto eth0
iface eth0 inet static
    address 0.0.0.0
    netmask 0.0.0.0
    bnmask 0

State before "ifup eth0":

# ip a l dev eth0
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:1e:37:d0:50:06 brd ff:ff:ff:ff:ff:ff

State after "ifup eth0":

# ip a l dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1e:37:d0:50:06 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::21e:37ff:fed0:5006/64 scope link tentative 
       valid_lft forever preferred_lft forever

Strace log indicates that the following commands are executed by ifup:

# grep execv LOG2  | grep -v '"/bin/sh"'
4999  execve("./busybox", ["./busybox", "ifup", "eth0"], [/* 51 vars */]) = 0
5000  execve("/usr/bin/run-parts", ["run-parts", "/etc/network/if-pre-up.d"], [/* 11 vars */]) = 0
5002  execve("/sbin/ip", ["ip", "addr", "add", "0.0.0.0/0", "dev", "eth0", "label", "eth0"], [/* 11 vars */]) = 0
5003  execve("/sbin/ip", ["ip", "link", "set", "eth0", "up"], [/* 11 vars */]) = 0
5005  execve("/usr/bin/run-parts", ["run-parts", "/etc/network/if-up.d"], [/* 11 vars */]) = 0

Yes, assigning address 0.0.0.0/0 to eth0 is pointless, but apparently harmless: kernel recognizes it as a special case of "no address".

I also verified that it works with upstream busybox too, and also works if busybox is configured to use "ifconfig" tool (not "ip").

If this work-around acceptable for you?

Comment 2 Cong Wang 2011-10-13 11:13:15 UTC
Hi, Denys,

Your workaround works fine for me, thanks a lot! So we don't need this request for "manual" method now, I will leave to you to evaluate if we need to close this BZ.

Comment 3 Cong Wang 2011-10-14 05:29:50 UTC
BTW, I saw this error today,

+ ifconfig eth0 0.0.0.0 netmask 0.0.0.0
SIOCSIFNETMASK: Cannot assign requested address
+ exit 0

Comment 4 Cong Wang 2011-10-14 07:55:58 UTC
Never mind, it is my mistake...

Comment 5 Denys Vlasenko 2011-10-14 12:33:18 UTC
I guess RHEL5 can live with the current situation. Closing as WONTFIX.


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