View previous topic :: View next topic |
Author |
Message |
zambaroo n00b
Joined: 13 May 2004 Posts: 13
|
Posted: Fri Jun 11, 2004 6:47 pm Post subject: Routing and booting |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Fri Jun 11, 2004 7:14 pm Post subject: |
|
|
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 |
|
|
zambaroo n00b
Joined: 13 May 2004 Posts: 13
|
Posted: Fri Jun 11, 2004 9:04 pm Post subject: now im freaking out |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54805 Location: 56N 3W
|
Posted: Fri Jun 11, 2004 9:52 pm Post subject: |
|
|
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 |
|
|
zambaroo n00b
Joined: 13 May 2004 Posts: 13
|
Posted: Fri Jun 11, 2004 10:12 pm Post subject: that makes perfect sense |
|
|
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 |
|
|
|