Re: dhcp client wifi setup
On Sunday, 25 December 2005 at 1:12:53 +0100, Florian Kulzer wrote:
> Hi Richard,
>
> Richard Lyons wrote:
> >But ifup eth0 gives
> >
> > etho: New link status: Connected (0001)
> > Listening on LPF/eth0/00:02:2d:a6:07:bb
> > Sending on LPF/eth0/00:02:2d:a6:07:bb
> > DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
> > ...more similar...
> > No DHCPOFFERS received.
> > No working leases in persistent database.
> >
> > Exiting.
> >
> > Failed to bring up eth0.
>
> Maybe you can first try to find out if you have a problem with the
> interface itself or with the dhcp-client. To configure the interface
> directly you can use the iwconfig command (as root)
I did say that it connects perfectly when the router is not requiring
WEP security. So the hardware is functioning normally.
>
> iwconfig eth0 essid xxxxxxxx
> iwconfig eth0 key xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx
Yes, this is how I test it. If I follow uo with 'ifup eth0', as quoted
above, I get no DHCP offer. If I turn off the WEP at the router and
comment out the corresponding lines in /etc/network/interfaces (the
lines with wireless-essid and wireless-key), then it immediately
connects and functions normally.
>
> After you have done this the output of "iwconfig eth0" will tell you if
> the interface works and if it has associated with the correct access
> point. The output of "iwlist eth0 scan" might also be helpful, as it
> shows all detected access points and signal levels.
>
before giving the two iwconfig commands you list above, iwconfig eth0 gives
eth0 IEEE 802.11b ESSID:"" Nickname "HERMES I"
Mode:Managed Frequency:2.422 GHz Access Point: Not-Associated
Bit Rate:11 Mb/s Sensitivity:1/3
Retry limit:4 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/92 Signal level=134/153 Noise level=134/153
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
and after them:
eth0 IEEE 802.11b ESSID:"Coixxxxxxxxx" Nickname "HERMES I"
Mode:Managed Frequency:2.422 GHz Access Point: Not-Associated
Bit Rate:11 Mb/s Sensitivity:1/3
Retry limit:4 RTS thr:off Fragment thr:off
Encryption key:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx Security mode:open
Power Management:off
Link Quality=0/92 Signal level=134/153 Noise level=134/153
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
castagna:~# iwlist eth0 scan
eth0 Interface doesn't support scanning : Network is down
I tried adding
castagna:~# iwconfig eth0 mode Ad-Hoc
castagna:~# ifup eth0
...gives the same unsuccessful connection attempt as in my previous post
quoted above, but now
castagna:~# iwlist eth0 scan
eth0 Scan completed :
Cell 01 - Address 00:0F:BF:51:D7:FC
ESSID:"Coixxxxxxx"
Mode:Master
Frequency:2.427 GHz (Channel 4)
Signal level:-68 dBm Noise level:-93dBm
Encryption key:on
Cell 02 - Address...........
...etc. for three cells in all
But I still cannot connect. I noticed the mode sent by the router is "Master",
so I tried changing mode back to Managed: same result.
> If the interface fails to associate even though the signal level is
> sufficient you might be missing the relevant modules to handle the
> cryptography which is necessary for WEP. Unfortunately I do not know
> anything about the specifics of the orinoco driver, but I know that for
> example the Intel wireless drivers need an extra module for the
> ieee80211 crypto. Newer kernels have the option CONFIG_IEEE80211 for
> this. Maybe the documentation of your driver can help you further.
Kernel is 2.6.14-2-686 -- surely new enough?
>
> On the other hand, if the interface does associate with the AP you know
> that the problem is caused by the dhcp-client. Run "dhclient eth0" and
That gives exactly the same result as ifup eth0.
> see if it still fails. I am currently using Sid's dhcp-client package
> version 2.0pl5-19.4
So am I.
> and it works without problems. Check your
> /etc/dhclient.conf for settings which could cause trouble, for example
Maybe this is the problem: it has only two uncommented lines:
supersede domain-name "co-ho.net"
prepend domain-name-servers 192.168.0.3
both needed for correct functioning of DNS (and the same as all other
Linux boxes on the network). Windows and Mac boxes manage without: I do
not understand where they get their internal DNS from, but that is a
separate issue of no urgency whatsoever.
> an unusually short timeout.
The DHCPDISCOVER seems to select random lengths of time between 5 and 20
seconds, and to repeat five times for each 'ifup' or 'dhclient'. I suppose
this is default behaviour. Since each run includes at least two longer
examples (>15s), I don't suppose altering this would improve things. And
I still suspect I have something else actually misconfigured.
>
> I hope this helps.
Thanks for all the input, but regrettably is hasn't yet...
--
richard
Reply to: