Wednesday, August 8, 2012

Importance of configuring ifcfg-ethX properly to resolve DNS

I have an interesting problem today. I have configured my compute nodes to access the public network via the head node as the gateway. A good tutorial can be found from
Using iptables to allow compute nodes to access public network from Linux Cluster Blog.


Occasionally, 1 or 2 nodes will not be able to resolve even though /etc/resolv.conf is configured correctly. It seems that only after putting in the localised DNS at /etc/sysconfig/network-script/ifcfg-ethX at the compute node, it was able to resolve.

DEVICE=eth0
BOOTPROTO=static
HWADDR=E4:1F:13:CC:51:54
ONBOOT=yes
HOTPLUG=no
IPADDR=192.168.5.17
NETMASK=255.255.255.0
GATEWAY=192.168.5.1
DNS1=155.1.1.2
DNS2=155.1.1.3
PEERDNS=yes

I suspect it could be due to the multiple NIC with multiple network segment issues and localised DNS resolution at network level.

Take a look at  Redhat Document 8.2 Interface Configuration Files


No comments: