1. network Connection mode: Select NAT2. edit the DNS configuration file/etc/resolv of the VM. conf set nameserver to the NAT gateway address in the VM [root@andes.com/etc] # catresolv. conf # Nonameserversfoun
1. network connection mode:
Select NAT
2. edit the DNS configuration file/etc/resolv. conf of the VM.
Set nameserver to the NAT gateway address in the VM.
[root@andes.com /etc]#cat resolv.conf # 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 192.168.59.2
3. edit the Nic configuration file:
/Etc/sysconfig/network-scripts/ifcfg-eth0, the focus is to set the IP address, set the IP address to the static mode, set the gateway, and then SecureCRT terminal login do not need to change the IP address frequently.
[root@andes.com /etc/sysconfig/network-scripts]#cat ifcfg-eth0 DEVICE="eth0" HWADDR="00:0C:29:27:F4:A8" NM_CONTROLLED="yes" ONBOOT="yes" IPADDR="192.168.59.133" GATEWAY=192.168.59.2 BOOTPROTO=static