Results 1 to 6 of 6

Thread: DNS problems

  1. #1
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407

    DNS problems

    I have two boxes here both connected to a router. One is slackware 9.1 upgraded to 10 and the other is slackware 10 from install. Right now they are the only two linux boxes on my network, and also the only two boxes with static ip's. All my windows boxes resolve everything fine including the boxes on the network. Both the slackware boxes at first couldn't resolve anything. After changing some things in the resolv.conf I got one to be able to resolve everything except boxes on the network (the upgraded one) and the other, with the same config, still can't resolve anything.

    Can anyone give me some insight into how I can get them both to be able to resolve both the boxes on the network, and normal websites and things which aren't on my network? Any help would be greatly appreciated. Thank you.

  2. #2
    Senior Member
    Join Date
    Oct 2002
    Posts
    1,130
    It depends on which application is attempting to resolve these addresses. Some automatically search the domain name in the "search" line of resolv.conf. Some don't.

    However, since your Windows clients resolve it, I would think that they are getting thier information from the Windows browser service, which by default advertises such hostnames to other Windows clients. Linux has no such service to my knowledge.

    If this is correct, the only solution is to establish a local DNS server and add it to /etc/resolv.conf, or add the linux boxes' addresses and host names to /etc/hosts on each linux machine (which, for two machines, is probably the easiest solution).
    Government is like fire - a handy servant, but a dangerous master - George Washington
    Government is not reason, it is not eloquence - it is force. - George Washington.

    Join the UnError community!

  3. #3
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    . My router has DNS, which is what was originally set in the /etc/resolv.conf, but that didn't work at all. So I put the DNS ip's that my router uses instead and that seems to work. To get the hosts on my network to resolve I did as you said and just put them in /etc/hosts. I still think they should be able to talk to my router for that stuff though. Oh well. Thanks.

  4. #4
    Senior Member
    Join Date
    Oct 2002
    Posts
    1,130
    I would imagine your router is a typical broadband router intended for cable/DSL access an the like. Most of these use caching DNS servers, which only cache DNS requests after they have been recieved from the DNS server set in your routers configuration (which may be obtained through DHCP or PPPoE or something similar). The linux boxes send a query for a local machine to your router, which attempts, and fails, to resolve these addresses with your ISP's DNS server.

    I have some (limited) experience with configuring DNS servers and have run into this problem before.

    You're running Slack 10. Me too, and I have full DNS resolution capability here; the boxes behind the router query my ISP's DNS server and not the router. Querying the router was just plain slow (it's a p166).

    I would think the big issue here is that your router is likely programmed to be compatible with Windows clients, and Microsoft ignores the RFC's half the time and just does things thier own way, breaking compatibility with other OSes. And if I was manufacturing SOHO routers, I would aim for Windows compatibility over Linux.

    So it could very likely be a compatibility problem with your router communicating properly with Windows clients at the expense of proper communication with Linux clients.

    If you post your configuration, I might be able to take a look and find something wrong, seeing as how I'm running Slack 10 (from install) here as well. Things like /etc/resolv.conf, ifconfig output, /etc/rc.d/rc.inet1, /etc/rc.d/rc.inet1.conf, free beer, or anything else you may think is relevant would be helpful. Otherwise have a look at these files on both machines and see if any differences pop up which may be causing the problem.
    Government is like fire - a handy servant, but a dangerous master - George Washington
    Government is not reason, it is not eloquence - it is force. - George Washington.

    Join the UnError community!

  5. #5
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    ifconfig
    eth0 Link encap:Ethernet HWaddr 00:02:55:61:9C:54
    inet addr:192.168.0.210 Bcast:192.168.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:15777 errors:0 dropped:0 overruns:0 frame:0
    TX packets:11066 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1644575 (1.5 Mb) TX bytes:2950839 (2.8 Mb)
    Interrupt:5 Base address:0x2000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:5638 errors:0 dropped:0 overruns:0 frame:0
    TX packets:5638 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:447913 (437.4 Kb) TX bytes:447913 (437.4 Kb)
    rc.inet1.conf
    # /etc/rc.d/rc.inet1.conf
    #
    # This file contains the configuration settings for network interfaces.
    # If USE_DHCP[interface] is set to "yes", this overrides any other settings.
    # If you don't have an interface, leave the settings null ("").

    # Config information for eth0:
    IPADDR[0]="192.168.0.210"
    NETMASK[0]="255.255.255.0"
    USE_DHCP[0]=""
    DHCP_HOSTNAME[0]=""

    # Config information for eth1:
    IPADDR[1]=""
    NETMASK[1]=""
    USE_DHCP[1]=""
    DHCP_HOSTNAME[1]=""

    # Config information for eth2:
    IPADDR[2]=""
    NETMASK[2]=""
    USE_DHCP[2]=""
    DHCP_HOSTNAME[2]=""

    # Config information for eth3:
    IPADDR[3]=""
    NETMASK[3]=""
    USE_DHCP[3]=""
    DHCP_HOSTNAME[3]=""

    # Default gateway IP address:
    GATEWAY="192.168.0.1"

    # Change this to "yes" for debugging output to stdout. Unfortunately,
    # /sbin/hotplug seems to disable stdout so you'll only see debugging output
    # when rc.inet1 is called directly.
    DEBUG_ETH_UP="no"
    resolv.conf
    domain 192.168.0.1
    nameserver 192.168.0.1
    nameserver 24.93.40.66
    nameserver 24.93.40.65
    nameserver 24.93.40.67
    and rc.inet1 is attached.

  6. #6
    Senior Member
    Join Date
    Oct 2002
    Posts
    1,130
    hmmm...

    I know the C library can only handle 3 nameservers in resolv.conf... I don't know what happens if you put more in there.

    I set up my router as a dns proxy and it works here. My /etc/resolv.conf has only one line, "nameserver 10.0.0.1", which is my router. It worked here with five dns servers listed in there, but try taking out every line except the 192.168.0.1 line.

    As a side note, the "domain 192.168.0.1" is useless, since this directive only tells the system what to append to host name lookups, so it automaically adds something like "google.com" when you look up something like "www".

    I can't see anything wrong in the scripts or config files, bu maybe try running via dhcp, which you can do by putting in USE_DHCP[0]="yes" under eth0 in /etc/rc.d/rc.inet1.conf. The dhcp client should the automiatically write the /etc/resolv.conf for you.

    Failing that, run tcpdump while trying some DNS queries (prefereably with dig or nslookup) and maybe one of us can find an answer there.

    Or you could just be happy with the config that works now. But I need everything to work exactly the way I want it to, so I can understand if you do to.

    Hope this helps.
    Government is like fire - a handy servant, but a dangerous master - George Washington
    Government is not reason, it is not eloquence - it is force. - George Washington.

    Join the UnError community!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •