[Guide] Use VMware Virtual Machine as LAN Router Between Two Networks

Jitendra, one of the readers of Sysprobs requested the below information with his home testing/lab environment scenario. Also, he sent his lab setup diagram. This small guide shows how to configure and use a virtual machine in VMware to act as a LAN router between two networks. This will be very helpful for learning purpose with a real-world scenario and even in a production environment to connect two separate networks. Instead of using a physical router or routing appliance, we will be using the Windows server service to connect two networks.

Update: This article originally published in the year 2011, since it has older versions of products such as Windows 2003 server and VMware workstation. But generally, these methods apply to any versions of the product at the moment, either it can be Windows 2019 server or latest Vmware workstation.

Here is the picture describing the current lab setup of Jitendra.  Even though one network switch is placed in the setup, but you can notice two networks in this setup.

1) 192.168.1.x/24

2) 192.168.2.x/24

Lab case

Our target is to make communication (let’s say ping and reply) between these two networks by using VMware virtual machine as a router between these networks.

Note – By adding another network IP address range as the secondary IP in each network adapter will help to make network communication when all devices connected to the same network switch. But, that will not be in a real-world practical environment and you may face issues while configuring domains, sites and DNS.

I don’t have more than two physical computers to demonstrate the exact scenario described in the above picture.

I have two physical computers.

1) Desktop computer with VMware workstation

2) Laptop

These two computers physically connected via network cable.

Desktop IP –
Subnet mask –

Laptop IP –
Subnet mask –

Obviously, these two devices can’t communicate now since both are in a separate network.

Important Note – Before doing anything, make sure Windows or other firewall programs are turned off or set to allow network connectivity.

Steps Involved in Using VMware Virtual Machine as a LAN Router between Two Networks

1) Add one more virtual network adapter to VMware virtual machine. Make sure that VM is having two network adapters and connected. Configure both network types to ‘Bridged Mode’, so Windows OS can communicate to both 192.168.1.x and 192.168.2.x networks.

Add 2nd network card

2) Configure each network adapter inside the virtual machine for each network. In my case, I configured one adapter to and the other one to

Configure two IPs - VMware Virtual Machine as LAN Router

Before going to the next step, test this network configuration by pinging from server to other network nodes on each network.

So, from Windows server virtual machine in VMware, I could ping to my desktop host ( and laptop host (, in the opposite direction, I could ping to Windows Server virtual machine from my Desktop and Laptop physical computers.

These steps make sure that the current network setup including bridged mode and two virtual network adapters are working fine.

3) Now go to ‘Routing and Remote Access’ under ‘Administrative Tools’ Windows server virtual machine. If you do not find this option or tool, you need to install the ‘Routing and Remote Access’ feature on the latest Windows Server Operating Systems such as 2016 and 2019.

Right-click on Server and select ‘Configure…’ option as shown below.

Start Routing Service

4) Press Next and select ‘Custom Configuration’.  Select ‘LAN Routing’ option and start the service at the end.

Select LAN Routing

5) That’s it, it will simply start the routing service in the server. Make sure your both network adapters are listed.

Listed two networks

6) Now, we need to configure the Windows server IP address as Gateway to other networked nodes.

All devices in 192.168.1.x network should have (Windows server IP) as the gateway and 192.168.2.x devices should have as the gateway.

desktop iplaptop host ip

7) Now all packets will be routed through Windows server routing services. I can ping to desktop ( from the laptop ( now. 

If you face any difficulties in about setup, disable and enable the physical network adapter where VMware workstation and the virtual machine is running.

The Windows server which is working as a virtual machine will act as the router to connect these two networks. Instead of doing any other tricks, we are using the proper Windows service to manage routing in this scenario. Typically, this method can be applied to the production environment on a physical or virtual server as long as you have more than two network cards and each of them connected to a separate network.

I hope this guide is helpful to use VMware virtual machine as a router to connect two networks in testing or production environment without using the real network router.

This method is applicable for all latest Windows servers that support ‘Routing and Remote Access’ feature. Also, this method can be used on Oracle VirtualBox and Hyper-V If you properly configure two network adapters in bridged networking type with the physical network.

If any of the above solutions did not fix the Windows PC issues, we recommend downloading the below PC repair tool to identify and solve any PC Issues.

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.

25 thoughts on “[Guide] Use VMware Virtual Machine as LAN Router Between Two Networks”

  1. Hai Dinesh
    Thansks for posting
    Sorry I have not yet tried because littel bit busy in my work, surely i will try it and give you update and if any doubts regarding this will mail you.

    • Hi, that was great. Ma question is how could you route between 2 VIRTUAL WORK STATIONS on one host when none is a server??? I want routing to take place on a LINUX workstation bridged to the host on one side and to a windows 7 on the other.

      will be greatful

      • Maybe somebody can help me.
        I have a mac which I want to connect to a home network.
        The mac has parallels installed to use XP for special software I use. Two other PC are on the network and files are shared. I need to access these files from the VM installed in Mac.
        Mac talks to internet OK, VM also talks to internet OK. Problem is VM and /or Mac cannot be seen on home network. Has anybody any ideas, Thanks

  2. This is exactly what I was looking for

    Very rarely we get to design and build a whole environment from scratch and sometimes forget the fundamentals…

  3. Hai Dinesh Jitendra Here

    I had tested yesterday night it working. On the server 2008 BOX, Now i have installed server2008srvr in my physical ADBOX on that i have installed vmware worstation and created one vm as router.

  4. Dear Friends,

    Can you Please assist me how to establish network communication between 3 networks… in VM Ware.

    My Problem is…

    1. Server 2003 Domain1.com having 2 NIC’s
    1 NIC : Private
    2 NIC : Globla

    2. server 2003 Domain2.com having 2 nic’s
    1 NIC : Private
    2 NIC : Global

    i need to establish network between these 3 networks..
    any client of Domain1 can able to ping Domain2 client PC.

    Kindly advice…

    thank you all

  5. Whoever you are , thanks for posting this…

    The errors in my method:

    1) NOT really an error: I used custom (bridged) vmnet3 and vmnet instead of auto bridging

    2) DID NOT configure Lan routing and assumed VMware does it automatically …

    the second step really made my day , Dinesh … Bravo.. am your fan .,


  6. OH NO…

    1) There was an error in Step 2 !

    After configuring both adapters under bridged, I am ABLE to ping from the VM to the desktop (in ur case) BUT UNABLE to ping from my laptop to The VM …

    What could be the problem… all firewalls are disabled …

    Please help

  7. Hai Upen
    Jitendra here we all should thank our sysprobs guru Mr. Dinesh I had just posted my idea and my Home Lab Diagram. Chreeeeees support sysprobs tell more about sysprobs thank you.

    • There was an error in Step 2 !

      After configuring both adapters under bridged, I am ABLE to ping from the VM to the desktop (in ur case) BUT UNABLE to ping from my laptop to The VM …

      What could be the problem… all firewalls are disabled …

      Please help

  8. Dear Rajesh have you tried out seeing this screen shot.
    Try it should work.
    Any error if you are getting just post it.

  9. I guess your solution is wrong. BOTH the networks should not be bridged via the same port (aka vmnet0) … In that case theres no way we can communicate both ways… so, shouldn’t it be two different ports on the switch , for ex : briged vmnet 2 for adapter1 and bridged vmnet3 for adater2 ….

    Auto bridging both , wont work,,, has anyone “implemented” this? Let me know asap.


  10. Hai Upen
    I have Just placed one VM as Router with 4 Nics it is working fine in my home lab it is working fine.
    I this diagram also i have bridge on only one side that is on vmwarehost pc.

  11. If you have any new method please post with lab diagram and with scrn shots on this site it will be help full
    for other.

  12. How do I connect my guest OS over the WAN and my lab configuration explained bellow

    Laptop Physical NIC IP
    Laptop VM NIC IP
    Guest OS Win 2003 NIC IP

    I am able share the physical shared drives also.

    Please let me know how I connect my VM Instance over the WAN.
    I came to know it is possible if I use port forwarding and loop back NIC concepts, if correct please explain.

    Thanks and Regards

  13. My objective is to run a virtual client-server based network topology training/test lab hosted from a laptop. The server operating systems needed are as follows Window 2000,2003,2008,Win Exch Srvr,SQL Srvr. The client operating systems are as follows;all flavors of Win 2K,XP,Vista,and Win7, Linux, Ubuntu and Mac OS X 10.7 Lion. The applications would be as follows; MS Office Pro 03,07 and 2011 for both Windows and Mac (with Garage Band having full functionality as it does in its native Apple environment). For hardware requirements it was advised to get the following items; I7 processor w/ virtualization, USB 3.0,eSATA,8GB ram, Gigabit nic and a USB 3.0/eSata external multi-bay hard drive enclosure (to store and run the virtual operating systems.

  14. hi everybody,

    i am having trouble with something in vmware. i need help.

    can u help me how to setup the network structure in vmware workstation.
    i had the dns configured.


  15. Hi… This is Mohan i instal windows xp in two laps by using VM ware but i can’t ping the both machines… (note:before pinging i switch off all fire walls and antivirus)may i know how to ping the both systems?

  16. hey man great walkthrough

    I have a lab scenario im working on at home

    using vmware workstation

    i have 3 servers (w2k8) ,1 for each of 3 sites.
    each site is on the
    site a is on the network
    site b is on the network
    site c is on the network

    my question is:
    1.) how would i use vmware to create routes between the 3 sites?

    any ideas welcome guys

    thanks in advance

  17. Nice work!

    I used to do it with freesco floppy router.
    Not the same setup but working too.
    i used 1 bridged connection and the rest in host-only.


  18. Hi,
    I am having 4 laptop running in LAN. i am using netgear wi fi router, which is also used to share the internet connection. We access each other computer through this setup
    I have installed ubuntu in VM in one of the computer. I can access my local computer’s shared folder through VM os. How can I access all the 4 laptops using the vm?
    please mail me on mindblowing.007@gmail.com

Comments are closed.