Hello Everyone,
I have 2 linux VM in my laptop that has been setup in similar way but one of them behaves differently every time it gets rebooted.
This is OEL6 update 5
I configured 4 interfaces:
eth0 - eth3 is setup with NAT-Network to be able to communicate with other VMs only.
eth4 is setup with bridged network.
I've configured the ifcfg-eth# scripts as follows:
Interface | server 1 | server 2 |
---|
eth0 | DEVICE=eth0 TYPE=Ethernet UUID=8cb50704-029f-469a-b031-da44b4a49b74 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=10.1.2.71 PREFIX=24 GATEWAY=10.1.2.1 DNS1=10.1.2.90 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" HWADDR=08:00:27:12:F8:42 LAST_CONNECT=1389967507 | DEVICE=eth0 TYPE=Ethernet UUID=f10e7ab5-7b7e-4bcf-9ddb-a2ab439a776a ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=10.1.2.72 PREFIX=24 GATEWAY=10.1.2.1 DNS1=10.1.2.90 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" HWADDR=08:00:27:45:56:13 LAST_CONNECT=1389968121 |
eth1 | DEVICE=eth1 TYPE=Ethernet UUID=568d8c14-d28e-48f7-82e5-dd7764968648 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=192.168.5.81 PREFIX=24 GATEWAY=192.168.5.1 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth1" HWADDR=08:00:27:B1:D9:D6 | DEVICE=eth1 TYPE=Ethernet UUID=dc09606a-5126-4d2c-a0bc-ea11ce0dc80f ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=192.168.5.82 PREFIX=24 GATEWAY=192.168.5.1 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth1" HWADDR=08:00:27:15:7B:39 LAST_CONNECT=1389968121 |
eth2 | DEVICE=eth2 TYPE=Ethernet UUID=6e6858b9-9709-4334-9b58-bb6f02a30e94 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none HWADDR=08:00:27:9C:16:71 IPADDR=192.168.7.51 PREFIX=24 GATEWAY=192.168.7.1 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth2" | DEVICE=eth2 TYPE=Ethernet UUID=283b2c5c-04e1-47ca-8375-6c52d333099f ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=192.168.7.52 PREFIX=24 GATEWAY=192.168.7.1 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth2" HWADDR=08:00:27:A8:44:45 LAST_CONNECT=1389968121 |
eth3 | DEVICE=eth3 TYPE=Ethernet UUID=ecca01b5-e18f-4f7f-b617-0cfe50e17638 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none HWADDR=08:00:27:5C:F8:96 IPADDR=192.168.9.51 PREFIX=24 GATEWAY=192.168.9.1 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth3" | DEVICE=eth3 TYPE=Ethernet UUID=9f2f8b5a-2650-412b-9d12-49de5484a877 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=192.168.9.52 PREFIX=24 GATEWAY=192.168.9.1 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth3" HWADDR=08:00:27:27:0F:F0 LAST_CONNECT=1389968136 |
eth4 | HWADDR=08:00:27:EC:60:F2 TYPE=Ethernet BOOTPROTO=none NM_CONTROLLED=no DEFROUTE=no PEERDNS=no PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no IPADDR=192.168.1.30 DNS1=192.168.1.90 NAME=eth4 UUID=6c6afa4f-48ce-47c7-9968-3419b4e5f8ea ONBOOT=yes LAST_CONNECT=1393844453 | HWADDR=08:00:27:FD:E7:7E TYPE=Ethernet BOOTPROTO=none NM_CONTROLLED=no DEFROUTE=no PEERDNS=no PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no IPADDR=192.168.1.31 DNS1=192.168.1.90 NAME=eth4 UUID=0ca62e7e-6770-45aa-a7a2-bca42cf3ed9c ONBOOT=yes LAST_CONNECT=1393849919 |
however, each time I rebooted, these are the difference on the /etc/resolv.conf and the other configuration
Config | Server 1 | Server 2 |
---|
/etc/resolv.conf | ; generated by /sbin/dhclient-script search wrx4.vm nameserver 10.1.2.90 nameserver 103.11.48.126 | # Generated by NetworkManager search wrx4.vm # No nameservers found; try putting DNS servers into your # ifcfg files in /etc/sysconfig/network-scripts like so: # # DNS1=xxx.xxx.xxx.xxx # DNS2=xxx.xxx.xxx.xxx # DOMAIN=lab.foo.com bar.foo.com nameserver 10.1.2.90 |
chkconfig --list NetworkManager | NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off | NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off |
service NetworkManager status | NetworkManager is stopped | NetworkManager is stopped |
I never setup any dhcp client configuration before, but each time the VM is rebooted or started it seems that the /etc/resolv.conf always gets overwritten again.
However, in Server 1, somehow the dhcp client is working and getting the right DNS server IP address.
What I want to achieve for the Server 2 is like the one in the Server 1 where the nameserver I got from the ISP is also configured there.
That will made it easier if I need to download just a small file from the internet.
Other than that, I also wanted to understand what other configuration that could affect this /etc/resolve.conf file gets overwritten, which configuration and how to configure it.
Thanks in advance for your help in advance.
Adhika
Message was edited by: Adhika W