Steps:
1, the virtual machine in the toolbar-"settings-" network adapter: In the right network connection select bridged (bridge mode)--"OK
2, configure the network card IP address:
Start the virtual machine, open the file Ifcfg-eth0
The command is as follows:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
You can then set this parameter in the file:
Device=eth0 #物理设备名
ipaddr=192.168.1.12 #IP地址
netmask=255.255.255.0 #掩码值
network=192.168.1.0 #网络地址 (not available)
broadcast=192.168.1.255 #广播地址 (not available)
gateway=192.168.1.1 #网关地址
Onboot=yes # [Yes|no] (whether the device is activated at boot time)
Userctl=no #[yes|no] (whether the device can be controlled by a non-root user)
Bootproto=static #[none|static|bootp|dhcp] (non-use protocol at boot | static Assignment | BOOTP protocol | DHCP protocol)
--Note the "equal sign" on either side of the space, the parameter settings, please refer to their local IP settings
3. Configure Network card DNS:
Open File resolv.conf
The command is as follows:
Vi/etc/resolv.conf
Then set the DNS settings
dns1=202.96.209.5
dns2=202.96.209.133
And then it's OK.
Network bridged (bridging mode) settings in Linux systems in VMware: