Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ifconfig not displaying interface aliases
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jah2
n00b
n00b


Joined: 17 Nov 2004
Posts: 53
Location: NC

PostPosted: Sat Apr 23, 2011 4:28 pm    Post subject: ifconfig not displaying interface aliases Reply with quote

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?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23574

PostPosted: Sat Apr 23, 2011 5:36 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
jah2
n00b
n00b


Joined: 17 Nov 2004
Posts: 53
Location: NC

PostPosted: Sat Apr 23, 2011 5:55 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23574

PostPosted: Sat Apr 23, 2011 9:03 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum