Options

Routing between virtual networks

4_lom4_lom Member Posts: 485
I need to setup 2 virtual machines in VMWare for an Exchange test environment, each on their own network for isolation. However, they need to be able to communicate. Just wondering how I would go about routing between them? Sorry if this is an ignorant question, I'm fairly new to VMWare.
Goals for 2018: MCSA: Cloud Platform, AWS Solutions Architect, MCSA : Server 2016, MCSE: Messaging

Comments

  • Options
    blargoeblargoe Member Posts: 4,174 ■■■■■■■■■□
    Forget for a minute they are virtual. In a physical environment, there would be separate switches or a switch with separate VLANs to which each VM would be connected. Then you would either have a separate router device connecting the two swtiches/VLANs, or if the switch supports layer 3, could handle the routing itself.

    In VMware, you would handle it similarly. If you wanted to keep everything contained in VMware and not rely on physical equipment, you could put each VM on its own vSwitch, and then create a 3rd VM to serve as a router (there are free VM appliances out there that will function as routers). Connect a nic from the router to each vSwitch, configure the router, configure your VMs to use the router as their gateway, and you're all set.

    You could also send the VM traffic through your physical nics to a physical switch and physical router, if the equipment you are using supports multiple LANs (a lot of your residential broadband routers do not)
    IT guy since 12/00

    Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
    Working on: RHCE/Ansible
    Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...
  • Options
    dave330idave330i Member Posts: 2,091 ■■■■■■■■■■
    The router VM can be a windows machine as well.
    2018 Certification Goals: Maybe VMware Sales Cert
    "Simplify, then add lightness" -Colin Chapman
  • Options
    MacGuffinMacGuffin Member Posts: 241 ■■■□□□□□□□
    4_lom wrote: »
    I need to setup 2 virtual machines in VMWare for an Exchange test environment, each on their own network for isolation. However, they need to be able to communicate. Just wondering how I would go about routing between them? Sorry if this is an ignorant question, I'm fairly new to VMWare.

    What kind of hardware do you have available to you? Do you have some computers or routers that you could use in this project? Does your VMWare host have multiple NICs and/or a NIC that supports VLAN tagging?

    One trick I like to do is use the USB passthrough feature and some USB to ethernet adapters to simplify the networking and VM configuration. It assures me that the VM host is not getting in the middle some how and complicating things in the IP routing path. Since I have a rack of Cisco routers and switches available to me I would probably use one or two of those boxes to do the routing for me as I desired. The solution blargoe gave is also something I would likely try. I recall seeing dedicated router VMs that could be imported into VMWare to do the routing.

    Other possible options depends on your networking knowledge. I'm Cisco certified so any solution I come up with would likely involve a physical or virtual Cisco router. As dave330i points out a windows computer can act as a router if you know what you are doing.

    This project sounds interesting. Let me know if you need more ideas and what you found that worked (or didn't work) for you.
    MacGuffin - A plot device, an item or person that exists only to produce conflict among the characters within the story.
  • Options
    4_lom4_lom Member Posts: 485
    How would I create a vSwitch in VMWare Workstation?
    Goals for 2018: MCSA: Cloud Platform, AWS Solutions Architect, MCSA : Server 2016, MCSE: Messaging

  • Options
    blargoeblargoe Member Posts: 4,174 ■■■■■■■■■□
    OK, didn't realize it was VMware Workstation... so in VMware workstation, you have the "host-only" network, "bridged network", etc. Host-only is an internal only virtual switch that is similar to what a vSwitch does in ESX when it is not connected to an external network. That is what you want for your isolated networks. You start out with one host-only switch, but you can create more using the VMware Workstation console (not sure of the steps off hand).
    IT guy since 12/00

    Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
    Working on: RHCE/Ansible
    Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...
Sign In or Register to comment.