DHCP using ral
rjhjr0 at gmail.com
Mon Jun 29 17:03:41 UTC 2009
I'm trying to set up a connection between an FBSD box and a wireless
access point. The background is that there's no security on this
network; as the person who set it up says, "You just start your
computer and it works!"
I have an XP box with a wireless NIC working, but I don't want to use
the XP box as the gateway for my personal lan to an insecure network.
On the XP box, if I point a browser to 192.168.1.1, I'm told that the
router is "WRT54GX2", which I take to be a popular Linksys router. I
don't have physical access to the router and I don't have the password
for the router.
I've got a wireless Linksys NIC that uses the ral driver facing the
wireless router. The NIC facing my lan uses the em driver and is
working fine. "uname -a" says FreeBSD 7.2-RELEASE #0. In rc.conf I
After booting, if I ping 192.168.1.1, I get "no route to host" and I
have no lease file in /var/db. "ifconfig ral0" tells me that I have no
inet address associated with ral0, status is "no carrier", and the
ssid is an empty string. "dhclient ral0" sends a series of
DHCPDISCOVER messages, but I get no DHCPOFFER messages, and I get an
empty lease file. If I run "ifconfig ral0" again, inet is 0.0.0.0,
status is "associated", and ssid is the proper ssid for the wireless
router. "ifconfig ral0 list scan" gives the proper information for the
At some point I did get a proper lease. I don't know when or how. I've
never had a usable connection to the router from the FBSD box, and
I've never had access to the nameservers listed in the lease. If I
rename the old lease file to dhcp.leases.ral0, and then run "dhclient
ral0", I send 3 DHCPREQUEST messages, 2 DHCPDISCOVER messages, 2
DHCPREQUEST messages, and 6 DHCPDISCOVER messages. dhclient tells me
that no DHCPOFFERs were received, and it binds to the address in lease
file, 192.168.1.104. However, "ifconfig ral0" shows no inet address. I
still can't ping the router.
"ifconfig ral0 inet 192.168.1.104 netmask 255.255.255.0" assigns the
specified values. Ping no longer tells me that there's no route to the
host, but I'm getting about 95% packet loss. "netstat -r" now shows
that link1 (ral0) is the gateway to 192.168.1.0. I still don't have a
resolv.conf says "nameserver 192.168.0.1", which is the nameserver for
my personal lan. I can't nslookup URLs outside of my lan. If I
manually add the nameservers in the dhcp lease, I can nslookup
www.google.com. But ping has 100% packet loss.
/etc/hosts associates 127.0.0.1 with localhost.krig.net, and
192.168.0.6 with stamfordbru.krig.net, which is correct for my lan.
I'm stumped. :)
I don't know if this is related; the XP box is telling me that the
router has no connection to the internet, but it obviously does have a
connection because the XP box can load web pages and I can use my
Thanks for any help.
More information about the freebsd-questions