Rotten mud: VMWare Workation dual Nic configuration IP address, vmwareworkation

Source: Internet
Author: User
Tags traceroute command

Rotten mud: VMWare Workation dual Nic configuration IP address, vmwareworkation

This document consistsIlanniwebProviding friendship sponsorship, first launchedThe world

For more articles, follow my ilanniweb

A few days ago, we performed remote project implementation for a customer. The server on the customer side is Windows OS, and the business operation on our side requires linux OS. Therefore, we installed VMWare on Windows OS.

However, when configuring the IP address of the VM, you may encounter the problem of configuring the IP address of the dual Nic. A host is a dual-nic. One Nic is connected to the Intranet, and one Nic is connected to the Internet.

After groping, we finally completed configuring the IP address for the VM dual Nic on VMWare. The following describes the general configuration process.

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

192.168.0.90 indicates the Intranet address and 192.168.3.250 indicates the Internet address.

In this article, 192.168.33.250 is the IP address of the remote machine connected to the leased line.

1. view the NIC and IP address of the host

First, let's check the IP addresses of the two NICs of the host machine. As follows:

We can see two NICs of the host machine. In Windows OS, local connection and local connection 2 are displayed. The local connection is configured as an Internet Nic, as shown below:

Local Connection 2 is configured as an intranet Nic, as shown below:

Note: The description of local connection is Yukon, while that of local connection 2 is I217-LM.

Configure the NIC and IP address of the VM.

2. Configure VM Nic and IP

To configure the VM Nic and IP address, we need to reconfigure the NIC of VMWare as follows:

The VMnet0 Bridge of VMWare is connected to the local host machine, that is, the Internet Nic.

Then we add a new network card VMnet2, and connect the VMnet2 bridge to the local connection 2 of the host machine, that is, the Intranet network card.

After adding the two NICs of VMWare, We will configure the NICS for the VM as follows:

The MAC address of the VM Nic for the VMnet0 Internet Nic is: 00: 0C: 29: 3C: 78: 41.

The MAC address of the VM Nic for the VMnet2 Internet Nic is: 00: 0C: 29: 3C: 78: 4B.

After the above configuration, we start to configure the eth0 and eth1 NICs of the VM, as shown below:

In this VM, The eth0 Nic is configured as an Internet IP address, corresponding to the VMnet0 Nic of VMWare, And the gateway is 192.168.3.1.

Eth1The Intranet IP address configured for the NIC corresponds to the VMnet2 Nic of VMWare, And the gateway is 192.168.0.1.

Now we log on to the VM to test the connectivity with the Internet, as shown below:

Through this, we can easily see that the VM communicates normally with the Internet.

Now we switch to the host machine to test the network connectivity between the VM and the host machine, as shown below:

Through this, we can easily see that the VM can communicate with the host machine normally.

Based on the above, we can clearly see that the dual Nic configuration of VMWare has been successful.

3. Configure static routes for VMS

During the actual use of the VM dual Nic configuration, we will find that the remote host cannot communicate with the VM dual Nic, so we have a problem.

How can remote hosts communicate with the VM?

In fact, it is very simple. We only need to configure a static route to the remote host on the VM.

In this example, the IP address of the remote host is 192.168.33.250.

Now we can add a static route to the VM, as shown below:

Route add-net 192.168.33.0/24 gw 192.168.0.1 dev eth1

This command means to forward all data packets sent to the CIDR Block 192.168.33.0/24 through the 192.168.0.1 gateway and forward the packets through the eth1 Nic.

If you want to delete a static route that has been added, run the following command:

Route del-net 192.168.33.0/24 gw 192.168.0.1

After adding a static route, we can track the path of the remote host through the traceroute command on the VM, as shown below:

Traceroute 192.168.33.250

For centos, if the traceroute command is not installed, run the following command to install it:

Yum-y install traceroute

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 will switch to the remote host. The remote host is Windows OS. We can use the tracert command to track the path of the VM, as shown below:

Tracert 192.168.0.90

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.