Virtual Machine CentOS 6 is connected to external networks

1. Click Edit to open the Virtual Network Editor, you can set the subnet
Virtual Machine CentOS 6 is connected to external networks

2. modify the network configuration
method of a (temporary): use the command to assign a temporary IP address to NIC
#ifconfig eth0 192.168.10.10 netmask 255.255.255.0 up

Method 2 (permanent): Open the network profile
# [the root @ localhost ~] # VI / etc / sysconfig / Network-scripts / the ifcfg-eth0
Virtual Machine CentOS 6 is connected to external networks
the IP address for the subnet within the range of the first step, HWADDR to the card and the same physical address.

Then, restart the network services:
# [root @ localhost ~] # Service Network restart

After the completion of the network can be connected to the external
Virtual Machine CentOS 6 is connected to external networks

ps: three modes Detailed network connection
Virtual Machine CentOS 6 is connected to external networks

Bridge Mode: the equivalent of between physical hosts and virtual machine network card to set up a bridge, allowing access to the Internet through the network card physical host.

NAT Mode: VM virtual machine network services play a role in a router, allowing the host virtual machine software can simulate the physical host by the Internet, the physical network adapter in the physical machine corresponding virtual machine NIC NAT is VMnet8.

Only the host mode: only for the host to physical host and communication within the virtual machine, not the Internet, the physical machine physical machine network adapter card only host mode simulation corresponds VMnet1.

Guess you like

Origin blog.51cto.com/14529928/2481510
Recommended