VMware NSX 6.1 for vSphere – Deploying Logical Distributed Routers

Caution: Articles written for technical not grammatical accuracy, If poor grammar offends you proceed with caution ;-)

In this walk-through we will be deploying a logical router and configuring routing between (2) logical networks that we created in an earlier post. Logical routers consist of two components.  A virtual appliance that is deployed into your vSphere environment.  In the MoaC lab all routers are deployed to our management cluster and the vSphere Kernel module.  Remember the host preparations we performed as part of the NSX installation?  That was installing the NSX kernel modules.

The NSX Logical Routers Perform East-West (VM-VM) routing as well and North-South Routing.  The East-West routing performed by the Logical Routers afford you some extra efficiencies by allowing VM-VM communications across different subnets to happen at the vSphere Kernel when those vm’s reside on the same host.  You can also gain efficiencies when communicating between vm’s on different hosts as well.  Traffic for the communications will traverse host to host instead of needing to go out to a physical router on the network and then to the other vm.  In the post you will witness this as we place a virtual machine on each of the logical switches we created and the Logical Router performs routing between the two networks right in the hosts kernel. Although this specific post focuses on the East-West routing within the Logical Router we will be covering the North-South routing configuration in another post.

Deploying a Distributed Logical Router

  1. Within the Networking & Security section of the vSphere Client select NSX Edges from the left menu.  Then click the green + to add a new Distributed Logical Router.image
  2. Once the New NSX Edge dialog appears select Logical (Distributed) Router, then assign the router a name, input a hostname for the logical router, and then click Next image
  3. Next set the username, password, and optionally enable SSH and High Availability and click Nextimage
  4. Next Select the appropriate Datacenter, then click the green + to add an NSX Edge Appliance for the logical router, then select the cluster/resource pool, datastore, host, and finally folder where the NSX Edge Appliance should be deployed.  In the case of the MoaC lab we are deploying the NSX Edge appliance to our Management Cluster.  Click OK when finished and then click Next.image
  5. On the next screen click select to assign the Distributed Portgroup to the Management Interface for the Logical Router.  Once you have selected the interface click OK.  In the MoaC lab we are using the same management network that we previously used for the NSX Controllers.image
  6. Next select the green + under Configure interfaces of this NSX Edge.image
  7. Next assign a name for the interface you are adding, then select internal as the type and click select to choose the Logical Switch for this interface.  Select one of the logical switches that we created in our earlier post and select OK.image
  8. Next click the green + under configure subnets.  When the Add Subnet dialog opens click the green +, then input the IP address you want to assign the router on the logical network.  This will be the default gateway for the subnet.  Click OK next to the IP address.  Next put the subnet bits in the Subnet prefix length field.  I’m using a class C so I’m using 24 bits of subnet.  Once finished click OKimageClick OK to configure the Logical Router interface.image
  9. We need to add an interface for our second logical switch as well so repeat Steps 6 – 8 for the second logical switch that was created.
  10. Once you have added the second logical switch click next.image
  11. Next un-check Configure Default Gateway.  We have not added any uplink adapters so we do not need to set this just yet.  Once un-checked click next.image
  12. Review the settings for your Distributed Logical Router and click Finish to start deployment.image
  13. You will see the Logical Router with a Status of Busy as it deploys the NSX Edge Appliances.image
  14. Once completed the status will change to deployed.imageIf you look in vCenter where you told NSX to deploy the appliance you will see 1-2 (depending on if you choose HA) Virtual appliances for your logical router.  Notice the resource it is configured to use.  It’s fairly small.  Also notice that it is connected to the management network that you assigned to it.image

Testing the NSX Distributed Logical Router

For the testing I like to use a very small linux appliance that Mike Laverick put together.  He made some modification to a TTYLinux distro to include a very small web server.  This will come in handy when we configure load balancing.  You can get the ova from Mike’s Blog  at this location.

I’m not going to walk through deploying the TTYLinux appliance as it is very straight forward.  You will need to deploy two instances of the appliance.

 

  1. Deploy two instances of the TTYLinux appliance and connect one to each of the Virtual Switches you assigned to the Distributed Logical Router.  If you look at the image below you will see the network name assigned to the VM.

image

  • Once you deploy both TTYLinux appliances and attach them to the appropriate Logical Switches we will need to configure them to communicate on the network.  Login to the TTYLinux using username root and password password then execute the following commands:ifconfig eth0 {IP address} netmask {netmask}
    route add –net 0.0.0.0/0 gw {gateway IP address}Once you have configured both system with the proper IP information for the network they are on try to ping one from the other.  You should be able to ping each one from the other.  See Images Below:

 

image        image

image       image

Below is a simple diagram of what we have just configured:

logical_router

 

Leave a Reply