Hello
I installed CentOS 5 today, and I selected DHCP for my IP Address, than when installation was over, I typed in
[code]setup[/code]
and selected "Network Configuration"
I checked off DHCP and filled in the following information:
Static IP: 192.168.15.10
Netmask: 255.255.255.0
Gateway IP: 192.168.15.1
After I reboot I can ssh to the box but anything that has to deal with DNS doesn't work, like if I type in
[code]yum update[/code] It says that the mirror list can't be reached, cause the name can't be resolved
Anyway to fix this?
Thank You
Static IP and DNS
Re: Static IP and DNS
The exaxt massage that it gives is: "temporary failure in name resolution"
I tried installing CentOS 5 on another machine and its the same thing on that.
I used static IPs on CentOS 4.4 and they worked perfectly
Can this be a bug?
I tried installing CentOS 5 on another machine and its the same thing on that.
I used static IPs on CentOS 4.4 and they worked perfectly
Can this be a bug?
Static IP and DNS
Try adding your dns server ip to /etc/resolv.conf
It's just server name [space] ip address.
Mine looks like:
[code]nameserver 192.168.0.1[/code]
[url=http://www.faqs.org/docs/securing/chap9sec91.html]info about resolv.conf[/url]
It's just server name [space] ip address.
Mine looks like:
[code]nameserver 192.168.0.1[/code]
[url=http://www.faqs.org/docs/securing/chap9sec91.html]info about resolv.conf[/url]
Re: Static IP and DNS
I ran into a similar issue manually configuring my network during installation. It seems it failed to take my gateway settings as no route to the gateway was added (thus meaning that you'll never reach your dns servers, but will be able to ping internally on your lan).
As root, do:
[code]route[/code]
and see if your gateway is set correctly. If not, again from the terminal I set mine as follows:
[code]route add default gw 192.168.0.1[/code]
You should get something like this:
[code]
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
[/code]
Hope that helps
Ned
As root, do:
[code]route[/code]
and see if your gateway is set correctly. If not, again from the terminal I set mine as follows:
[code]route add default gw 192.168.0.1[/code]
You should get something like this:
[code]
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
[/code]
Hope that helps
Ned