Forgive me as this is my first plunge into Linux. I have a new CentOS box, CLI only right now and have managed to set a public static IP using ifconfig and route commands. I can ping the box from the internet, and can ping ip address form the centos box, but the box won't resolve namespace. If I try to ping google.com, I get :
ping: unknown host google.com
So where do I set the DNS servers in Linux?
Cameron
set DNS
Re: set DNS
I ran setup, but it never asked me for DNS entries. Any other ideas?
Re: set DNS
OK...I ran it again and there were two more entries in there...the first time there was only IP and subnet. Strange.
Cameron
Cameron
Re: set DNS
[quote]ccrum wrote:
I ran setup, but it never asked me for DNS entries. Any other ideas?[/quote]
The DNS are taken automaticly by the dhclient from the router/modem. the fact that
you enterd a static IP and disabling in this way the dhclient is why you do not have resolving.
the way to overcome this problem is to set-up dns nameserver in the resolv.conf file and, to tell
the server not to try and get other nameservers (xxx and yyy are ip address of dns servers):
[code]
# echo -e "nameserver\t xxx.xxx.xxx.xxx \n nameserver\t yyy.yyy.yyy.yyy" > /etc/resolv.conf
[/code]
Take a look at the file /usr/share/doc/initscripts-7.93.25.EL/sysconfig.txt , you will find the proper way.
one way is to set "PEERDNS=no" in the [b]/etc/sysconfig/network-scripts/ifcfg-ethX[/b]
.
I ran setup, but it never asked me for DNS entries. Any other ideas?[/quote]
The DNS are taken automaticly by the dhclient from the router/modem. the fact that
you enterd a static IP and disabling in this way the dhclient is why you do not have resolving.
the way to overcome this problem is to set-up dns nameserver in the resolv.conf file and, to tell
the server not to try and get other nameservers (xxx and yyy are ip address of dns servers):
[code]
# echo -e "nameserver\t xxx.xxx.xxx.xxx \n nameserver\t yyy.yyy.yyy.yyy" > /etc/resolv.conf
[/code]
Take a look at the file /usr/share/doc/initscripts-7.93.25.EL/sysconfig.txt , you will find the proper way.
one way is to set "PEERDNS=no" in the [b]/etc/sysconfig/network-scripts/ifcfg-ethX[/b]
.