1th Step
After Fedora is installed on the virtual machine, open the VM's menu bar, click Edit------Virtual Network editor, select the "Host Virtual network Mapping" tab, and then manually select the VMnet0 as your local physical network card ( to select the network card you are using, For example, your computer has a wireless card, a wired network card; you are now using a wireless network, then bridge to the wireless card, if you are now using a wired network card, then bridge to the wired network card ), do not choose automatic settings. then click OK.
2nd Step
Enter the virtual machine's operating system, open HyperTerminal, enter Ifconfig eth0, and check the Eth0 network settings.
It is important to determine whether the virtual machine and host are in the same network segment. If the host IP is 192.168.0.2, then the IP address of the virtual machine should be from 192.168.0.1 to 192.168.0.254. The most important step is to set the virtual machine's gateway to the physical IP address of the Cheng host. This is important, many people do not have a virtual machine network and this is related to the host's IP as a virtual machine gateway.
3rd Step
Set up Linux under the host system and virtual machines.
1) Close the host's firewall;
2) Shut down the virtual machine's firewall;
# chkconfig iptables off//reboot effective, permanently off
#/etc/init.d/iptables Status//can view firewall state
3) Turn off SELinux for the virtual machine;
# Vi/etc/selinux/config//change selinux=enforcing to selinux=disabled//save exit, restart effective, permanently close
# Getenforce//can view SELinux status.
4th step
Test if the settings are set to take effect
1) Host ping virtual machine eth0 network card IP//does not explain the virtual machine under the firewall or SELinux does not shut down
2) The virtual machine ping host IP//does not explain the host under the firewall is not shut down
3) can ping with each other, the setup is complete. enjoy!!
If you still have a problem, check to see if the firewall is set up, and think about some of the actions that need to be restarted for restart. Generally do this, there will be no problem. Start the virtual machine again at this time. should be able to surf the Internet. For users using Dial-Up Networking, the host and virtual machines can only be online at the same time.
Note:The most important step is to set the virtual machine Gateway Cheng host physical IP Address ", 1, this can also set the virtual machine gateway Cheng The host IP configuration of the gateway, 2, and the virtual machine's DNS settings should also be equipped with Cheng host IP configuration of the gateway.
about 1, so Sisu network is can speed up, about 2, if not set, is not access to the external network of the jump page, because similar to www.baidu.com IP every time you ping, are different. So the virtual machine should be equipped with DNS.
The following describes the DNS configuration method:
1. Configure DNS
Vi/etc/resolv.conf
Join:
nameserver 192.168.0.1 nameserver 8.8.8.8nameserver 8.8.4.4
2. Configure the Gateway:
Vi/etc/sysconfig/network
Join:
gateway=192.168.0.1
Complete the following:
networking=yeshostname=localhost.localdomaingateway=192.168.0.1
3, configure the IP address:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
The contents are as follows:
Device= "eth0" hwaddr= "00:0c:29:6c:bb:e6" nm_controlled= "yes" onboot= "no" netmask=255.255.255.0ipaddr= 192.168.0.8gateway=192.168.0.1bootproto=staticonboot=yespeerdns=yes
4, restart the service:
/etc/init.d/network Restart or use command: Service network restart or: Ifdown eth0 and Ifup eth0
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
CentOS Virtual Machine Bridging configuration