NSX

Extend layer 2 DR network with VMware NSX

See how we can Extend layer 2 DR network with VMware NSX providing an effective way to present legacy applications to production from DR

One of the especially tricky things that you have to deal with when thinking about a DR situation where you have a failover to another location is network connectivity. This comes into play especially with legacy applications that may have hard coded IP addresses or legacy server resources that have IP addresses that may not be that easy to change. Thinking about extending layer 2 network segments make most network engineer’s skin crawl. Granted it is much better to design applications in such a way where things like network addressing is irrelevant. However, as mentioned many enterprises are still dealing with legacy applications that are business critical and must be supported. We can however extend layer 2 DR network with VMware NSX so that legacy resources can be spun up in a DR facility and brought back online using the production site network subnet. ย To do this we can use a logical switch as well as a layer 2 bridge to extend both an address range and a layer 2 network.

Extend layer 2 DR network with VMware NSX

So we have talked about the reasons for wanting to extend a network for DR (disaster recovery) purposes, but we haven’t really talked about the “how”. Over the years there have been a lot of mechanisms using routers and other VPN type technology to extend layer 2 networks over layer 3 – L2TPv3, OTV, etc. ย However, these require a lot of configuration/reconfiguration from a physical network infrastructure perspective. ย In today’s world, those types of changes are simply not that feasible especially with a network that is in production. ย One of the great benefits of virtualized resources is the layer of abstraction they provide. ย Using VMware NSX VXLAN technology allows the network to be abstracted from the physical network infrastructure. ย Let’s see how we can setup a logical switch and a layer 2 bridge to accomplish this.

Setting up VMware NSX Logical Switches

The logical switch is VMware’s implementation of VXLAN. ย This is an isolated network that can span multiple hosts, clusters, etc. ย However, we need a way to get that traffic out of the logical switch. ย We can do that with a distributed logical router, etc. ย First, to setup a logical switch, we navigate toย Networking & Security >> Logical Switches. ย We hit the green “+” sign to create a new Logical Switch. ย We choose theย replication mode which by default is set toย Unicast. ย This is the mode that requires no reconfiguration of the physical network such as IGMP snooping. ย It is however the least efficient as well.

lswitch01

After creating the switch we see the new Logical Switch notated asย virtualwire-1. ย We see our friendly name however under theย Name column along with the status and transport zone, etc.

lswitch02

Deploying Distributed Logical Router

To setup the Distributed Logical Router layer 2 Bridge, we navigate to theย Networking & Security >> NSX Edges section. ย Hit the green “+” to create a new Distributed Logical Router. ย Here we selectย Logical (Distributed) Router and give it a name. ย We need to deploy Edge Appliance as well. ย If you uncheck this option, when you create the Bridge, you will get the error that Bridging is only available when an NSX Edge is deployed.

lswitch03

We set the CLI username and password, SSH access options, logging, etc.

lswitch04

Next, we actually deploy our NSX Edge appliance. ย Click the green “+” sign.

lswitch05

We are asked to configure the placement parameters for the NSX Edge appliance. ย The only two options that are required are theย Cluster/Resource Pool andย Datastore.

lswitch06

Next, we select the management interface port group. ย Click theย Select link.

lswitch07

Here I am selecting aย Distributed Portgroup option and choosing theย DPG-Mgmt port group.

lswitch09

Note how for the layer 2 bridge we can simply leave theย interfaces of this NSX Edgeย unconfigured. ย We don’t need any interfaces since we are simply bridging our VXLAN with our VLAN.

lswitch10

Since we don’t have any interfaces ourย Default gateway settingsย are greyed out. ย We can simply move on to the final screen.

lswitch11

Ready to deploy our Edge appliance.

lswitch12

Configuring the Layer 2 Bridge

Now that we have our NSX Edge configured. ย We go back to theย Networking & Securityย >> NSX Edges and double click on our newly configured DLR. ย Click on theย Manage tab and then clickย Bridging. ย Click the green “+” sign to add a new Bridge.

lswitch15

Theย Add Bridgeย dialog opens. ย Choose a name for the bridge and we also are required to choose aย Logical Switch and aย Distributed Port Group. ย The Logical Switch would be our VXLAN network and ourย Distributed Port Group represents our VLAN backed network.

lswitch16

We click the little port icons next to theย Logical Switchย box and we are presented with our logical switches to choose for the bridge. ย Here I only have one logical switch configured for the bridge.

lswitch17

Next, we select the Distributed Port Group for the VLAN side. ย A note here, you have to have a Ditstributed port group that is VLAN backed with a VLAN configured. ย If you don’t, it will not be listed here.

lswitch18

After selecting both networks, we should see both populated.

lswitch19
After configuring our bridge, we select toย Publish Changes.

lswitch20

Testing our DR to Production Layer 2 Bridge

In the lab, I have a separate vSphere cluster configured in a different layer 2 network. ย I have two small linux appliances. ย The ping below is from a test VM on aย server logical switch VXLANย which is configured with a 192.168.85.0/24 address. ย The DR environment is routed across from the production cluster and is sitting on aย 10.1.85.0/24 address space. ย I have a test VM on a DR VLAN that I assigned the same address space as production. ย As you can see from either side I can ping the address space.

lswitch21

A few notes about the Layer 2 Bridge functionality:

  • This should not really be used for a permanent traffic solution. ย The Layer 2 bridge would be useful during migrations, or in a DR scenario as shown if Layer 2 functionality is needed.
  • Expect a performance impact with a layer 2 bridge as the functionality is not distributed. ย It ultimately relies on a single host and would have a single host’s worth connectivity.

Thoughts

We have seen how we can extend layer 2 DR network with VMware NSX and effectively present the same subnet for connectivity at a different location to production. ย Keep in mind there are certain limitations with performance, bandwidth, etc when using layer 2 bridges and they shouldn’t be employed long term. ย However, the flexibility that VMware NSX gives customers to much more easily move network spaces around can certainly pay dividends in many scenarios such as DR.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.