# ifconfig not displaying interface aliases

## jah2

I just built a new server and have about 10 IP addresses configured for eth0.  The IPs come up just fine but for some reason ifconfig doesn't display the aliases (eth0:1, eth0:2, etc), it only shows eth0.  They are configured in /etc/conf.d/net in the recommended way, for example:

config_eth0=(

  "1.1.1.1 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.2 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.3 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.4 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.5 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.6 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.7 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.8 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.9 netmask 255.255.255.0 broadcast 1.1.1.255"

  "1.1.1.10 netmask 255.255.255.0 broadcast 1.1.1.255"

)

This is the first time I've seen this and I'm drawing a blank.  I can't think of any setting that would affect the display of interface aliases.  Anybody have an idea of what it could be?

----------

## Hu

Have you installed sys-apps/iproute2?  If so, what is the output of /sbin/ip a; /sbin/ip r?  Interface aliases are not needed in modern kernels, and the tools in sys-apps/iproute2 can assign all the addresses to a single interface, without aliases.

----------

## jah2

 *Hu wrote:*   

> Have you installed sys-apps/iproute2?  If so, what is the output of /sbin/ip a; /sbin/ip r?  Interface aliases are not needed in modern kernels, and the tools in sys-apps/iproute2 can assign all the addresses to a single interface, without aliases.

 

Oh, I didn't know the newer kernels no longer use interface aliases.  "ip a" does show all the ip addresses.  Thanks for jogging my brain, I was stuck on ifconfig and didn't think to use the iproute2 tools.

----------

## Hu

I think if you did not have sys-apps/iproute2 installed, the initscript would have fallen back to using ifconfig with interface aliases.  However, since you did have it and you did not tell the initscripts to use sys-apps/net-tools, they used sys-apps/iproute2.  You can force the use of one or the other via a directive in /etc/conf.d/net if you care, but it sounds like you only need the machine to have the addresses and have no specific need that they be done via interface aliases.

----------

