{"id":1519,"date":"2019-02-19T12:25:44","date_gmt":"2019-02-19T17:25:44","guid":{"rendered":"https:\/\/ithinkvirtual.com\/?p=1519"},"modified":"2019-02-22T18:04:29","modified_gmt":"2019-02-22T23:04:29","slug":"nsx-t-home-lab-part-5-configuring-nsx-t-networking","status":"publish","type":"post","link":"https:\/\/ithinkvirtual.com\/2019\/02\/19\/nsx-t-home-lab-part-5-configuring-nsx-t-networking\/","title":{"rendered":"NSX-T Home Lab – Part 5: Configuring NSX-T Networking"},"content":{"rendered":"\n

Intro<\/h2>\n\n\n\n

Welcome to Part 5 of my NSX-T Home Lab series. In my previous post<\/a>, I went over the lengthy process of configuring the NSX-T fabric. In this post, I am going to cover the process of configuring the networking so we can get the logical routers and logical switches in place and ready to attach VMs to them and begin running workloads on NSX. Let get to it, shall we?<\/p>\n\n\n\n

Logical Switch<\/h2>\n\n\n\n

An NSX-T Data Center logical switch reproduces switching functionality, broadcast, unknown unicast, multicast (BUM) traffic, in a virtual environment completely decoupled from the underlying hardware.
Logical switches are similar to VLANs, in that they provide network connections to which you can attach virtual machines. For more information, please see the documentation.<\/p>\n\n\n\n

I am going to start off by creating a Logical Switch to serve as my uplink from the external network to my Tier-0 router, which I’ll create afterward. To create a logical switch, select Networking > Switching > +ADD<\/strong>. Enter a Name, then from the Transport Zone drop-down menu select the VLAN uplink transport zone that was created in the previous post. Since I’ll be tagging VLANs at the port group level, enter a 0<\/strong> (zero) for the VLAN ID and click ADD<\/strong>. <\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

And that’s all there is to it! After a logical switch is created, we need to create a port for it to connect it to a logical router, but we first need a Tier-0 Logical Router.<\/p>\n\n\n\n

Tier-0 Logical Router<\/h2>\n\n\n\n

An NSX-T Data Center logical router reproduces routing functionality in a virtual environment completely decoupled from the underlying hardware. The tier-0 logical router provides an on and off gateway service between the logical and physical network. Tier-0 logical routers have downlink ports to connect to NSX-T Data Center tier-1 logical routers and uplink ports to connect to external networks. For more information, please see the documentation<\/a>.<\/p>\n\n\n\n

To create a Tier-0 Logical Router, select Networking > Routers > +ADD<\/strong> and select Tier-0 Router<\/strong> from the drop-down menu. Provide a Name for the router and from the Edge Cluster drop-down menu, select the edge cluster that was created in the previous post then click ADD<\/strong>. Changing the High Availability setting is optional and I’m choosing to leave the default Active-Active setting.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

With the Tier-0 logical router created, click on the router and from the Configuration drop-down menu, select Router Ports<\/strong> then click +ADD<\/strong> under Logical Router Ports<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Enter a Name, leave the Type as “Uplink”, optionally change the MTU value to support a configured Jumbo Frame, otherwise leave the default 1500 value (I am using 9000 for Jumbo Frames in my environment). From the Transport Node drop-down menu, select the edge transport node created in the previous post. From the Logical Switch drop-down menu, select the logical switch that was created in the previous step, then provide a name for the Logical Switch Port and provide an address on the “Uplink” VLAN 160<\/strong> for the router port and click ADD<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Now, with the Tier-0 Logical router created and attached to an uplink Logical Switch, I have the option of either setting up a Static Route to send\/receive data to\/from or to configure Border Gateway Protocol also known simply as BGP. Until one of these is configured, I won’t be able to ping my Tier-0 router. I am going to opt to configure BGP so that any network I add later on down the road will get advertised properly to the neighbor router (Sophos XG) on my external network instead of using a wide-open static route. I’ll come back to BGP configuration a little later on, but first, I’d like to set up a Tier-1 to connect to my Tier-0. Any VLAN-based logical switches I create from this point on will be attached to the Tier-1 logical router.<\/p>\n\n\n\n

Tier-1 Logical Router<\/h2>\n\n\n\n

Similar to Tier-0 Logical Routers, Tier-1 logical routers have downlink ports to connect to NSX-T Data Center logical switches and uplink ports to connect to NSX-T Data Center tier-0 logical routers. The tier-1 logical router must be connected to the tier-0 logical router to get the northbound physical router access. For more information, please see the documen<\/a><\/g>tation<\/a>.<\/p>\n\n\n\n

As was done when creating the tier-0 logical router, repeat the same process by selecting Networking > Routing > +ADD<\/strong> but select Tier-1 Router<\/strong> from the drop-down menu instead. Provide a Name, from the Tier-0 Router drop-down menu, select the Tier-0 router that was created in the previous step to attach the Tier-1 to it. Next, from the edge cluster drop-down menu, select the edge cluster that was created in the previous post, leave the default Failover Mode then from the Edge Cluster Members drop-down menu, select the edge transport node that was created in the previous post and click ADD<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

BGP Configuration<\/h2>\n\n\n\n

To take full advantage of the tier-0 logical router, the topology must be configured with redundancy and symmetry with BGP between the tier-0 routers and the external top-of-rack peers. To enable access between your VMs and the outside world, you can configure an external BGP (eBGP) connection between a tier-0 logical router and a router in your physical infrastructure. For more information, please see the documentation<\/a>.<\/p>\n\n\n\n

To configure BGP on a Tier-0 logical router, select Networking > Routing<\/strong> and select the Tier-0 router<\/strong>. From the Routing<\/strong> drop-down menu, select BGP<\/strong> and click +ADD<\/strong> under the Neighbors section. Enter the neighbor router address, in this case since I am using a VLAN for my Uplink network, I will specify the gateway address of my VLAN 160<\/strong> configured on my Sophos XG firewall\/router. Next, select the Max Hop count needed to reach the neighbor router. In my case, my Tier-0 router is configured with the IP address of 10.254.160.2<\/em> and is one hop away from the gateway at 10.254.160.1<\/em> so I’ll leave the count set to 1<\/strong>. Finally, provide a Remote AS<\/strong> number which will be configured on the neighbor router (Sophos XG) and click ADD<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Next, click EDIT next to BGP Configuration. Toggle the Status<\/strong> switch to Enabled<\/strong> and enter a Local AS<\/strong> number for the Tier-0 router. Optionally, toggle the Graceful Restart<\/strong> switch to Enabled<\/strong> only if the Edge Cluster has one member, which is the case in this nested lab environment, then click SAVE<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Pretty straight forward right? But we’re not done just yet. In order for routes to be advertised properly to the neighbor router, there are a few more things required one of which is to enable Route Redistribution. To do so, select the Tier-0 Logical Router > Routing dro<\/strong>p-down menu, and select Route Redistribution<\/strong>. Click EDIT<\/strong> and toggle the Status<\/strong> switch to Enabled<\/strong> and click SAVE<\/strong>. Next, click +ADD and enter a name for the route redistribution configuration, then from the “Sources” choices, select NSX Static<\/strong> and click ADD<\/strong>. NSX sees any advertised routes as a “dynamic” static route, therefore, this setting needs to be enabled to properly advertise routes to the neighbor router.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

With BGP now configured on the virtual NSX side, I need to also configure BGP on physical side meaning on my Sophos XG. Log into the Sophos XG firewall and navigate to Routing > BGP<\/strong>. Here, I will add my VLAN 160 gateway IP address as the Router ID and set the Local AS number for my router and click Apply<\/strong>.<\/p>\n\n\n\n