Can't get /etc/resolv.conf to configure after reboot
Posted on 2016-10-13
This is a redhat Linux server 6.3.
when I reboot the resolv.conf file has no dns servers listed.
I have a number of VLANs attached to a single interface. they are set up as ifcfg-eth0:1 through 6
According to the docs I've read the interface config should look something like this:
It states that in order for resolv.conf to be set up your have to have PEERDNS set to yes and DNS1 and DNS2 set up in the config file.
which I have done.
In the VLAN files I have tried setting PEERDNS to no for all of them and then to yes for all of them. But it still doesn't set up resolv.conf properly.
If looked at the ifup_post script and it looks like it should have done something but I haven't tried debugging them. I'm working remotely so if I mess up the network scripts, I might not be able to get on.
in the resolv.conf part of the ifup_post script it creates a backup copy of the resolv.conf file. That backup copy does exist in /etc so that leads me to suspect it's running through the right part of the script. The really weird thing is, the backup copy has two lines in it for name servers that are not the ones that I use. They come from an alternate datacenter that we use for other applications.
I've grepped all the files in /etc to see if the ip address exists in any of the files, but nothing showed up.
Not sure what to do next.