Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 191366 - baselayout-1.12.9-r2 - Alias IP addresses configured but not showing
Summary: baselayout-1.12.9-r2 - Alias IP addresses configured but not showing
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
: 209781 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-05 11:13 UTC by Paolo C
Modified: 2008-02-16 22:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo C 2007-09-05 11:13:27 UTC
My box is configured like that: 

config_eth0=( 
        "192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255" 
        "212.xxx.yyy.88 netmask 255.255.255.224 broadcast 212.xxx.yyy.95" 
 ) 
config_eth1=( "192.168.3.2 netmask 255.255.255.0" )

but if I do an ifconfig I obtain this: 

eth0      Link encap:Ethernet  HWaddr 00:19:B9:F7:FA:0A  
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0 
          inet6 addr: fe80::219:b9ff:fef7:fa0a/64 Scope:Link 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:1370 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:1231 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:155472 (151.8 Kb)  TX bytes:568654 (555.3 Kb) 
          Interrupt:16 

eth1      Link encap:Ethernet  HWaddr 00:19:B9:F7:FA:0B  
          inet addr:192.168.3.2  Bcast:192.168.3.255  Mask:255.255.255.0 
          inet6 addr: fe80::219:b9ff:fef7:fa0b/64 Scope:Link 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:952 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:554 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:514667 (502.6 Kb)  TX bytes:72117 (70.4 Kb) 
          Interrupt:21 

but if I ping from another box I got this: 

PING 212.xxx.yyy.88 (212.xxx.yyy.88): 56 data bytes 
64 bytes from 212.xxx.yyy.88: icmp_seq=0 ttl=64 time=0.346 ms 
64 bytes from 212.xxx.yyy.88: icmp_seq=1 ttl=64 time=0.282 ms

I've got a "ghost" IP address!! ??? 
shouldn't show as eth0:1 ??? 
and if I do ifconfig eth0:1 that's the result:

eth0:1    Link encap:Ethernet  HWaddr 00:19:B9:F7:FA:0A  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          Interrupt:16


ifconfig -V 
net-tools 1.60 
ifconfig 1.42 (2001-04-13) 
uname -r 
2.6.22-gentoo-r5 
equery belongs net.eth0 
[ Searching for file(s) net.eth0 in *... ] 
sys-apps/baselayout-1.12.9-r2 (/etc/init.d/net.eth0 -> net.lo)

Reproducible: Always

Steps to Reproduce:
1. configure multiple IP addresses on a single eth interface
2. restart the interface
3. ifconfig will not show the alias IP addresses
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-05 11:20:13 UTC
Run `ip a s`; ifconfig sucks and won't show any such address set up by ip.

Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-02-12 08:00:23 UTC
*** Bug 209781 has been marked as a duplicate of this bug. ***
Comment 3 Alexey Vlasov 2008-02-12 09:56:16 UTC
# ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    inet 111.222.111.223/32 scope host lo
    inet 111.222.111.224/32 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:04:23:de:56:38 brd ff:ff:ff:ff:ff:ff
    inet 111.222.111.222/24 brd 111.222.111.255 scope global eth0
    inet 10.0.2.3/16 brd 10.0.255.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:04:23:de:56:39 brd ff:ff:ff:ff:ff:ff
4: teql0: <NOARP> mtu 1500 qdisc noop qlen 100
    link/void
5: tunl0: <NOARP> mtu 1480 qdisc noop
    link/ipip 0.0.0.0 brd 0.0.0.0
6: gre0: <NOARP> mtu 1476 qdisc noop
    link/gre 0.0.0.0 brd 0.0.0.0
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2008-02-12 14:52:10 UTC
works just fine for me...

config_eth0=( "192.168.1.26/24" "192.168.1.27/24" )
routes_eth0=( "default gw 192.168.1.1" )

$ ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0F:EA:63:A2:D1  
          inet addr:192.168.1.26  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:eaff:fe63:a2d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:127464791 errors:3 dropped:0 overruns:0 frame:3
          TX packets:64853179 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:165078836132 (157431.4 Mb)  TX bytes:11621831120 (11083.4 Mb)
          Interrupt:23 Base address:0x4000 

eth0:1    Link encap:Ethernet  HWaddr 00:0F:EA:63:A2:D1  
          inet addr:192.168.1.27  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:23 Base address:0x4000 

[binary   R   ] sys-apps/baselayout-1.12.10-r5  USE="-bootstrap -build -static -unicode" 
Comment 5 Alexey Vlasov 2008-02-12 17:58:46 UTC
Can we still hope that display of alias through ifconfig will be fixed?
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2008-02-12 22:02:16 UTC
(In reply to comment #5)
> Can we still hope that display of alias through ifconfig will be fixed?

No; ifconfig and these 'aliases' have been deprecated since 2.2 kernels; please totally forget about this concept which doesn't make any sense whatsover and use iproute2.
Comment 7 SpanKY gentoo-dev 2008-02-13 20:42:28 UTC
Doug: it works because baselayout on your system used ifconfig to set up things

the default is to use iproute2 which does not create aliases in the way ifconfig does
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2008-02-13 21:09:04 UTC
except net-tools is in the system profile and iproute2 is not so most people's systems are setup with ifconfig and not iproute2.
Comment 9 SpanKY gentoo-dev 2008-02-14 05:12:02 UTC
which is irrelevant.  Paolo is complaining that ifconfig does not list all ip addresses as iproute2 adds them and the answer is "ifconfig sucks and is unmaintained, you should use ip".
Comment 10 Alexey Vlasov 2008-02-16 16:12:57 UTC
Just a simple question.
Why does ifconfig, which is de facto an tool for configuring and examination of network interfaces  (for aliases too), work correctly in all distribs and only in special cases (unexplainable) it doesn't work?

> ifconfig and these 'aliases' have been deprecated since 2.2 kernels;
Where is this sentence from?

$ uname -r
2.4.35

$ ifconfig
eth0 Link encap:Ethernet  HWaddr 00:30:48:51:D7:D2
     inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:255.255.255.224
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
     Base address:0xd000 Memory:feba0000-febc0000

eth0:1    Link encap:Ethernet  HWaddr 00:30:48:51:D7:D2
          inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:255.255.255.224
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Base address:0xd000 Memory:feba0000-febc0000
Why does it work?

Why does ifconfig work as usual in just installed Gentoo 2007.0 ? If mentioning "been deprecated since 2.2 kernels" then why are ifconfig and aliases supported everywhere?
Comment 11 SpanKY gentoo-dev 2008-02-16 22:08:05 UTC
your statement is incorrect.  the behavior you see in Gentoo can be seen in other distros.  any system that adds additional ip addresses via iproute will not be visible to ifconfig.

if you dislike the behavior, disable the iproute module in baselayout and instead force ifconfig.