can't set defaultrouter via rc.conf

I'm running FreeBSD 7.4 RELEASE with an atheros wireless PCI card.

I'm trying to setup a static IP connection using WPA2 to a home router. (I've configured the router to pass certain services through to this computer.) Everything works fine except I have to manually enter the default gateway after the computer boots up:
# route add default 192.168.1.254

Here are the relevant parts of rc.conf:
Code:
  hostname="myhost.mydomain.org"
  ifconfig_ath0="WPA inet 192.168.1.3 netmask 255.255.255.0"
  wpa_supplicant_flags="-B -iath0 -c/etc/wpa_supplicant.conf"
  defaultrouter="192.168.1.254"

I've also tried with the defaultrouter line above the ifconfig line.

Here's the contents of wpa_supplicant.conf, although that part seems to work right:
Code:
  network={
	ssid="2WIRE923"
	key_mgmt=WPA-PSK
	psk="0123456789"
  }

How can I change my configuration so that the default gateway is set automatically?

Thanks,

Andrew
 
algould said:
I'm running FreeBSD 7.4 RELEASE with an atheros wireless PCI card.

I'm trying to setup a static IP connection using WPA2 to a home router. (I've configured the router to pass certain services through to this computer.) Everything works fine except I have to manually enter the default gateway after the computer boots up:

route add default 192.168.1.254

Here are the relevant parts of rc.conf:
Code:
hostname="myhost.mydomain.org"
ifconfig_ath0="WPA inet 192.168.1.3 netmask 255.255.255.0"
wpa_supplicant_flags="-B -iath0 -c/etc/wpa_supplicant.conf"
defaultroute="192.168.1.254"

That should be defaultrouter with an R. Should not need the wpa_supplicant_flags at all, either.
 
I would also recommend that you use the router's feature to do a DHCP reservation instead of statically hardcoding everything. It's pretty easy to do and will allow you to port forward.
 
Back
Top