15, wrote a blog: VMware network settings Bridged is also about Linux under the VMware Bridge mode, static IP sisu network configuration, but at that time more is to use the graphical interface to achieve, the versatility is not strong. Production environment, very few Linux installation graphical interface. Even the original blog is not modified, a re-article won. Here I am using CentOS6.5 's minimal system to demonstrate. Currently, because CentOS belongs to the Red Hat family, the approach described in this article applies to the Linux network configuration of the Redhat series.
First, the bridge mode VMware settings:
Vmware-> "edit" and "Virtual Network edit"
Second, the bridge mode virtual machine settings:
Third, the bridge mode setting static IP address
A virtual machine configured as a bridge network connection mode is considered as part of the Ethernet of the host, and the relationship between the virtual system and the host machine, like two computers connected to the same hub, can access all the shared resources and network connections in the Ethernet as a host. You can access the Internet directly by sharing the Internet access line of the host network. You can exchange visits between the host and the virtual machine, as well as between the virtual machines. The corresponding virtual machine is considered as an independent physical machine on the host Ethernet, and the virtual machine is connected with the host Ethernet through the default VMNET0 network card, and the virtual network between virtual machines is VMnet0. Your virtual machine is like a standalone physical machine in a local area network. The operating system in the virtual machine can ping the other host, which in turn can ping the virtual machine. To make them communicate with each other, you need to configure the IP address and subnet mask for the virtual system, or you will not be able to communicate.
So before I configure, I want to take a look at the IP address of the physical host: (I am here the physical host with WiFi card WiFi internet access)
1. Ipconfig view the IP address of the physical host (the IP address of the network card used by the Sisu network)
2. Set the IP address of the Linux virtual machine according to the IP address of the physical host:
vim/etc/sysconfig/network-scripts/ifcfg-Eth0device=eth0 #虚拟机网卡名称. TYPE=Ethernetonboot=Yes #开机启用网络配置. nm_controlled=Yesbootproto= static #static, and instead of DHCP, the IP address is automatically obtained . IPAddr=192.168.31.77 #设置我想用的静态ip地址 to the same network segment as the physical host, but not the same. NETMASK=255.255.255.0 #子网掩码, just like a physical host. Getway=192.168.31.1 #和物理主机一样DNS1=8.8.8.8 #DNS, to write Google's address on it. HWADDR=xx: 0c: in: A: to: 4cipv6init=Nouserctl=no
I use Xshell to connect to Linux, so it looks more clear:
Restart Network Service:
[Email protected] ~]# service network restart
3. Add the gateway address in the network profile/etc/sysconfig/network.
[Email protected] ~]# vim/etc/sysconfig/networknetworking=yeshostname=Xiaolyu77gateway =192.168. 31.1 #网关地址, the gateway address of the same physical host
4. Test:
1) Virtual Machine Ping Physical host:
[[email protected] ~]# Ping 192.168.31.160
2) Physical host ping virtual machine
C:\users\administrator>ping 192.168.31.77
3) Virtual machine Test External network:
[[email protected] ~]# Ping www.baidu.com
OK, get it done!
VMware Bridge mode under CentOS, static IP sisu Network