Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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:
Internet Systems Consortium DHCP Client v.3.0.1
...
Listening on LPF/eth0/00:e0....
Sending on LPF/eth0/00:e0....
Listening on LPF/lo/
Sending on LPF/lo/
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER.......
DHCPDISCOVER.......
DHCPDISCOVER.......
DHCPDISCOVER.......
DHCPDISCOVER.......
No DHCPOFFERS received
I think the configuration file is /etc/network/interfaces. This file has the following in it:
Code:
audo lo
iface lo inet loopback
hostname myname
auto eth0
iface eth0 inet dhcp
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....
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).
Originally posted by TroelsSmit
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 ??
255.255.255.255 is not the subnet mask. The subnet mask is provided by the DHCP server, after it has been found.
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).
This means, that the name resolution is not working. Possible causes:
no DNS server has been defined
a DNS server has been defined, but it does not exist
the host name itself does not exist
The fact that a DHCP server should be contacted is defined in /etc/network/interfaces, as you mentioned earlier:
Code:
...
iface eth0 inet dhcp
...
Another config file controls which information supplied by the DHCP server will actually be used: /etc/dhclient.conf. As mentioned earlier, the DHCP server not only provides the IP number, but also the IP of the DNS server (2nd problem), the IP of the router to the rest of the world (1st problem), etc.
dhclient.conf controls what info will be used and what info will be ignored.
The following options are useful:
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
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...
Originally posted by mcd 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 shouldn't be necessary. It did work under Knoppix (a Live-CD) without manually setting a default gateway. This information is being offered by the DHCP server (otherwise Knoppix wouldn't know about it), but apparently not used by his Debian installation.
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 ??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.