Windows XP network can't acquire DHCP address from debian squeeze?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Windows XP network can't acquire DHCP address from debian squeeze?
Hi,
I setup the dnsmasq in debian squeeze as dhcp and dns server, for the debian host i assigned the static ip addresses, and configured the xp for dhcp.
Windows XP network can't acquire DHCP address from debian squeeze with this error:
Quote:
error unable to contact your dhcp server Request has timed out.
this is the tcpdump output in debian for the xp network:
Quote:
15:12:10.631635 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:07:e9:a8:ea:93 (oui Unknown), length 300
15:13:16.611793 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:07:e9:a8:ea:93 (oui Unknown), length 300
15:13:16.611793 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:07:e9:a8:ea:93 (oui Unknown), length 300
15:12:42.631730 ARP, Request who-has 169.254.202.161 tell 169.254.202.161, length 4615:12:44.613568 ARP, Request who-has 169.254.202.161 tell 169.254.202.161, length 46
15:13:06.190376 IP 169.254.202.161.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
15:13:06.940327 IP 169.254.202.161.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
15:13:07.690364 IP 169.254.202.161.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
15:13:08.440244 IP 169.254.202.161.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
15:13:09.190132 IP 169.254.202.161.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
15:13:09.940145 IP 169.254.202.161.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
15:13:10.690284 IP 169.254.202.161.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
15:13:10.690760 IP 169.254.202.161.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
15:13:13.424496 IP 169.254.202.161.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
15:13:16.611793 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:07:e9:a8:ea:93 (oui Unknown),
length 300
15:13:16.611793 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:07:e9:a8:ea:93 (oui Unknown), length 300
15:13:16.611793 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:07:e9:a8:ea:93 (oui Unknown), length 300
As this is a forum and walking you through the install process is long I suggest you look at the Debian sarge tutorial for DHCP and ask any questions you have then.
I will help you get it running.
The 254.169 address in your out put is APIPA Automatic Private IP Addressing. What computer has this mac -> Request from 00:07:e9:a8:ea:93 The command ifconfig -a will show the mac on Linux.
IF you have added the Linux DHCP server to your network that has a router then you should rest your router and turn DHCP off in your router if you are using one.
What does your network consist of ? Router ? Switch ?
On your XP clients run ipconfig /flushdns
Then ipconfig /Registerdns
On your windows clients you can check if your getting your address using ipconfig /release and ipconfig /renew.
Let me know how your doing.
Since you don't mention whether you have established network connectivity between server and client, I would check the firewall on the windows box and then on the server.
Can you set a static IP on the Windows system w/ the requisite default route and DNS server and see if that works?
That, and do you have anything else that connects via DHCP?
I imagine that tcpdump capture was taken from the DHCP server, which, of course, would indicate the request is getting there. Determining if your DHCP server is functional is paramount.
Last edited by devwatchdog; 04-19-2011 at 12:42 PM.
Thanks for the replies, the 00:07:e9:a8:ea:93 is the xp pc adapter MAC address, the two pc's network adapters are directly connected with each other with a network cable and i didn't use any router or switch, this is the dnsmasq.conf for the dnsmasq to work as dhcp server:
The 192.168.1.1 is the debian static ip address.
i did the ipconfig/fulshdns, then registerdns then realse and renew but the result was same above errors the xp show the message of " limited or no connectivity" and the ipconfig result is:
Quote:
Autoconfiguration IP Address: 169.254.202.16
Subnet Mask: 255.255.0.0
i did the static ip for the xp pc but the xp cannot share the internet connection from the debian, and the share folders with samba some how works. but i want i can plug any xp pc to the network cable and that can get the ip from the dhcp server and share the internet connection from the debian.
The windows firewall is disabled and debian shorewall firewall is configured for two interfaces.
Choosing Your Interfaces
One you will probably want to do is tell dnsmasq which ethernet interface it can and cannot listen on,
as we really don't want it listening on the internet. Around line 69 of the /etc/dnsmasq.conf file, you will see:
#interface=
Uncomment the line and specify which ethernet interface(s) you want it server IPs to. For example, if
I want it to listen on eth1 (my DMZ) and eth2 (my local network), then it should look like:
interface=eth1
interface=eth2
If I didn't edit this line, it would also listen on eth0, my internet connection. I personally wouldn't
recommend this, as it gives those evil guys a few doors to try to break into.
From what I can tell from that little blurb, it should be listening on both interfaces of your Debian system without defining the interface. I'd define the interface you want to use anyhow.
Which leads us back to the question as to why this DHCP server isn't answering. It sounds like your Debian system is connected to whatever internet source you are using, which I'd imagine is providing a public IP address, thus shouldn't be a conflict.
Something I'd do to eliminate the firewall as the issue, is disconnect the ethernet cable on the public interface, and drop the firewall. If the DHCP lease is provided then, you'll know you need to look at your firewall.
I doubt it is a Windows related issue, but to check you could boot your Windows system off a Linux live CD to see if the problem persists.
Thanks again for the reply, The problem solved with the specifying the interface as:
Quote:
interface= eth0
Ok now the xp can get an ip from the Debian dhcp as:
Quote:
Connection specified DNS suffix : example.net
Ip Adrress ......................: 192.168.1.85
Subnet Mask .....................: 255.255.255.0
Default Gateway .................: 192.168.1.1
but still the web browser in windows cannot open the web pages:
this is the dnsmasq log from the /var/log/syslog for the windows xp the web browser want to open the google website:
Quote:
Apr 20 14:21:36 mypc dnsmasq[1816]: query[A] www.google.com from 192.168.1.85
Apr 20 14:21:36 mypc dnsmasq[1816]: forwarded www.google.com to 208.67.222.123
Apr 20 14:21:36 mypc dnsmasq[1816]: forwarded www.google.com to 208.67.222.222
Apr 20 14:21:36 mypc dnsmasq[1816]: forwarded www.google.com to 208.67.220.220
Apr 20 14:21:36 mypc dnsmasq[1816]: forwarded www.google.com to 208.67.222.123
Apr 20 14:21:37 mypc dnsmasq[1816]: reply www.google.com is <CNAME>
Apr 20 14:21:37 mypc dnsmasq[1816]: reply www.l.google.com is 209.85.231.104
and this is the dnsmasq log from the /var/log/syslog for the debian that can open the google.com:
Quote:
Apr 20 14:57:40 mypc dnsmasq[1816]: query[AAAA] www.google.com.af from 127.0.0.1Apr 20 14:57:40 mypc dnsmasq[1816]: forwarded www.google.com.af to 208.67.220.220
Apr 20 14:57:40 mypc dnsmasq[1816]: reply www.google.com.af is <CNAME>
Apr 20 14:57:40 mypc dnsmasq[1816]: reply www.google.com is <CNAME>
Apr 20 14:57:40 mypc dnsmasq[1816]: reply www.l.google.com is 209.85.231.104
Apr 20 14:57:40 mypc dnsmasq[1816]: reply www.google.com.af is <CNAME>
Apr 20 14:57:40 mypc dnsmasq[1816]: reply www.google.com is <CNAME>
Apr 20 14:57:40 mypc dnsmasq[1816]: reply www.l.google.com is NODATA-IPv6
Apr 20 14:57:45 mypc dnsmasq[1816]: reply www.google.com.af is <CNAME>
Apr 20 14:57:45 mypc dnsmasq[1816]: reply www.google.com is <CNAME>
Apr 20 14:57:45 mypc dnsmasq[1816]: reply www.l.google.com is 209.85.231.104
Apr 20 14:57:45 mypc dnsmasq[1816]: reply www.google.com.af is <CNAME>
Apr 20 14:57:45 mypc dnsmasq[1816]: reply www.google.com is <CNAME>
Apr 20 14:57:45 mypc dnsmasq[1816]: reply www.l.google.com is NODATA-IPv6
In the windows pc the quey just stopping in the:
Quote:
Apr 20 14:21:37 mypc dnsmasq[1816]: reply www.google.com is <CNAME>
Apr 20 14:21:37 mypc dnsmasq[1816]: reply www.l.google.com is 209.85.231.10
Shams you said "the two pc's network adapters are directly connected with each other with a network cable and i didn't use any router or switch"
Are you using a cross over cable ?
If you are Using a regular networking cable it will not work.
Shams you said "the two pc's network adapters are directly connected with each other with a network cable and i didn't use any router or switch"
Are you using a cross over cable ?
If you are Using a regular networking cable it will not work.
Heh. You might want to reread the analysis of the activity shams has seen thus far then reconsider your question. Auto-MDIX tends to solve issues such as this.
Hint: it is impossible to get a tcpdump capture showing layer 3 traffic where layer 2 connectivity hasn't been established.
shams:
I'd recommend using nslookup on the Windows system to determine if it is resolving DNS requests properly. From what it looks like there is a request sent and a response received -- and it appears that an answer was sent. DNS resolution is the first thing I check as well when troubleshooting issues such as these because without it, nothing else will work properly. It does not, however, establish that proper routing has been established for traffic. Even if your Debian system has its DNS service configured properly, it might not be forwarding traffic.
Check the Windows system with nslookup, see if it is getting a response. Caching/forwarding DNS servers are rather simple, and there really isn't very much to define in order to set them up.
Once you establish that DNS resolution is working, you should see if you can ping google. Use tcpdump to see if it is reaching the connected interface on the Debian system. Use this:
Code:
tcpdump -nni <ethX> icmp
If you see it arriving at that interface, then go to the public facing interface and run tcpdump on it, or just fire up two tcpdump sessions simultaneously in two terminals. If you see traffic exiting the public interface, but it is exiting at the 192.168.x.x address, you're not natting the traffic properly, and the problem resides with your firewall rules/configuration. If you don't see the traffic exit the public interface, you might not have packet forwarding set up:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
Although I would think that Shorewall would handle setting the system up for ip forwarding. I really doubt you will have to set that manually.
My impression is that for whatever reason, Shorewall isn't forwarding the traffic. We'll see if that is the case when you report back.
Oh yeah - double check you're getting a default gateway on the Windows machine with the DHCP lease.
I'd enable Shorewall and attempt to ping google.com again, but this time capture traffic on the public/external interface. It is established you're getting traffic on eth0. We need to check that it is attempting to exit on the other interface. If it isn't, your firewall is not configured correctly. If the traffic exits as the originating 192.168.1.x address, your NAT rules are not working.
As for Shorewall, I don't use it although believe I installed it a few years ago for a short while. At a glance, I would start looking at what it logs, and enable logging if it isn't doing it now.
This should help provide some direction as to where your problem might lie:
Code:
Shorewall does not maintain a log itself but rather relies on your system's logging configuration. The following
commands rely on knowing where Netfilter messages are logged:
shorewall show log (Displays the last 20 netfilter log messages)
shorewall logwatch (Polls the log at a settable interval
shorewall dump (Produces an extensive report for inclusion in Shorewall problem reports)
It is important that these commands work properly because when you encounter connection problems when Shorewall
is running, the first thing that you should do is to look at the Netfilter log; with the help of Shorewall
FAQ 17, you can usually resolve the problem quickly.
The Netfilter log location is distribution-dependent:
Debian and its derivatives log Netfilter messages to /var/log/kern.log.
Recent SuSE/OpenSuSE™ releases come preconfigured with syslog-ng and log netfilter messages to /var/log/firewall.
For other distributions, Netfilter messages are most commonly logged to /var/log/messages.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.