Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 2009 02:23:16 +0200
From:      Vilem Kebrt <vilem.kebrt@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: DHCP using ral
Message-ID:  <4A495AF4.1010406@gmail.com>
In-Reply-To: <4A491B69.5000902@otenet.gr>
References:  <3d5d3ca90906290930n78325bd5wdf2b5a9dc144f430@mail.gmail.com> <4A491B69.5000902@otenet.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
Manolis Kiagias napsal(a):
> Robert Hall wrote:
>   
>> 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
>> have
>>         ifconfig_ral0="DHCP"
>> 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
>> router.
>>
>> 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
>> usable connection.
>>
>> 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
>> gmail account.
>>
>> Thanks for any help.
>>   
>>     
> I happen to have a Linksys router (not the same model though) and a
> Linksys pci card that uses the ral driver. Never had any problems,
> though I am not using DHCP.
> Here are a few manual steps to try:
>
> First off, try setting the ssid on the command line:
>
> ifconfig ral ssid Myssid
>
>   
Some wireless interfaces need to be gone UP by hand so set ssid by 
previous command and then execute
ifconfig ral0 up
william
> Execute ifconfig by itself, and see if you get an "associated" message.
> (you may have to wait a minute before you do) If you don't, chances are
> the following will do nothing
>
> dhclient ral0
>
> if this does not succeed, set an IP address manually:
>
> ifconfig ral0 inet 192.168.1.50 netmask 255.255.255.0
>
> Before attempting to test the internet connection, add the router as
> nameserver in /etc/resolv.conf and don't forget to add the router's
> address as the default gateway:
>
> route add default 192.168.1.X
>
> >From my experience, the important part is to get the "associated"
> message after the initial ifconfig. Not much hope otherwise.
>
> As an afterthought, is the XP machine on while you are trying to
> connect? If they are too close they maybe interfering.
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>   




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A495AF4.1010406>