Results 1 to 10 of 24

Thread: DNS in CentOS

Hybrid View

  1. #1
    Mentor cga's Avatar
    Join Date
    May 2001
    Posts
    1,433

    DNS in CentOS

    Hi all,

    I have a small box runing CentOS 4.2 here at school. This is a minimal, text based install. The system works fine, and I can ping and ssh to it from any workstation on the LAN, however, I do not seem to have DNS (i.e. it works from the IP adress, not from the Hostname.

    DNS is handled by the router, but I think I am missing something.

    Any ideas?
    TANSTAAFL

  2. #2
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    Is bind listed in /etc/host.conf ?
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  3. #3
    Mentor cga's Avatar
    Join Date
    May 2001
    Posts
    1,433
    Quote Originally Posted by Compunuts
    Is bind listed in /etc/host.conf ?
    Yes.

    order hosts,bind
    TANSTAAFL

  4. #4
    Advisor Outlaw's Avatar
    Join Date
    May 2001
    Location
    Clifton Park, NY
    Posts
    630
    If its an isolated LAN, you probably have no DNS. Can check by doing a
    Code:
    host www.google.com
    . If you think you should have DNS, make sure /etc/resolv.conf contains entries. Otherwise, populate your /etc/hosts on each machine with all the others IPs and names.

  5. #5
    Mentor cga's Avatar
    Join Date
    May 2001
    Posts
    1,433
    Quote Originally Posted by Outlaw
    If its an isolated LAN, you probably have no DNS. Can check by doing a
    Code:
    host www.google.com
    . If you think you should have DNS, make sure /etc/resolv.conf contains entries. Otherwise, populate your /etc/hosts on each machine with all the others IPs and names.
    Yeah, I have /etc/resolv.conf as follows:

    nameserver 192.168.9.105
    nameserver 192.168.9.1

    The second one is the default gateway/router.

    Host www.google.com works fine.
    TANSTAAFL

  6. #6
    Mentor cga's Avatar
    Join Date
    May 2001
    Posts
    1,433
    OK, if I try to ping the DNS server, I get a host unreachable result. From the CentOS box -- I can ping the DNS from XP just fine.
    TANSTAAFL

  7. #7
    Advisor Outlaw's Avatar
    Join Date
    May 2001
    Location
    Clifton Park, NY
    Posts
    630
    Does netstat -rn return a gateway?

    Code:
    netstat -rn
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
    169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
    0.0.0.0         10.0.0.1        0.0.0.0         UG        0 0          0 eth0
    If not, then see if you can extract the gateway to use from XP box and put it in the Linux one.

    If this is a small LAN then chances are, they themselves wont be in DNS. You'll have to depend on hosts files.

  8. #8
    Advisor Outlaw's Avatar
    Join Date
    May 2001
    Location
    Clifton Park, NY
    Posts
    630
    whoops, I didnt see your other post.

    So it's probably that these machines themselves are not in DNS and you have to rely on hosts files

    edit-
    it's odd though that you cant ping the dns servers but you can resolve internet addresses.

  9. #9
    Mentor cga's Avatar
    Join Date
    May 2001
    Posts
    1,433
    Quote Originally Posted by Outlaw
    Does netstat -rn return a gateway?

    Code:
    netstat -rn
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
    169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
    0.0.0.0         10.0.0.1        0.0.0.0         UG        0 0          0 eth0
    If not, then see if you can extract the gateway to use from XP box and put it in the Linux one.

    If this is a small LAN then chances are, they themselves wont be in DNS. You'll have to depend on hosts files.
    Hmmmm... I get a gateway alue from netstat that ends in .254. ipconfig on XP gives the gateway as .1

    Should I tweak my routing tables to reflect the XP value for the last octet?
    TANSTAAFL

  10. #10
    Hi everyone.

    I have a problem expect people to help.
    I am using CentOS 6. I installed bind-DNS service. All configuration files are in / usr / share /xxxx / sample / ... in which the file as name.conf; name.rfc1912.zone and other files.
    The problem here is that I do not know how to copy these files to where to configure correctly. I also tried several times but to no avail.

    Expect people to help.
    Thank you very much.

Similar Threads

  1. why not centos ?
    By cognitiveLinux in forum Linux Distros
    Replies: 0
    Last Post: 02-06-2012, 10:43 PM
  2. CentOS 4.3 is out
    By cga in forum Redhat / Fedora
    Replies: 0
    Last Post: 03-24-2006, 09:23 PM
  3. CentOS
    By cga in forum Redhat / Fedora
    Replies: 5
    Last Post: 02-23-2006, 04:32 PM
  4. CentOS
    By mannyamador in forum Linux - General Topics
    Replies: 0
    Last Post: 01-16-2006, 05:28 PM
  5. CentOS users
    By cga in forum Linux - General Topics
    Replies: 4
    Last Post: 08-17-2005, 10:38 PM

Bookmarks

Posting Permissions

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