NSX-T Active-Active Multi-site with Secondary Region Failover

NSX-T Active-Active Multisite in a Single Region and Failover to a Secondary Region Part 2.  

A guide to walkthrough the configuration of Multisite in Active-Active with failover.

In this article I will focus on the configuration, demonstration and testing of what was discussed in part 1 for NSX-T Multisite with a secondary availability zone which can be seen here; Part 1.

This article will not cover the base installation and configuration of NSX-T, the ToR's or the Core, it will focus on configuring and testing NSX-T Multisite as was discussed in part 1.

1. To begin with I will display the current interfaces and BGP neighbor configuration.
Image to show nsx-t 3.1 uplink interfaces for the failover lab
NSX-T BGP neighbours with multiple source addresses to peer from each uplink of the T0
The current subnets being propagated from NSX-T can be seen below.
NSX-T 3.1 segments plumbed into t1 and t0 with bgp propagation
2. The image below shows all the routes the core switch has learnt.
NSX-T 3.1 core switch bgp routes learned from edge appliances
Notice how the routes are learned from 4 different peers, which is in line with the 4 ToR's that are peering with the NSX-T T0 as well as the core switch.  Performing trace routes into the environment now will be balanced across all peers.  Keep in mind that I have configured the maximum-paths and multipath-relax on the core switch.  

Without these two commands, the path that the core deemed best was injected into the routing table and the same subnet would not presented from two different ASN's, ie 195.0.0.254/32 was only presented from 65200.

Now that we have routes appearing and all peering working as expected, it is time to configure BGP for Site-A to be preferred.  

3. T0 Gateways > Edit the T0 > Routing > IP Prefix Lists 
nsx-t 3.1 navigating to prefix list  creation area
nsx-t 3.1 configuring and applying prefix lists
nsx-t 3.1 configured prefix list
4. Below we create the route maps using the above prefix list and prepend the AS Path in SiteB-out.  To create a route map go into edit mode on your T0 and expand the routing section and click the hyperlink next to route maps.  The second route map is the inbound filter to set the local preference to 90, the default is 100 and the path with the higher preference wins.  In this case we are setting inbound routes from Site B to 90, and in doing so Site A has it's default of 100 still set.
nsx-t bgp route map local preference prepend
5.  Apply the Route Map to the Site B peers, this can be done by going into the BGP neighbours, editing one of the peers, clicking on Out Filter, applying the list that was just created and then completing the same for the in filter.  Repeat this step for all peers that need to be prepended.  In this case it was all Site B peers.  Set the route maps according to the name, the SiteB-in is set as the in-filter and the SiteB-out is set as the out-filter.
nsx-t bgp out filter as path prepend
nsx-t 3.1 bgp peer in filter
6.  Now that is all done, let's have a look at the routing table on the core again.
NSX-T BGP lab with peers using as prepend to steer traffic

 Here we can see that the routes being injected into the routing table are from the AS in Site A, as I prepended Site B's path to make it seem longer to the core.  The below image shows the routes still being advertised from the ToR's in Site B, however pay close attention to the path. 

The image below is the routes BGP has learned, notice here you see the prefixes listed multiple times learned from each peer.
nsx-t 3.1 bgp learned paths with as path prepend

NSX-T BGP Core with AS Prepend showing all routes to the subnet still exists 

This is an image of the routes on one of the edge nodes. nsx-t bgp routing table path prepend and local preference
8.  Next we will perform a quick failover test to show this working, I begin by pinging 195.0.0.254 from my desktop.  This will now route through the Edge's uplink interfaces in Site A.

Traceroute to NSX-T segment IP using preferred BGP path with AS Prepend
9.  Shutdown the ToR's in Site A and below is the route table in the core after doing so.
NSX-T upstream peer showing Site b's peers and site a's are now no longer there

10.  Below is the ping output, I dropped more packets than I should have as I hadn't configured BFD between the peers (you really should do this for faster failover).

Ping output showing failover with a few packets dropped
11.  Finally, below is the trace route from the same desktop.
Traceroute to NSX-T segment after BGP Peer and AS path has failed to the less preferred site

This concludes the second part of this article and hopefully has shed some light on how this all works.  If you would like some questions answered or need anything clarified, leave a comment!

Comments

Unknown said…
Hey,

how you did you implement the local egress from site A. AS-Path-Prepend from ToRs down to T0? With the configuration provided here, T0 would send traffic via all ToRs egress.

Cheers
Shank Mohan said…
Excellent catch my friend! I completely missed adding a step into this.
But to answer your question, route-maps are your friend!

We have to create 2 route-maps.
- One route-map for traffic egressing through the Site B peers, this route map prepends the path. Doing so makes these peers / paths less desirable to the rest of the network.
- The second route map is for the in-filter on the peers pointing to site b, and we set the local preference to 90. 100 is the default and the path with the high preference will win.
- The prefix list used for both of these route-maps is any / permit.

I will update the post shortly to show what I missed out on and the route table on the edges to show the preference setting in effect.

Again, awesome catch and glad you are reading!