Cannot obtain DHCP lease
Hi,
Im using Debian 2.6.9 and it has worked fine for at long time. Now the box has been moved to a new network, and I cannot obtain an ipadress. The windows computer next to it tells me the following about the network: Code:
IP Address. . . . . . . . . . . . : 192.168.1.34 Code:
Internet Systems Consortium DHCP Client v.3.0.1 I think the configuration file is /etc/network/interfaces. This file has the following in it: Code:
audo lo thank you very much in advance |
The config seems ok... it did work before, didn't it?
Have you checked the hardware? I know it sounds lame, but have you checked the cable? Does the cable of your Debian box is connected to the same hub/switch/router than the Windows computer next to you? Is the LED on your ethernet card switched on? Is the LED of the port used by the Debian box on the hub/switch/router switched on? (Perhaps you used the wrong input) If you use a switch, have you made a reset? (Switches remember the ID of the ethernet card they are connected to. If you unplug one and plug in another, you might not get through). I presume eth0 is the only network card in your system.... |
Thanks you very much for the kind reply :-)
1. Hardware has not been checked, but I will check it asap. 2. Led and Cable connection is OK. 3. Switch has been reset - no change. What I've noticed is that the subnet mask is : 255.255.255.0 on the windows system and seems to be 255.255.255.255 on the linux system ?? |
Oh - and it was on a different system that it used to work! (also DHCP based though, but this time it is a router not a linux box which handles the ip adresses).
|
anyone ?
|
i've had problems with dhclient before. try dhcpcd -d
*oh! you're not using dhclient :) but still, give dhcpcd a go |
Thank you very much, I will try this asap :-)
dhclient is actually what I am using (what should work), ifup/ifdown is just additional tools. Honestly I believe that it is a setup problem though... we'll c. |
did it work?
|
Quote:
My guess is, that this is a broadcast address, meaning: "to anybody out there". Broadcasts are dropped at some point - otherwise the Internet would be filled with them. Is the Windows computer connected to the same switch as your Debian box? (This would give them the same start position). My suggestions for a more systematic approach to find the fault in your system: Download the Knoppix Live CD. Knoppix starts a DHCP client during the boot process. Boot your Windows computer with the Knoppix CD. Verify that you have Internet access. Back to the Linux box: Boot your Linux box with the Knoppix CD. Check if you have Internet access or not. If you get access on the Windows machine, but not on the Linux box, try to plug the network cable of the Windows machine into the Linux machine and reboot. This combination (Knoppix + Windows cable) should work. From there, you can try the various combinations to find the component which is responsible. (Debian + Windows cable) (Knoppix + Linux cable) Note: This all assumes that there IS a DHCP server available :) and that it uses some vanilla configuration. (DHCP servers can be configured to be very restrictive on whose queries to answer). |
I guess the cable was loose or something, today almost everything seem to work, just the last part needed. Nameserver lookup and gateway :-)
First of all, everything works when I use knoppix!! After having booted Debian, ifconfig tells me that I have an ipadress: 192.168.1.105 I can ping the rooter: ping 192.168.1.1 and get response !! I can ping my windows machine and get response: 192.168.1.106 Now, when I write: ping erlang.gbar.dtu.dk (university server) this fails with: ping: unknown host erlang.gbar.dtu.dk when I try to contact the ip directly: ping 192.38.95.25 it tells me: connect: Network is unreachable As already mentioned I am using Debian - what do I have to do, to setup gateway/nameserver - and whatever more I might be missing ?? Thanks :-) |
Debian gurus, please assist :-)
|
To summarize:
If you use Debian, you can reach the local network only. If you use Knoppix, you can also reach the rest of the world. Quote:
Quote:
The fact that a DHCP server should be contacted is defined in /etc/network/interfaces, as you mentioned earlier: Code:
... dhclient.conf controls what info will be used and what info will be ignored. The following options are useful:
Other hints: man dhclient.conf |
you probably also need to tell your linux box that it should use the router (192.168.1.1) as the default gateway:
route add default gw 192.168.1.1 this can be specified in a config file, and i can tell you that in slackware that file is /etc/rc.d/rc.inet1.conf. i have a feeling it's gonna be different for you though... |
Quote:
|
regarding: dhclient.conf
request ... selects what info should be used require ... if the options mentioned here are not provided by the DHCP server, the client aborts with an error message send host-name "your host name": sends your host-name to the server, so that a DNS server can make "your host-name" accessible to others I have enabled all three lines with the standard debian arguments. I then ran "sudo ifconfig eth0 down" and then up. According to dmesg there are no errors only: eth0: link up, 100 Mbps, full-duplx, lpa 0x45E1. ifconfig shows that I indeed have an ip address. the command: "sudo route add default gw 192.168.1.1" was tried - where should this be added so I don't have to run it after every boot ? if I do a traceroute 192.38.95.25 I can then move through the router - but DNS still doesnt work. 192.168.1.1 1.996 ms 213.237.127.74 46 ms *** *** *** *** *** *** *** *** 130.225.244.209 333 ms * * * * * * * * * * * * zzzZZzzzZZ ???? Doesn't a tool to setup these things exist ? I mean, I have all the information Im just not sure where to put it ?? Thanks for all the replys :-) |
All times are GMT -5. The time now is 10:39 PM. |