Slime: VMWare workation dual NIC configuration IP address

Source: Internet
Author: User
Tags traceroute command

This article is sponsored by Ilanniweb, starting in Slime Line the world

Want to get more articles, you can follow my ilanniweb

A few days ago to a client to do remote project implementation, the client side of the server is the Windows OS, our side of the business requires the Linux OS, so the installation of VMware under Windows OS.

However, when you configure the VM's IP address, you encounter a problem with the dual NIC configuration IP address. Host is a dual network card, a network card connected to the intranet, a network card connected to the external network.

After groping finally to configure the VM dual NIC on the IP address of the thing done, the following records the approximate configuration process.

The IP addresses of the PS:VM two NICs are 192.168.0.90, 192.168.3.250.

Where 192.168.0.90 is the intranet address, 192.168.3.250 is the address of the external network.

the 192.168.33.250 involved in this article is the remote machine IP address of the leased line connection .

First, view the host's network card and IP

First, we look at the host's two NIC and its corresponding IP address. As follows:

through, we can see the host's two network card, under the Windows OS Display is local Area Connection and Local Area Connection 2, where the local connection is the external network card configuration, as follows:

Local Connection 2 is the intranet network card configuration, as follows:

Note: The description of the local connection is Yukon, and the description of local connection 2 is I217-LM.

Below we begin to configure the NIC and IP of the VM.

Second, configure the VM NIC and IP

To configure the VM NIC and IP address, first we reconfigure the VMware NIC as follows:

VMware's VMnet0 bridge is connected to the host's local connection, which is the external network card.

Then we add a new Nic VMnet2, and the VMnet2 Bridge to the host's local connection 2, that is, the intranet network card.

After the VMware two Nic is added, we configure the NIC for the VM as follows:

VMNET0 External Network network card to the MAC address of the VM NIC should be: 00:0c:29:3c:78:41.

VMnet2 External Network network card to the MAC address of the VM NIC should be: 00:0c:29:3c:78:4b.

When the above configuration is complete, we begin to configure the VM's eth0 and eth1 Nic, as follows:

In this VM the Eth0 NIC is configured as an extranet IP address, corresponding to the VMware VMnet0 NIC, the gateway is 192.168.3.1.

eth1 network card configuration within the intranet IP address, corresponding to the VMware VMnet2 network card, Gateway is 192.168.0.1.

Now we log in to the VM to test connectivity with the extranet, as follows:

Through, we can easily see that the VM and the external network communication is normal.

Now we switch to the host and test the VM's network connectivity to the host, as follows:

Through, we can easily see that the VM communicates with the host is normal.

In combination with the above we can clearly see that the dual NIC configuration of VMware has been successful.

configuring static routes for VMS

For the VM dual NIC configuration, we will find in the actual use process, if the remote host and the VM dual network interface communication, is unable to communicate, so our problem comes.

How do I get a remote host to communicate with the VM?

In fact, we just need to configure a static route to the remote host on the VM.

Here is an example where the IP address of the remote host is 192.168.33.250.

Now let's add a static route to the VM, as follows:

Route add-net 192.168.33.0/24 GW 192.168.0.1 Dev eth1

This command means that all packets that need to be sent to the 192.168.33.0/24 network are forwarded through the 192.168.0.1 Gateway and are forwarded through the ETH1 network card.

Of course, if we want to remove the static routes that have been added, you can use the following command:

Route del-net 192.168.33.0/24 GW 192.168.0.1

After the static route has been added, we can trace the path to the remote host via the traceroute command on the VM as follows:

Traceroute 192.168.33.250

For CentOS, if you do not have the traceroute command installed, you can install it using the following command:

Yum-y Install Traceroute

With this, we can easily see that the first route from the VM to the remote host 192.168.33.250 is 192.168.0.1, which exactly matches the static route we just configured.

Next we switch to the remote host, the remote host is Windows OS, we can use the tracert command to trace to the path of the VM, as follows:

Tracert 192.168.0.90

Slime: VMWare workation dual NIC configuration IP 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.