LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   DHCP via router on Debian fails, XP works fine (http://www.linuxquestions.org/questions/linux-wireless-networking-41/dhcp-via-router-on-debian-fails-xp-works-fine-666146/)

oopsdude 08-28-2008 06:05 PM

DHCP via router on Debian fails, XP works fine
 
Hello all,

I just installed Debian and have hooked up eth0 to a Netgear wireless router (I'm using wired until I get my wireless drivers to work). Whenever I run dhclient, ifup eth0, /etc/init.d/networking restart, or anything at all to request a DHCP address, I get this:

Quote:

Listening on LPF/eth0/00:1e:68:38:73:56
Sending on LPF/eth0/00:1e:68:38:73:56
Sending on Socket/fallback
DHCPDISOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISOVER on eth0 to 255.255.255.255 port 67 interval 14
... (and so on)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
I also have an XP box, also hooked up through eth0 to the router. DHCP on that machine works just dandy. The Windows command ipconfig /all tells me that the DHCP server is 10.0.0.1, the address of my router.

ping 10.0.0.1 gives this:

Quote:

PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
From 10.0.0.6 icmp_seq=2 Destination Host Unreachable
From 10.0.0.6 icmp_seq=3 Destination Host Unreachable
From 10.0.0.6 icmp_seq=4 Destination Host Unreachable
... (and so on)
/etc/network/interfaces reads in part:

Quote:

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
auto eth0
Also, for some reason, occasionally I see ifup eth0 run on boot, and it connects successfully. But then when X starts up, it somehow... disconnects? The "Network Tools" utility says only about 15KB were sent. I'm not sure what to call it, since Debian still claims my connection is active. But I'm in the same situation as if DHCP had failed. And it wouldn't make sense for a lease to expire that quickly. Perhaps it's a separate issue.

Any help would be greatly appreciated! Thanks in advance.

pinniped 08-28-2008 08:06 PM

1. check your cable
2. check the setup of your router - it may be configured to only accept requests from certain MAC numbers, or it may be set to dispense static addresses and you have no static address assigned to your Linux box.

oopsdude 08-28-2008 08:31 PM

Thanks, I'm checking my router setup just in case, but I think both those issues are addressed by the fact that the Internet works fine when I boot into XP. Perhaps I wasn't clear; I have an XP box connected to the router, and another box that dual-boots Debian and XP. Both XPs connect to the Internet with no problems. Debian is the only one with DHCP issues. Since Debian and XP share the MAC address of my Ethernet card, I think we can eliminate that proposal. Unless I'm missing something.

Thanks in advance again!

Quakeboy02 08-28-2008 10:13 PM

Quote:

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
auto eth0
I wonder if it doesn't like the fact that eth0 is defined as both allow-hotplug and allow-auto? Try commenting out the auto line and see if that changes it.

pinniped 08-28-2008 10:18 PM

I would suggest removing the "allow-hotplug" line since that's only needed if your NIC is removable (like a PCMCIA type) - I can't see how it would otherwise affect your system though.

What is the NIC as determined by matching entries in 'lspci' and 'lspci -n'? It is possible that the wrong driver is loaded so it's best to track the driver from the VendorID:ProductID numbers.

And just to check one more time using 'ifconfig', try:

ifdown eth0
ifconfig eth0 up 10.0.0.6 netmask 255.255.255.0

then try that ping again.

I also forgot - when you have that trouble, can you log into the router via the other computer and check the active leases? Some routers are a bit stupid and require you to drop the lease - most however drop the lease as soon as the cable is disconnected or the computer powered down or else they hand out a new lease anyway.

oopsdude 08-28-2008 11:04 PM

I tried commenting out the auto line, the allow-hotplug line and then both just for good measure, but nothing changed.

I tried ifdown eth0 and got this:
Quote:

There is already a pid file /var/run/dhclient.eth0.pid with pid 3976
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
... (blah blah blah, copyright stuff)

Listening on LPF/eth0/00:1e:68:38:73:56
Sending on LPF/eth0/00:1e:68:38:73:56
Sending on Socket/fallback
DHCPRELEASE on eth0 to 10.0.0.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
So apparently it's aware of the router, at least; just not able to connect to it? I tried ifconfig eth0 up 10.0.0.6 netmask 255.255.255.0 as well and got this:

Quote:

SIOCSIFADDR: No such device
up: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
lspci gives me:
Quote:

...
03:00.0 Network controller: Broadcom Corporation Unknown device 4328 (rev 03)
And lscpi -n gives me:
Quote:

...
03:00.0 0280: 14e4:4328 (rev 03)
Is that what you're looking for? If not, I'll be happy to give any other information.

Quakeboy02 08-29-2008 12:31 AM

Have you tried "ifup --force eth0"?

Guess I don't have much else to offer. :(

pinniped 08-29-2008 02:10 AM

The bit you posted:

03:00.0 0280: 14e4:4328 (rev 03)

That's your Wireless gizmo. The posts I have dug up all say "use ndiswrapper" which means installing ndiswrapper and setting up the WinDuhs driver.

Have another try at identifying the wired network device.

The other lines you posted like:
SIOCSIFADDR: No such device
indicate that the driver is not working for whatever reason (usually missing firmware, but in some cases the wrong driver loads as already mentioned). At least we've established that the DHCP messages are probably misleading because your NIC isn't actually working.

Can you also post the output of:
dmesg|grep eth

oopsdude 09-02-2008 08:51 PM

Thanks for your help guys, finally got ndiswrapper working (on Ubuntu) and everything works great now.


All times are GMT -5. The time now is 06:33 AM.