Adding a name server to resolv.conf does not work

Issues related to configuring your network
Post Reply
ashwin
Posts: 1
Joined: 2013/06/07 09:42:55
Contact:

Adding a name server to resolv.conf does not work

Post by ashwin » 2013/06/07 10:02:17

Hellow,

I tried to solve this in my own but had no luck. So thought of posting on this forum. This is the problem

When I add my name server to /etc/resolv.conf names does not get resolved

output of /etc/resolv.conf file

search Mydomain.local
nameserver 192.168.0.12

but when I add DNS server to ifconfig file host names get resolved correctly

output of ifcfg-eth0

DEVICE=eth0
HWADDR=00:24:E8:C8:AF:3D
IPADDR=192.168.10.34
NETMASK=255.255.255.0
GATEWAY=192.168.10.254
DNS1=192.168.0.12
TYPE=Ethernet
UUID=521f567e-a34d-42ac-933e-4cd70997989b
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static

Any idea why this happens....?

dejanst
Posts: 124
Joined: 2011/09/20 14:13:13

Re: Adding a name server to resolv.conf does not work

Post by dejanst » 2013/06/11 14:53:56

That is strange, this never failed for me.

Are you running Network Manager?

moonpup
Posts: 118
Joined: 2008/11/20 20:38:18

Adding a name server to resolv.conf does not work

Post by moonpup » 2013/06/13 01:09:58

Is this host a server? If so, disable NetworkManager... as it was really designed for laptop use (example roaming wireless) and not a server which is typically configured with a static ip. To this day it boggles my mind as to why Red Hat includes this on a server image. In my opinion it should not be installed period, but since they insist on putting it in, it should at least be disabled by default. OK, enough of my rant...

Disable NetworkManager - chkconfig NetworkManager off

Stop NetworkManager - service NetworkManager stop

Change the NM_CONTROLLED=yes to no and save file

Restart networking - service network restart

Post Reply