Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with /etc/conf.d/net syntax...
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
lmegliol
n00b
n00b


Joined: 12 Sep 2005
Posts: 68

PostPosted: Thu Dec 27, 2007 5:30 pm    Post subject: Help with /etc/conf.d/net syntax... Reply with quote

I am working on setting up Linux Virtual Server with a single director and two real servers. I have gotten it working by piecing together instructions from a few different sources. Part of the instructions is to run the following commands on the real servers:

Code:

# ifconfig lo:1 192.168.2.9 broadcast 192.168.2.9 netmask 0xffffffff up
# route add -host 192.168.2.9 dev lo:1


Running these commands on the command line works great, but when I reboot, the configuration is obviously not saved. So I need a way to issue these commands from /etc/conf.d/net. But I cannot figure out the correct syntax in the file.


Any documentation I have found does not seem to cover such advanced configurations. I have tried several variations on the following:

Code:

alias_lo=("lo:1 192.168.2.9 netmask 255.255.255.255 broadcast 192.168.2.9")
routes_lo=("192.168.2.9 dev lo:1")


or

Code:

alias_lo=("lo:1 192.168.2.9 netmask 255.255.255.255 broadcast 192.168.2.9")
routes_lo=("-host 192.168.2.9 dev lo:1")


or

Code:

alias_lo=("lo:1 192.168.2.9 netmask 255.255.255.255 broadcast 192.168.2.9")
routes_lo=("192.168.2.9 via lo:1")


or

Code:

alias_lo=("lo:1 192.168.2.9 netmask 255.255.255.255 broadcast 192.168.2.9")
routes_lo=("192.168.2.9 via 192.168.2.9")


I just starting guessing by the end. In any case, I only varied the second command because I couldn't think of any other way to run the first command. Neither of the commands seemed to work, because on restarting the system or the network, neither of the configurations were set properly.

I suppose I could run the original commands in a startup script, but for the sake of clarity and keeping my configuration commands together, I'd like to keep it all in /etc/conf.d/net.

So, does anyone know the syntax of this file well enough to give me a hand with this configuration?

Thanks in advance.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Fri Dec 28, 2007 12:13 pm    Post subject: Reply with quote

Code:
config_lo=("192.168.2.9/32")
routes_lo=("-host 192.168.2.9")


Should work.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
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