[SOLVED] Static I.P DNS does not work?

Issues related to configuring your network
Post Reply
ally_uk
Posts: 24
Joined: 2012/06/08 15:17:52

[SOLVED] Static I.P DNS does not work?

Post by ally_uk » 2012/08/30 14:10:34

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

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

[SOLVED] Static I.P DNS does not work?

Post by gerald_clark » 2012/08/30 14:15:43

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.

ally_uk
Posts: 24
Joined: 2012/06/08 15:17:52

Re: Static I.P DNS does not work?

Post by ally_uk » 2012/08/30 14:30:19

Many Thanks will give this a try :)

ally_uk
Posts: 24
Joined: 2012/06/08 15:17:52

Re: Static I.P DNS does not work?

Post by ally_uk » 2012/08/31 13:14:49

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

ally_uk
Posts: 24
Joined: 2012/06/08 15:17:52

Re: Static I.P DNS does not work?

Post by ally_uk » 2012/08/31 14:18:14

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 :-)

User avatar
AlanBartlett
Forum Moderator
Posts: 9319
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: [SOLVED] Static I.P DNS does not work?

Post by AlanBartlett » 2012/08/31 18:29:52

Thank you for reporting back.

As requested and for posterity, this thread is now marked [SOLVED].

Post Reply