Linux virtual machines access the Internet in NAT Mode

Source: Internet
Author: User

Linux virtual machines access the Internet in NAT Mode

Linux virtual machines access the Internet in NAT Mode

1. Configure the local VM8 address

2. configure the Virtual Machine nat nic: Set the VM8 NIC address to the same CIDR block as the Linux host, gateway casually set 3, compile the NIC file vim/etc/sysconfig/network-scripts/ifcfg-eth0 main configuration is as follows:
12345 IPADDR=192.168.200.5 // The IP address and the VMnet8 IP address are in the same CIDR block.NETMASK=255.255.255.0 // Subnet MaskGATEWAY=192.168.200.2 // Select the gateway address in the WMware network editor. DNS1=192.168.1.1 // The IP address of the primary DNS server is the real gateway of the host in windows.
12345678910111213141516171819 Nic configuration file    /etc/sysconfig/network-scripts/ifcfg-Eth0 content        DEVICE=Eth0 device name        HWADDR=00:0c:29:ac:95:0cPhysical address of the device        NM_CONTROLLED=No. whether to use NetworkManager to manage network interfaces. The default value is yes.        ONBOOT=Yes whether to enable the network interface when the system or network service is started. The default value is no.        IPADDR=192.168.1.1Define IP addresses        NETMASK=255.255.255.0Define Subnet Mask        TYPE=The Ethernet network type is Ethernet.        BOOTPROTO=How to obtain the none IP Address            None does not use any startup Protocol            Dhcp uses the dhcp protocol as the startup protocol and obtains the IP address through the dhcp server.            Use static IP addresses        IPV6INIT=No. IPv6 Configuration supported        USERCTL=No. allows normal users to control the network interface        GATEWAY=192.168.1.254Default gateway address        DNS1=222.222.222.222Specifies the DNS server address that the host can find        DNS2=202.99.166.4        DNS3=202.99.160.68

This article permanently updates the link address:

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.