Virtual machine environment: virtualBox virtual environment redhat 32-bit
Host environment: win7 wireless router
Mode: host-only
The original setting of the NAT mode under win7 was based on the situation where there was a network cable connection. After using wireless routing, the virtual machine and the host could not communicate, so the host-only mode was reconfigured.
For an introduction to virtualBox mode, refer to http://blog.sina.com.cn/s/blog_7de9d5d80100t2uw.html. The following is my configuration.
1 First enable the wireless routing network card to enable Internet connection sharing, and select "Home Network Connection" as the Host-Only network card of the virtual machine. At this time, the IP address of the Host-Only network card will be automatically set. is 192.168.56.1
2. Open VirtualBox, select Management - Global Settings - Network, click the screwdriver button on the right, select the DHCP Server tab in the pop-up window, cancel the 'Enable Server' option, save and exit.
3. Configure the network options of the virtual machine that needs to access the Internet, select the connection method as "Host-Only Adapter", the name is generally only one "VirtualBox Host-Only Ethernet Adapter", select it.
4. Start the virtual machine and set up the virtual machine network. The IP address is set to a different address in the same network segment (192.168.56.*), and the gateway is set to the IP address in the Host-Only network card, which is generally 192.168.56.1.
5. Turn off the win7 firewall and linux firewall, and test pinging each other.
Reference:
http://blog.sina.com.cn/s/blog_7de9d5d80100t2uw.html
http://blog.sina.com.cn/s/blog_69a9b4140100u3vg.html