Description of problem: It find conflict when use net tools ifconfig and ip command. Version-Release number of selected component (if applicable): net-tools 1.60 ifconfig 1.42 (2001-04-13) & ip utility, iproute2-ss010824 How reproducible: Config the interface ip address when one interface(eth0) need multi address. Steps to Reproduce: 1. ifconfig eth0 1.1.2.2 netmask 255.255.255.0 2. ip addr add dev eth0 1.1.2.8/32 3. ifconfig eth0 1.1.2.3 netmask 255.255.255.0 Actual results: # ip addr ls dev eth0 12: eth0: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 100 link/ether 00:c0:4c:39:08:51 brd ff:ff:ff:ff:ff:ff inet 1.1.2.3/8 brd 1.255.255.255 scope global eth1 inet 1.1.2.8/24 scope global eth1 Expected results: # ip addr ls dev eth0 12: eth0: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 100 link/ether 00:c0:4c:39:08:51 brd ff:ff:ff:ff:ff:ff inet 1.1.2.3/24 brd 1.255.255.255 scope global eth1 inet 1.1.2.8/32 scope global eth1 Additional info: kernel version: 2.4.24
Erh, your actual and expected results are identical. And secondly, you are using an unsupported kernel. Please reproduce the problem with the latest errata kernel available via RHN. Thanks, Read ya, Phil
my actual and expected results are not identical. my expected results is : inet 1.1.2.3/24 brd 1.255.255.255 scope global eth1 inet 1.1.2.8/32 scope global eth1 but is not : inet 1.1.2.3/8 brd 1.255.255.255 scope global eth1 inet 1.1.2.8/24 scope global eth1 What I expected are the masks is 24 for 1.1.2.3 and 32 for 1.1.2.8; but what actually results are the masks is 8 for 1.1.2.3 and 24 for 1.1.2.8.
sorry, Maybe there exist other problem : when add a address to a interface, e.g: #ifconfig eth0 1.1.2.3 netmask 255.255.255.0 then show the address : #ip addr ls dev eth0 the result may like : inet 1.1.2.3/24 brd 1.255.255.255 scope global eth0 but i think that it should is: inet 1.1.2.3/24 brd 1.1.2.255 scope global eth0 also, the mask has problem ? Can someone explain to me ? Thanks a lot. Dag.Lee
sorry, In Additional Comment #3, I take the boardcast for netmask. Dag.Lee
Broadcast adress is computed according to IP class and not according to netmask. This bug is already fixed in ifconfig which now computes broadcast adress from netmask. Workaround is simple, just specify broadcast adress and netmask when setting up ip. For the first described problem here, I've tested it here and I don't see the problem. Seems to work fine, tested with net-tools-1.60-40 and iproute-2.6.9-4 (041019).
to Radek Vokál : Thank u for your reply. I tested with net-tools-1.60-40 and iproute-2.6.9-4 yesterday, but the problem still exists. This problem only occurs when config device multi address used command ifconfig & ip alternate . first . config device using command ifconfig : ifconfig eth0 11.1.1.1 netmask 255.255.255.0 broadcast 11.1.1.255 now see the eth0 config using command ip : ip addr ls dev eth0 the result is : inet 192.168.100.169/24 it's right . second , add a ip (netmask is 32) to device using command ip: ip addr add dev eth0 11.1.1.2/32 now see the eth0 config using command ip : ip addr ls dev eth0 the result is : inet 11.1.1.1/24 inet 11.1.1.2/32 it's correct too. third, config device using command ifconfig again: ifconfig eth0 11.1.1.3 netmask 255.255.255.0 broadcast 11.1.1.255 now see the eth0 config using command ip : ip addr ls dev eth0 the result is: inet 11.1.1.2/24 inet 11.1.1.3/8 It's error, the result isn't the result that I expect. I expect results are : inet 11.1.1.2/32 inet 11.1.1.3/24 BTW: I tested under RHAS3.0, but update iproute2 & net-tools packets.
This bug is filed against RHEL2.1, which is in maintenance phase. During the maintenance phase, only security errata and select mission critical bug fixes will be released for enterprise products. Since this bug does not meet that criteria, it is now being closed. For more information of the RHEL errata support policy, please visit: http://www.redhat.com/security/updates/errata/ If you feel this bug is indeed mission critical, please contact your support representative. You may be asked to provide detailed information on how this bug is affecting you.