Hi guys I am having some trouble with getting DNS to work. I will walk you through what I have done so far. Bearing in mind I am very
New to Linux so go easy on me :)
1) Clean Installed Centos
2) Disabled the Network Manager Service
3) Edited /etc/sysconfig/network-scripts/ifcfg-lo (For some reason there isn't a ifcfg-0 or 1 config file?)
4) added the following information
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.168.222
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
(Restarted the network service) service network restart
5) added the gateway
nano /etc/sysconfig/network
Networking=yes
Hostname= Akira
Gateway= 192.168.1.254
( Restarted network service again)
I can ping the router fine :)
6) Add DNS Details
nano /etc/resolv.conf
nameserver 192.168.1.201
( I also have tried with various other servers such as 8.8.8.8. )
Restart network
Now whenever I try to ping a web address I get Unknown Host. I have read numerous other guides and I am stumped and really need
your help.
Many Thanks
[SOLVED] Static I.P DNS does not work?
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
[SOLVED] Static I.P DNS does not work?
Put ifcfg-lo back to what it was and don't touch it again.
run 'ifconfig -a' to see what interfaces you have that have been recognized.
Create an ifcfdg-whatever for the interface you found.
run 'ifconfig -a' to see what interfaces you have that have been recognized.
Create an ifcfdg-whatever for the interface you found.
Re: Static I.P DNS does not work?
Many Thanks will give this a try :)
Re: Static I.P DNS does not work?
Got another interesting issue, I have another Centos Box at work I have setup the static I.P address and DNS as above.
I can ping the gateway fine from the Centos box, I can Ping www.google.com and the dns server by I.P address. When I run dig google.com it produces results and yum-update enabled me to update the system. So DNS is working fine.
The snag I am now having is I cannot ping another host or I have another host when DHCP was enabled on the Centos box I could ping between both and could access the Centos machine via SSH. Firewall has been configured on the host machine to accept ICMP
IP details are correct and the gateway is set correct.
further troubleshooting check route?
ifcfg-eth0
DEVICE=eth0
BootPRO=Static
IPADDR=192.168.1.255
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
ONBOOT=YES
DNS1=192.168.1.200
DNS2=8.8.8.8
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=AKIRA
GATEWAY=192.168.1.254
results of route
Destination gateway Genmask flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 V 0 0 eth0
link-local * 255.0.0 V 1002 0 eth0
default my.router VG 0 eth0
I can ping the gateway fine from the Centos box, I can Ping www.google.com and the dns server by I.P address. When I run dig google.com it produces results and yum-update enabled me to update the system. So DNS is working fine.
The snag I am now having is I cannot ping another host or I have another host when DHCP was enabled on the Centos box I could ping between both and could access the Centos machine via SSH. Firewall has been configured on the host machine to accept ICMP
IP details are correct and the gateway is set correct.
further troubleshooting check route?
ifcfg-eth0
DEVICE=eth0
BootPRO=Static
IPADDR=192.168.1.255
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
ONBOOT=YES
DNS1=192.168.1.200
DNS2=8.8.8.8
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=AKIRA
GATEWAY=192.168.1.254
results of route
Destination gateway Genmask flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 V 0 0 eth0
link-local * 255.0.0 V 1002 0 eth0
default my.router VG 0 eth0
Re: Static I.P DNS does not work?
This now has been resolved
Changed I.P address, and temporarily disabled Windows Firewall seems like I have to add allow ICMP echo on the Windows Firewall to allow Ping Requests before could only ping one way from the Windows Host to server any Ping request leaving the Linux side would get blocked by the firewall.
Issue resolved :-) good learning process though thank for helping a noob out you can change this thread to solved now :-)
Changed I.P address, and temporarily disabled Windows Firewall seems like I have to add allow ICMP echo on the Windows Firewall to allow Ping Requests before could only ping one way from the Windows Host to server any Ping request leaving the Linux side would get blocked by the firewall.
Issue resolved :-) good learning process though thank for helping a noob out you can change this thread to solved now :-)
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: [SOLVED] Static I.P DNS does not work?
Thank you for reporting back.
As requested and for posterity, this thread is now marked [SOLVED].
As requested and for posterity, this thread is now marked [SOLVED].