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:

650) this.width=650; "title=" clip_image001 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image001 "src=" http://s3.51cto.com/wyfs02/M02/8B/AB/ Wkiom1ht-mgyav5daaemgxqhr0q116.png "Width=" 702 "height=" 265 "/>

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:

650) this.width=650; "title=" clip_image002 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image002 "src=" http://s3.51cto.com/wyfs02/M01/8B/AB/ Wkiom1ht-moa7ljbaahfjjvc2aw066.png "width=" 648 "height=" 253 "/>

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

650) this.width=650; "title=" clip_image003 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image003 "src=" http://s3.51cto.com/wyfs02/M01/8B/A7/ Wkiol1ht-meifnk1aagmogtvooc847.png "width=" 541 "height=" 219 "/>

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:

650) this.width=650; "title=" clip_image004 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image004 "src=" http://s3.51cto.com/wyfs02/M02/8B/A7/ Wkiol1ht-iwhr8kkaadi_dt_tha891.png "width=" 404 "height=" 215 "/>

650) this.width=650; "title=" clip_image005 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image005 "src=" http://s3.51cto.com/wyfs02/M00/8B/AB/wKiom1hT-iaR_ Luiaaf6wdvox6q597.png "width=" 560 "height=" 365 "/>

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.

650) this.width=650; "title=" clip_image006 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image006 "src=" http://s3.51cto.com/wyfs02/M01/8B/AB/ Wkiom1ht-ifbsqgzaagfgwpixtg429.png "width=" 562 "height=" 361 "/>

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

650) this.width=650; "title=" clip_image007 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image007 "src=" http://s3.51cto.com/wyfs02/M02/8B/AB/ Wkiom1ht-i6bmhkpaahwub0qzwk478.png "width=" 686 "height=" 376 "/>

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

650) this.width=650; "title=" clip_image008 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image008 "src=" http://s3.51cto.com/wyfs02/M00/8B/AB/ Wkiom1ht-jdahnz9aag9ky0buji851.png "width=" 671 "height=" 372 "/>

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:

650) this.width=650; "title=" clip_image009 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image009 "src=" http://s3.51cto.com/wyfs02/M01/8B/AB/wKiom1hT-jTS_ Ekkaad0lm1jqha318.png "width=" 675 "height=" 252 "/>

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:

650) this.width=650; "title=" clip_image010 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image010 "src=" http://s3.51cto.com/wyfs02/M01/8B/AB/ Wkiom1ht-jwaxbokaahsolu2vts526.png "width=" 534 "height=" 211 "/>

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:

650) this.width=650; "title=" clip_image011 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image011 "src=" http://s3.51cto.com/wyfs02/M02/8B/A7/ Wkiol1ht-jabhghsaafzsqnkp94023.png "width=" 393 "height=" 192 "/>

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.

650) this.width=650; "title=" clip_image012 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image012 "src=" http://s3.51cto.com/wyfs02/M02/8B/AB/wKiom1hT-jiC_ H59aakc7mn-pkg983.png "width=" 554 "height=" 292 "/>

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

650) this.width=650; "title=" clip_image013 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image013 "src=" http://s3.51cto.com/wyfs02/M00/8B/AB/ Wkiom1ht-jmgvetlaadkstjrtrc986.png "width=" 537 "height="/>

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

650) this.width=650; "title=" clip_image014 "style=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" clip_image014 "src=" http://s3.51cto.com/wyfs02/M01/8B/AB/ Wkiom1ht-jqtsbhzaadopdx_eci675.png "width=" "height=" 238 "/>

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.