OSPF configuration on NSX-T

On version 3.1.1, NSX-T introduced OSPF v2 support, which provides an alternative for customers that are not willing to work with BGP and/or Static Routes.

On this post I will go over a basic configuration of OSPF on NSX-T, demonstrating the neighbour adjacencies that are established and testing connectivity between a VM on an NSX-T segment and a Loopback interface on my Router.


Note: All configuration on this post is done in Policy mode.


The diagram below shows the connectivity between the components on my lab:

Pre-reqs

Before configuring OSPF, the following should be already configured on your NSX-T environment:

  • Edge Nodes (at least one Edge Node is required, on this example I am using 2 nodes)
  • Edge Cluster
  • T0 Gateway
  • Router(s) with OSPF configured

In addition, my test environment also has the following:

  • T1 Gateway (optional)
  • Test segment
  • Test VM attached to Test segment

T0 Gateway Interfaces

The first step to configure OSPF is to create the Interfaces on the T0 gateway that will communicate to the external Routers. In this case, we will configure 4 Interfaces:

  • Edge 1 to Router 1 (10.10.200.11)
  • Edge 1 to Router 2 (10.10.201.11)
  • Edge 2 to Router 1 (10.10.200.12)
  • Edge 2 to Router 2 (10.10.201.12)

Under Networking, navigate to Tier-0 Gateways and edit your T0 Gateway.
On the Interfaces section, click on Set.

Click on Add Interface. Enter the following information:

Name: <Enter a name for the interface, in this example I used "Edge_X-Uplink_Y">
Type: External
IP Address/Mask: <IPv4 address of the interface in the format a.b.c.d/e>
Connected To (Segment): <VLAN Segment where this interface is connected to>
Edge Node: <Select the Edge Node where this interface will be created>

Repeat those steps to create the remaining 3 Interfaces.

From your Edge Nodes, test connectivity to all Routers before proceeding to the OSPF configuration.

OSPF configuration

Edit your T0 Gateway, then navigate to OSPF and select the toggle to enable it.

Next to Area Definition, click on Set.

Select ADD AREA DEFINITION and enter the details of your OSPF Area. In this example, we will configure the following:

Area ID: 2
Type: Normal
Authentication: Password
Password: vmware

Save and close.

On the T0 OSPF configuration, click on Set next to OSPF Configured Interfaces.

Select CONFIGURE INTERFACE and then enter the following information:

Interface: <Select one of the Interfaces from the drop down menu>
Area: <Select the OSPF area from the drop down menu>
OSPF: Set the toggle to Enable

Confirm that the other parameters such as Hello and Dead intervals are correct, as per your router configuration.

Select Save.

Repeat this process for all the other interfaces.

Close this page and Save the OSPF configuration.

Select View next to OSPF Neighbors and check that the adjacencies were established.

Notice that the Priority of the NSX-T interfaces is set to 0. This means that the T0 Gateway does not participate on the DR/BDR election.
You should also be able to check that the state of those interfaces is DROTHER on your router.

Route Redistribution

The last step for the VMs to have connectivity to the outside network would be to configure Route Redistribution.
On the T0 Gateway, expand the ROUTE RE-DISTRIBUTION section and click on Set next to Route Re-distribution.

Select ADD ROUTE RE-DISTRIBUTION, then enter a Name and select OSPF as the Destination Protocol.
Click on Set to define the networks that will be re-distributed.

Make sure Connected Interfaces & Segments is selected for both Tier-0 and Tier-1 subnets, then select APPLY.

Select ADD and then APPLY to complete the configuration.

Save the T0 configuration. Edit your T1 Gateway and check that All Connected Segments & Ports is also enabled under Route Advertisement.

Save your T1 configuration and test the connectivity of your test VM.

For this configuration, I used the following documentation as a reference:

https://docs.vmware.com/en/VMware-NSX-T-Data-Center/3.1/rn/VMware-NSX-T-Data-Center-311-Release-Notes.html
https://docs.vmware.com/en/VMware-NSX-T-Data-Center/3.1/administration/GUID-5BEC626C-5312-467D-B873-8E117349E9FC.html