Virtual Routing for Bubble Networks

A question often comes up about what to do when you have a segmented virtual network that needs to be able to traverse subnets.  This might happen if you’re doing some testing and don’t want the machines to contact the production network, or perhaps doing a test SRM failover and having the virtual machines in their own test network.  Virtual machines in subnet (A) might need to contact other virtual machines in subnet (B) but don’t have access to the physical router any longer, so they can’t communicate.  To solve this issue, how about we try a virtual router?

So here is our basic problem.  Virtual Machines in the 192.168.1.0/24 subnet can’t contact the 192.168.2.0/24 subnet because there is no route between the two networks.

Router1

We are assuming that putting a physical router into the picture might not be possible because it’s a home lab where the equipment isn’t available, or the network team isn’t available to setup the networking, or maybe you just don’t know how to set that up.  Our quick solution is to use a virtual router like in the below example.

Router2

Once the above solution is put in place, the virtual machines can then communicate.

Vyatta has some software that will create a virtual router that will allow you to do this.   They also have an enterprise grade version if you need it for production use.  The free version can be downloaded from here.   http://www.vyatta.org/downloads

Once you’ve downloaded the software, you can create a new virtual machine and mount the Vyatta iso.  This will take you right into the installation and configuration of the Vyatta router.  To configure the router for the networks above, all we need to do is connect a network card of the virtual router to each of the vSwitches.  Then assign an IP address for each of the NICs.  If you set the default gateway of your virtual machines to the IP address of the virtual router, you’ll then be able to route between the two networks and the traffic should never have to leave the ESXi host.

I should add, that if your bubble network spans multiple ESXi hosts with say a vDSwitch, this setup will still work, but you will need an uplink to a physical switch.  This might also not be the most efficient way to route, but should work in a pinch.

Here is my setup on the Vyatta Router.  There is much more you can do with this, but the basic routing between two networks is shown below.  If you would like to learn more about the product, or how to use it there are some great resources on http://www.vyatta.com/ including some free training.

 

vyattaconfig1

6 Responses to Virtual Routing for Bubble Networks

  1. […] I wasn’t sure that it was necessary, but for a more realistic feel I wanted to have more than one subnet available.  In my case I have a storage subnet and a virtual machineESXi host subnet.  Unfortunately, I didn’t want to have my SRM Lab interfere with my home network.  Luckily Vyatta has a free virtual router that you can use to route traffic between multiple subnets.   This allowed me to build additional networks as needed and can communicate with them as needed.  I have another post related to setting up the Vyatta Router.  Vyatta Router Setup […]

  2. Hi, I need your help,
    I have two NIC one connected to LAN with LAN ip 192.168.9.1/24, another NIC is connected to the cable comming from Leaseline modem. My question is what IP do I assigned to these devices and what type of interfaces I should create, secondly do I create the bridge in VMWARE. I forgot to mentioned that both these NICs are Bridge in VM. when I create the interface on eth0 (connected to WAN) the BGP is coming, but on interface eth1 (I unable to ping to my local LAN). What type of setup it would be. Your help will be appricated. my email is akberalwani at gmail.com

    I despartely need your help.

    • I’m not sure I totally understand your environment. Can you clear this up? Are you trying to use Border Gateway Protocol (BGP)?

      • Dear Sir,
        Yes I wanted to use the BGP, I configure all things correctly, just want an understand that for the two NIC which IP I should put?, what kind of configuration needed in Vmware, do I configure the NIC bride etc.

        Here are my configuration
        IPs Ethernet Address Setting
        vyatta@vyatta# configure
        vyatta@vyatta#set interfaces ethernet eth0 address 172.31.145.146/30 (ISP provided leaseline IP)
        vyatta@vyatta#set interfaces ethernet eth1 address 192.168.6.1/24 (my local area LAN)

        Physical NIC IPs 1 WAN : ??? please tell me this
        Physical NIC IPs 1 LAN : ??? please tell me this

        BGP setting
        vyatta@vyatta# set protocols bgp 64608 neighbor 172.31.145.146 remote-as 65000
        vyatta@vyatta# set protocols bgp 64608 redistribute connected metric 65000
        vyatta@vyatta# commit
        vyatta@vyatta#save
        vyatta@vyatta#exit

        • I’m not positive I understand your question entirely, but if you’ve set your VMnets to bridged, they won’t have an IP Address.
          Only if you set them to NAT (which you can only have 1 of)

          Are you using VMware Workstation?

          • HI, let me clearify in more detail:
            1. One Physical Machine with 2 NIC
            2. One NIC is connected to swtich in WAN cable coming from Service Provider Modem/Device, I configure the local IP here (was this configuration is good?),
            3 On Second NIC the Local area cable is going to Switch and have LAN IP address 192.168.9.1/255.255.255.0
            4. Installed the vmWare and configure btoh NIC in bridge mode (is this correct configuration?)
            5. Installed the Vyatta and configure the the first inteface with below:
            #set interfaces ethernet eth0 address 172.31.145.146/30
            #set interfaces ethernet eth1 address 192.168.9.2/24 (I am confuse do I configure the LAN, if so then IP conflict will come)
            6. then I configure the BGP configuration.
            7. What should i configure the Physical LAN IP address subnet, and gateway on NIC2
            8. What should I configure the Physical WAN NIC IP Address, subnet, and gateway on NIC1.
            Problem:
            When I try to ping the LAN IP from vyatta nothing ping, also from outside command prompt of vmware it is same situation it is not recognizing the 192.168.9.2

            Also from vyatta when I ping the WAN IP 172.31.145.145 and 146 all are responding.

            I am not sure what went wrong with my configuration.

Leave a reply