Linux systems in VMWARE10 access to the extranet configuration using NAT network connection

Source: Internet
Author: User

First, describe

There are three common ways to connect to your network in VMWARE10:
1, Bridge: This is the simplest way, directly bridge the virtual network card to a physical network card, and Linux next network card binding two different address similar, in fact, the network card is set to promiscuous mode, so as to achieve the ability to listen to multiple IPs.
in this mode, the inside of the virtual Machine network card (for example, Linux under the eth0) directly connected to our real physical network card is located on the Internet, the equivalent of virtual machines and real hosts in the peer position, in the network relationship is equal, no one who behind the problem. using this method is very simple, if you have more than 1 IP addresses, this is not suitable for use.
2, Nat mode: In this way the host has a virtual network card Vmnet8 (by default), this vmnet8 is equivalent to the network card connected to the intranet, and the virtual machine itself is the equivalent of running the machine on the network, the Virtual Machine network card (eth0) independent of the Vmnet8.
in this way, VMware's own DHCP is loaded into the Vmnet8 interface by default, so that the virtual machine can use the DHCP service, and VMware has its own NAT service, which provides address translation from the Vmnet8 to the extranet.  In this case, a real NAT server is running, just for a virtual machine, and for a situation where there is only one extranet address.
3, Hostonly: This way isThe most flexible, unlike NAT, is that there is no address translation service in this way, so by default, virtual machines and hosts are accessing each other. By default, there will also be a DHCP service loaded onto Vmnet1, as long as the configurationVMNET1 network card can be.

Second, use the NAT connection mode to access the extranet configuration

Step 1: Open the Network Sharing center and configure the network parameters for Vmnet8


Click VMnet8, and then click Properties to pop up the following dialog box:


Select the IPV4 protocol, then click Properties, configure the appropriate IP address and subnet mask, where you can configure any network segment, and then click the OK button.


Step 2: View the specific IP address of the Windows host, start-->cmd---> enter ipconfig in the Command line window


Here set the VMNET8 network parameters as above: ip:192.168.200.1 Mask: 255.255.255.0

Step 3: Configure the network parameters in VMware, in the VMware menu bar, click the "Edit" button, select "Virtual Network Editor", in the popup dialog box to configure the following:


Click the NAT Settings button on the right, and set up the network in the popup dialog, where the subnet must be in the same network segment as the VMNET8 IP address in the Windows host, that is, the 192.168.200.0 network segment


The gateway here can select any IP address in the same network segment of the VMNET8 IP address in the Windows host and click OK.

Step 4: Open the host in VMware and configure the virtual machine's IP, the configuration method can use the command line or the way of the graphical interface, here we use the command line to configure the static IP address

The path to the configuration file is::/etc/sysconfig/network-scripts/ifcfg-eth0 file, using the VI Editor to modify the configuration file as follows:

[Email protected] ~]$ cd/etc/sysconfig/network-scripts/

[Email protected] network-scripts]$ VI ifcfg-eth0

Device=eth0
Type=ethernet
Uuid=6b218dfa-ff8e-4455-be44-ffdfd95ccefb
Onboot=yes
Nm_controlled=yes

ipaddr=192.168.200.5
Bootproto=none

netmask=255.255.255.0
gateway=192.168.200.2

Prefix=24
Defroute=yes
Ipv4_failure_fatal=yes
Ipv6init=no
Name= "System eth0"
hwaddr=00:0c:29:85:fc:09
dns1=192.168.1.1
last_connect=1428687041

The main configuration is as follows:

ipaddr=192.168.200.5//IP address and VMNET8 IP address on the same network segment
NETMASK= 255.255.255.0//Subnet mask
< Span style= "font-family:arial; font-size:18px; line-height:26px; White-space:pre ">gateway=192.168.200.2//Gateway Select your gateway address in WMware's network editor

dns1=192.168.1.1//Primary DNS server IP address for host real gateway in Windows


Linux systems in VMWARE10 access to the extranet configuration using NAT network connection

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.