Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trouble adding ip alias to interface
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
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1418

PostPosted: Thu Mar 24, 2011 1:32 pm    Post subject: Trouble adding ip alias to interface Reply with quote

So this is a weird problem. I've done this before on other boxes without any issues, but today I can't seem to make it work on this particular server. Might be lack of coffee.. not sure.

I'm trying to add an additional IP to my interface. I edit /etc/conf.d/net with the following:

Code:
config_eth0=(
        "xxx.xxx.xxx.38 netmask 255.255.255.0 brd xxx.xxx.xxx.255"
        "xxx.xxx.xxx.39 netmask 255.255.255.0 brd xxx.xxx.xxx.255"
)
routes_eth0=( "default gw xxx.xxx.xxx.1" )


.39 address is the new IP. When I restart /etc/init.d/net.eth0 all net related services are stopped, but when it gets to net.eth0 it hangs. rc-status shows [stopping] and nothing in the logs. I've tried a few different config styles (ie: "xxx.xxx.xxx.39/24", etc) all with the same result.

When I manually add the IP via ifconfig.. it sticks without a problem.

Code:
ifconfig eth0:1 xxx.xxx.xxx.39 broadcast xxx.xxx.xxx.255 netmask 255.255.255.0


Code:
eth0      Link encap:Ethernet  HWaddr 00:1f:d0:d7:93:6a
          inet addr:xxx.xxx.xxx.38  Bcast:xxx.xxx.xxx.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41184185 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28235094 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1129451100 (1.0 GiB)  TX bytes:3336804084 (3.1 GiB)
          Interrupt:40 Base address:0x6000

eth0:1    Link encap:Ethernet  HWaddr 00:1f:d0:d7:93:6a
          inet addr:xxx.xxx.xxx.39  Bcast:xxx.xxx.xxx.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:40 Base address:0x6000


Any ideas why net.eth0 is hangling?

This is the device:
Code:
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)


This is my kernel/system:
Code:
 2.6.36-hardened-r9 #2 SMP Wed Mar 9 14:42:40 CST 2011 i686 Dual-Core AMD Opteron(tm) Processor 1210 AuthenticAMD GNU/Linux


UPDATE: I restored the net config file back to original (single IP) and it won't restart net.eth0 without hanging?

Thanks!
hanji
_________________
Server Admin Blog - Uno-Code.com
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1261
Location: Idaho, USA

PostPosted: Fri Mar 25, 2011 5:56 am    Post subject: Reply with quote

Are you on baselayout-2? The network configuration syntax changed. I can't promise it's the solution to your problem, though:

Code:
# Gigabit interface
config_eth0="10.0.0.11/24
             2001:470:1f05:1698::a"
routes_eth0="default via 10.0.0.1
             2001:470:1f05:1698::1"
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1418

PostPosted: Fri Mar 25, 2011 1:29 pm    Post subject: Reply with quote

wswartzendruber wrote:
Are you on baselayout-2?


Nope, using baselayout-1

Code:
[ebuild   R   ] sys-apps/baselayout-1.12.14-r1  USE="-bootstrap -build -static -unicode" 265 kB


Thanks!
hanji
_________________
Server Admin Blog - Uno-Code.com
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