In virtualization environment as Hyper-V or VMware, if we create a VM disk and its type has a parent-child relationship with another disk, maybe we will find out the original network card will disappear after boot VM next to use /sbin/ifconfig command.
When this scenario happens, we have to realize whether the first or others Ethernet network interface card or NIC exist in the system so that use ls /etc/sysconfig/network-scripts command. (#1)
If it exists we will go to the next steps to confirm something.If it non-exists we have to create network interface. To create a file by using vi /etc/sysconfig/network-scripts/ifcfg-eth0 command and add some word as follows: for getting dynamic IP for setting static IP (# 1)End if
Of course, we also have to confirm whether the duplicated content in the /etc/udev/rules.d/70-persistent-net.rules file exist the wrong network card mapping to MAC.In general, we just need to delete the first row and change NAME’s value from eth1 to eth0 at the second rowThe final result is as follows:
By add or modify the content in the /etc/sysconfig/network file, we can specify the network configuration as Networking should be configured, hostname set FQDN, set the network gateway and so on.
By using chkconfig network on command, we will configure the system to automatically start the network function when the system startup.
Finally, please reboot itAfter log on the system, the network function will be normal now.
Reference :
(# 1) In installing Linux Integration Services on Hyper-V 3.0, we can realize whether the network module is loaded successfully by using lsmod | grep vsc command.
(# 2) About name server setting in CentOS 6.3, we don’t need to add or modify the content in /etc/resolv.conf file because it need to set in the /etc/sysconfig/network-scripts/ifcfg-eth0 file.
If we still do it in /etc/resolv.conf file, the name server setting will disappear after reboot the system.
As to PEERDNS=no or PEERDNS=yes in the /etc/sysconfig/network-scripts/ifcfg-eth0 file, it don’t influence anything in my testing lab.
沒有留言:
張貼留言