SlackwareThis Forum is for the discussion of Slackware Linux.
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.
umm, sorry linux dhcp client, my router at 192.168.0.1 is not a nameserver. However, it does have the DNS IP's, so why don't you ask it and it will kindly give them to you. Linux dhcp client says I don't know how to ask it politely. Why don't you tell me how?
Right now I'm runnig a static config w/ puting in dns ip into the resolv.conf manually. I would like to get this dhcp working properly though?
In /etc/rc.d/rc.inet1, you should be able to change $USE_DHCP to "Yes", configure any other options you may find interesting, and restart your ethernet interface via ifconfig.
If that works, I'd just manually remove your router's IP from resolv.conf - it probably isn't doing any harm, but it probably isn't helping either :-)
Originally posted by rose_bud4201 If that works, I'd just manually remove your router's IP from resolv.conf - it probably isn't doing any harm, but it probably isn't helping either :-)
Manually remove the ip from resolv.conf and replace with real DNS servers???????????????????????????
THAT MISSES THE WHOLE POINT OF MY QUESTION? THE WHOLE POINT is that the dhcp client thinks that 192.168.0.1, my router, is a nameserver. I want the dhcp client to talk to the router and get the real DNS ip's and put them into resolv.conf automatically.
umm, sorry linux dhcp client, my router at 192.168.0.1 is not a nameserver. However, it does have the DNS IP's, so why don't you ask it and it will kindly give them to you. Linux dhcp client says I don't know how to ask it politely. Why don't you tell me how?
If your router is providing DHCP services, it's entirely possible that it's also providing DNS services as a caching or redirect server. Such a service wouldn't be beyond the realms of plausibility, considering that my own D-Link "router" (which is being used as a hub and print server, atm) has that capability.
Are you able to resolve FQDN's with the setting the way the DHCP client seems to be setting it?
killerbob is right. It is not dhcpcd that "thinks" 192.168.0.1 is a valid DNS server, it is your router's DHCP server that passes this address as a DNS server. In fact, this is a pretty common thing for a router to do, because caching DNS entries on the router can speed up name resolution.
The question remains, of course, whether this set up is working for you or not. Some routers will allow you to disable DNS caching/ forwarding and have their built-in DHCP server assign the ISP's DNS server addresses to your DHCP client.
On another note, I think there is no need TO SHOUT at someone who's trying to help you with your problem.
Yes you are indeed correct the router at 192.168.0.1 does provide a resolver. However, it is not a very good resolver and takes forever to resolve names. The other computer on the LAN with windows xp can automatically querry the router for the real dns ip's. It is just a matter of getting dhcp client in linux to ask ther router properly for it? And yes if I manually add the DNS names to the resolv.conf file then it works great. However, that is just a hack that bypasses the dhcp client. Any dhcp client worth using is supposed to querry the DHCP server for the real dns names. Otherwise what is the point of using a dhcp?
Also, I didn't mean TO SHOUT, it's just that I've been trying to get the dhcp client to get the real DNS ip's for weeks and it is annoying the hell out of me. I am no newbie to linux and it is frustrating me because I con't figure it out.
Are you certain that the Windows box is using dynamic configuration for *all* the options? It is entirely possible for Windows to be on DHCP for network configuration, but to use static configuration for DNS setup.
I ask, because as I understand it, DHCP is DHCP. Period.
DHCP works like this:
1 - Client sends out a DHCP probe packet, on the broadcast address 255.255.255.255.
2 - DHCP server hears the packet, and replies on the same broadcast address with an IP address and the client's MAC address.
3 - Client hears DHCP's response, and switches to using that IP address. It responds directly to DHCP server, asking for netmask, gateway, DNS, lease duration, and anything else that can be configured in DHCP's response.
4 - DHCP server replies with all of the information that it's configured to send out.
5 - Client autoconfigures with the information provided by the DHCP server.
6 - DHCP records the IP address and the MAC address in the leases file, so that it doesn't send out the same IP address to another computer, and so that it can send the same credentials to the same computer if it requests them for renewal or reboots before the lease expires.
If dhcpcd gets more than one answer for the DNS server, it'll put them all in /etc/resolv.conf. Before I switched to an internal DNS server on my network, I had 7 DNS servers in my DHCP configuration, and Linux had them all in /etc/resolv.conf. Windows isn't smart enough to allow more than two DNS servers, and it'll put them in its configuration in the order they arrive in. It's actually possible for a DHCP response to have dozens of DNS servers configured, and there is absolutely no way to structure a DHCP server to give a different response to a different OS, short of having a packet filter that checks the OS signature (like nmap does), and directs the packets to a different server configuration based on the client OS.
Somehow, I don't think that D-Link would have put that kind of smarts into your router....
So the question remains. Are you *certain* that Windows is using dynamic configuration for DNS? Did you install any special software in Windows for the router, that could, conceivably, allow Windows to ask the router for information that isn't sent through DHCP?
And is there a reason that you can't just configure the DNS numbers manually in Linux? If you've already established that it works that way, why trouble yourself with trying to fix it? How many clients are you planning on adding to your network that you have to worry about the small trouble that would cause you over the aggravation of trying to change a DHCP server's request?
Is it enough that you should be considering using a real DHCP server instead of your NAT box?
Yeah am absolutely 100% positive that the window boxes on the LAN are using dynamic DHCP, I set them up myself. They querry the router for all the information, IP, netmask, gateway, and dns.
Thanks you for all the detailed info. I'm going to put my eht0 into promisc mode and dump the packets and see what is going on here. My understanding is that DHCP is generic so it should just work and be independent of the OS. I'm going to figure this one out.
Quote:
why trouble yourself with trying to fix it?
It's how I am. Yeah, right now I have a static config and it works, but I'm a person that likes to know the nuts and bolts of everything. I'm an Engineer. Not computer by the way. Computers are my hobby and I enjoy it, although sometimes it drives me crazy in the end I will be more knowledgeable for it.
Quote:
Is it enough that you should be considering using a real DHCP server instead of your NAT box?
I'm running a small LAN here and I don't want to have a dedicated computer on 24/7 to do routing/gateway/firewall/DHCP although maybe one day.
as you can see the dhcp router aint sending much? it sends that twice and then that's it. It seems is not even sending any DNS IP's. The dhcp client just assumes one of 192.168.0.1 and puts it in the resolv.conf file.
Now I have to do the same in windows xp, which is going to be harder because I don't know how to get packet dumps in windows xp.
a way to solve your prob. would be to add the "-R " option to any instance of the " dhcpcd" command
in /etc/rc.d/rc.inet1.
in that case /etc/resolv.conf won't be overwritten, and you can put your own dns-server(s) there.
I'm getin this baby to work the right way. Further investigation of my packets tells me it is using the BOOTP protocol rather than the DHCP protocol. Reading on the net and it seems that the BOOTP protocal is a primative one and doesn't do much. So now I have to get my dhcp client to use the more advanced DHCP protocol. Think maybe the one I'm using "dhcpcd" can't do this. I'm going to get a new one. I think the dhclient one looks more advanced. I WILL FIGURE THIS OUT.
Nonsense.... I'm using dhcpcd myself, on my laptop, desktop, and the Linux installation on my mother's computer (that she doesn't know is there ), and I've never had the problems you're describing. I'm getting IP, netmask, DNS, time, and gateway from my DHCP server.
I'm also running a server with dhcpd, rather than using a NAT box.
It's not the "NAT box". Absolutely without a doubt, 100% sure. The router is capable of sending the DNS info as windows xp gets it this way. The dhclient does look a lot more advanced, it has 10,000 options. Can I ask what flags your or passing to dhcpcd?
The BOOTP and DHCP are 2 different protocols as defined here:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.