Use the bridge to connect to the Internet, you need to configure the Linux system IP, the following steps:
1, in the command line mode or desktop access to terminal mode, find/etc/sysconfig/network-script/ifcfg-eth0 file;
2, using VI to open the file VI ifcfg-eth0, note that some Linux system this file may not have ifcfg prefix.
3, need to change:
Bootproto=static
#默认是dhcp, automatic acquisition, automatic acquisition needs to change the network mode bridge mode
Need to add:
ipaddr=192.168.1.10 #地址是自己设置的
netmask=255.255.255.0
After you modify it, save the exit.
Days in other friends computer copy a redhat system, deploy to the VMware virtual machine, even do not connect the Internet, through the ifconfig command, view the results, as shown in the figure:
Then I want to try and ping the local physical machine address in the virtual machine, as shown in the figure.
Tried a lot of ways, spent 2 hours of Kung Fu. Finally found the reason.
The following are my steps to solve the problem, to share it, to help you solve the problem as soon as possible, with the same compatriots who have encountered this problem.
To sum up, there are 4 main steps:
1, use Chkconfig iptables off the Linux system firewall, and ensure that Windows Firewall shut down.
2, change the default "Nat link" in the Network option to "Bridge link", as shown in the figure.
3.root User Login, modify network configuration file, command as follows
[Root@zb ~]# Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Then, in window through cmd > ipconfig you can see "Ethernet Adapter VMware network Adapter VMnet8:" IP Address "192.168.139.1"
Modify the configuration file according to the IP address of the image above, and the Red section modifies the content.
Device= "eth0" bootproto= "static"//statically set IP, below configure BROADCAST=192.168.253.255//Broadcast address *IPADDR=192.168.139.1*//IP address, manually specified, Avoid dynamically allocating netmask=255.255.255.0//Subnet masks network=192.168.253.0//network number *gateway=172.18.8.254*/Gateway hwaddr= "00:0c:29:8d:0 7:8e "nm_controlled=" yes "onboot=" yes "/" After the system starts, automatically starts the NIC type= "Ethernet" uuid= "73869271-EDC7-45A1-BBC7-1691AF066AE2"
4, after the completion of the modification, do remember that there is a step to restart the service.
[ROOT@ZB ~]# service Network Restart
After a successful reboot, the test effect is shown in figure:
Test results, using Ifconfig view, as shown in the following illustration, to successfully display the Internet address:
Congratulations, everyone.