Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Adding static routes to a network' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Adding static routes to a network
Authored by: gjanssen on Mar 14, '08 07:27:12AM
I found neither of the other two static route hints were working for me.
Adding the route to /etc/rc.local failed to ever actually add the route. I was adding my route manually without a problem, so figured the trouble adding this at boot was related to the networking not being sufficiently "up" when the /etc/rc.local is executed.

I created a script to be executed 3 minutes after the rc.local is run. This has worked perfectly for me with my 10.4.11 host.
If you don't want the email after booting, you can skip that if you wish.

% cat /etc/rc.local
at -f /scripts/addroute now + 3 minutes
%

% cat /scripts/addroute
#!/bin/csh -f
route -n add -net 172.16.1.0/24 192.168.1.128 | mail -s "add route after reboot on $HOST" admin@company.com
%


[ Reply to This | # ]