This is a pretty basic question, but I'm no guru. I know that you should
define your gateway in one of the startup scripts, but where?
`route add default gateway`
Thanks,
-Chris
`route add default gateway`
Thanks,
-Chris
man -s4 defaultrouter
/etc/init.d/inetinit is where this file gets read and the
route added. Hmmmm, thought: couldn't the defaultrouter
be configured in /etc/default/inetinit like tcp_strong_iss
is?
hth
t
--
Just reach into these holes. I use a carrot.
> This is a pretty basic question, but I'm no guru. I know that you should
> define your gateway in one of the startup scripts, but where?
# cat /etc/defaultrouter
192.168.1.1
Greg
> `route add default gateway`
> Thanks,
> -Chris
for example,
echo "192.168.1.1" > /etc/defaultrouter
- David
-Chris
> `route add default gateway`
> Thanks,
> -Chris
> This is a pretty basic question, but I'm no guru. I know that you should
> define your gateway in one of the startup scripts, but where?
> `route add default gateway`
> This is a pretty basic question, but I'm no guru. I know that you should
> define your gateway in one of the startup scripts, but where?
> `route add default gateway`
$su - root
#cat > /etc/defaultrouter
<router-IP>
^D
$
Also, look into /etc/rc2.d/S69inet
rgds
/PL
> This is a pretty basic question, but I'm no guru. I know that you should
> define your gateway in one of the startup scripts, but where?
> `route add default gateway`
> Thanks,
> -Chris
Create a file, /etc/defaultrouter, and put in it the hostname you just
created in your /etc/hosts file. You can also put just the IP of the
default router in that file, but I prefer using this method over placing
the IP in the /etc/defaultrouter file as it gives me one place on my
systems to worry about IP's.
This will ensure your system will come up with your selection as a
default route but won't help the current session. This can be corrected
as follows (using the example information):
# route add default 192.168.10.1 1
Dennis Peterson
CTO
One Stop Consulting, Inc.
Seattle, WA
http://thinkUNIX.com
> > This is a pretty basic question, but I'm no guru. I know that you should
> > define your gateway in one of the startup scripts, but where?
> > `route add default gateway`
> Nowhere. The facility is already provided for you.
> Simply list the IP address of the default router in /etc/defaultrouter, then
> reboot the system.
Dennis Peterson
CTO
One Stop Consulting, Inc.
Seattle, WA
http://thinkUNIX.com
> > > This is a pretty basic question, but I'm no guru. I know that you should
> > > define your gateway in one of the startup scripts, but where?
> > > `route add default gateway`
> > Nowhere. The facility is already provided for you.
> > Simply list the IP address of the default router in /etc/defaultrouter, then
> > reboot the system.
> Better is to add the route manually (reboots are rarely a requirement):
> # route add default <IP of router> 1
echo IP_of_router >> /etc/defaultrouter (so the route will be added
automatically the next time you reboot) and do a "route add default
IP_of_router" (to avoid needing to reboot immediately).
--
Tony
> Better is to add the route manually (reboots are rarely a requirement):
> # route add default <IP of router> 1
1. Saves having to explain how to use route to a newbie.
2. Tests that the default route is properly set during a reboot. It's much
easier to reboot a system to test things during the installation phase.
3. Proves that the default route is automatically set during a reboot.
> > > > This is a pretty basic question, but I'm no guru. I know that you should
> > > > define your gateway in one of the startup scripts, but where?
> > > > `route add default gateway`
> > > Nowhere. The facility is already provided for you.
> > > Simply list the IP address of the default router in /etc/defaultrouter, then
> > > reboot the system.
> > Better is to add the route manually (reboots are rarely a requirement):
> > # route add default <IP of router> 1
> And best, possibly, is to do both.
> echo IP_of_router >> /etc/defaultrouter (so the route will be added
> automatically the next time you reboot) and do a "route add default
> IP_of_router" (to avoid needing to reboot immediately).
> --
> Tony
Dennis Peterson
CTO
One Stop Consulting, Inc.
Seattlem, WA
http://thinkUNIX.com
> > > Nowhere. The facility is already provided for you.
> > > Simply list the IP address of the default router in /etc/defaultrouter, then
> > > reboot the system.
> > Better is to add the route manually (reboots are rarely a requirement):
> > # route add default <IP of router> 1
> I have my reasons for rebooting
> 1. Saves having to explain how to use route to a newbie.
> 2. Tests that the default route is properly set during a reboot. It's much
> easier to reboot a system to test things during the installation phase.
> 3. Proves that the default route is automatically set during a reboot.
Dennis Peterson
CTO
One Stop Consulting, Inc.
Seattle, WA
http://thinkUNIX.com
2. Need help about cross compiler
3. Funnily, adding default gateway using route...
4. Web Browsers
5. Adding default gateways using route
6. pf rules, nat & portforwarding
7. Why must I add static route for default gateway?
9. diald routing problem, no default route for ppp0 with correct gateway
10. RH 5.2: Routing table losing default route/gateway
11. Adding Route Add Default to Startup
12. routed adds wrong default route
13. Default gateway's default gateway.