Adding defaultroute

2002-12-16 Thread Justin Burke
I'm having trouble getting a dual-homed system to setup the default
route correctly on bootup. Here are the relevant lines from my rc.conf:

ifconfig_rl0=inet xx.xx.xx.xxx  netmask 255.255.255.0
ifconfig_xl0=DHCP
defaultrouter=xx.xx.xx.x

During bootup, the system enables the default route to go through the xl0
card, which I don't want; I'd like to enable to default route to go
through the rl0 card.

After the network cards are setup, here is what is printed to the
console:

route: writing to routing socket: File exists
add net default: gateway xx.xx.xx.xx: File exists

Any suggestions?

Justin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Adding defaultroute

2002-12-16 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2002-12-16 13:04:27 -0800:
 * Boryan Yotov ([EMAIL PROTECTED]) wrote:
  Otherwise simply change the following entry from /etc/rc,conf:
  
  defaultrouter=xxx.xxx.xxx.xxx
  to
  defaultrouter=xxx.xxx.xxx.xxx rl0
 
 Yeah, that didn't work Invalid ifconfig syntax.
 
 But I did locate where in the rc.network script that default routes are
 taken care of:
 
 # Set up any static routes.  This should be done before router discovery.
 #
 if [ -n ${static_routes} ]; then
 for i in ${static_routes}; do
 eval route_args=\$route_${i}
 route add ${route_args}
 done
 fi
 
 The problem is that by this time in the script, I already have a default
 route. I've fixed the problem by adding
 
 route change default xx.xx.xx.x
 
 to my rc.local. But isn't this defeating the purpose of the defaultroute
 variable?

Last time I used DHCP was on a Windows95 computer 7 years ago, and
I've only had a quick look at /etc/rc.network, so this is just a
guess...

you already have a default route by the time rc.network reaches that
loop you quoted because interfaces are set up before the routes, and
it *looks* like you get the default route from the dhcp config. look
at dhclient.conf(5) and related pages.

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.see http://www.eyrie.org./~eagle/faqs/questions.html

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message