Linux Virtual Machine nat-based Internet access settings

Source: Internet
Author: User

You can set up a new IP address in the LAN to connect to the network through bridging.
In the NAT Mode settings, pay attention to the gateway settings.
1. Select the NAT mode for the VMware network connection.

2. In "edit"> "Virtual Network Settings" of VMware, check that the IP address of the gateway corresponding to vmnet8 In the NAT label is 192.168.83.2.

Note that the gateway IP address and the subnet IP address (192.168.83.0) are different. For virtual machines, you must refer to Nat setting to set the gateway IP address.

Instead of subnet IP. Otherwise, the VM cannot connect to the Internet. When you try to ping an Internet address such as Sina, the network is unreacheable error may occur.

3. Check any network connection in windows. You should find that vmnet1 and vmnet8 are added in addition to the original Nic. Vmnet1 is the hostonly interface, while vmnet8 is the NAT Network Interface we want to use.

4. Check the network configuration of vmnet8 in windows. its IP address is automatically set to 192.168.83.1 and the gateway is empty.

5. Set the network IP address and gateway in Linux and the IP address of the same network segment as vmnet8. Set the gateway to 192.168.83.2. In Linux, the gateway settings are the same as those in windows. Practice has proved that setting/etc/Network/interfaces with DHCP is not feasible.
Restart the Linux network service or restart the NIC.

Finally, Ping An Internet IP address and route-N for verification.

The routing table should have more than two route records.

Http://bjyzxxds.javaeye.com/blog/584477

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.