Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Routing and booting
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
zambaroo
n00b
n00b


Joined: 13 May 2004
Posts: 13

PostPosted: Fri Jun 11, 2004 6:47 pm    Post subject: Routing and booting Reply with quote

Hi all,

I have a question about routing.
My servers are on a 192.168.2 subnet. I need them to access 192.168.0 subnet and the Internet.
This is how I make it happen:


Code:

route add -net 192.168.0.0/24 eth0
route add 192.168.0.0 gw 192.168.0.1


This lets me access the 192.168.0 subnet.
If I want Internet access, I have to add another route:

Code:

route add default gw 192.168.0.1 eth0


The problem is that I need these settings to survive a reboot and I have no idea where gentoo keeps its routing information. Suse for example, keeps it in /etc/sysconfig/network/routes or something like that.

Any ideas how to get routing setup after reboot short of writing a script that would do it?

Many Thanks

--zamba
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54805
Location: 56N 3W

PostPosted: Fri Jun 11, 2004 7:14 pm    Post subject: Reply with quote

zambaroo,

Put the static route commands in /etc/conf.d/local.start

Any commands you want run at startup go here. There is a corresponding local.stop for things you want to run sta shutdown.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
zambaroo
n00b
n00b


Joined: 13 May 2004
Posts: 13

PostPosted: Fri Jun 11, 2004 9:04 pm    Post subject: now im freaking out Reply with quote

ok, i set the routes.. rebooted.. they are still there. wtf. not that i am not happy, but id like to understand how this works.

btw, thanks for the tip.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54805
Location: 56N 3W

PostPosted: Fri Jun 11, 2004 9:52 pm    Post subject: Reply with quote

zambaroo,

Gentoo puts its startup scripts in /etc/init.d and the configuration files that supply data to the scripts in /etc/conf.d.

As part of the startup routine the commands in /etc/conf.d/local.start are executed
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
zambaroo
n00b
n00b


Joined: 13 May 2004
Posts: 13

PostPosted: Fri Jun 11, 2004 10:12 pm    Post subject: that makes perfect sense Reply with quote

however, i did not follow your advice, and my startup files are untouched. the routing table survives the reboot.

how?

where is the info kept?

i just automatically assumed the routing will not persist after a reboot. but it does.

regards,
--zamba
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