This post will go over the basic setup for network virtualization in NSX. This is nothing new or exciting but I figured I would share as more users are deploying NSX in their home labs these days. I will assume that you already have the environment prepared by deploying the manager and controllers and all your ESXi hosts are prepared.
We are going to set up the subnet of 10.0.0.0/17 to be virtually routed as shown below:
This requires the following:
- Static route on Linksys EA6200 router to point 10.0.0.0/17 to 192.168.10.223 (because my Linksys does not support any dynamic routing protocols)
- A logical switch called Transport-10.0.0.0 between the border ESG and the Logical distributed router
- OSPF configured between ESG-3 and LDR-3
Creation of the LDR-3 (pictures to follow steps)
- First we need to create a logical switch by choosing Logical Switches, select green + button, Input Name (Transport-10.0.0.0) and description and click ok
- Select NSX Edges in Navigator pane, select green + button
- In Name and description pane: Install Type: Logical (distributed) route, Name: LDR-3, Hostname ldr3, leave deploy NSX Edge selected, Next
- In settings, type your password, I like to enable ssh, click next
- In configure deployment: Press the green + to deploy a NSX Edge Appliance, Select correct resource pool, datastore, host, and folder, click ok
- Click Next
- In Configure interfaces
- Select connected to for HA interface: Port group DV-VM, press + below HA and add 192.168.10.224
- press the green + button under interfaces
- In Add NSX Edge Interface: Name Uplink, Connected to: Transport-10.0.0.0, Press green + to add IP: 10.0.0.2 subnet 24, Click ok
- Click Next
- In Default gateway settings: Set the gateway IP as 10.0.0.1 and click next
- Ignore the Firewall and HA settings click next
- Click finish to deploy LDR
Creation of the ESG-3 (pictures to follow steps)
- Back at the NSX Edge section in Navigator
- Press the Green + sign
- In Name and description: Choose Edge Services gateway, Name: ESG-3, Hostname esg3 and select Next (in Production you might want high availability or ECMP)
- In Settings: Type Admin password and enable ssh, Next
- In Configure deployment: Press Green + sign, Select resource pool, datastore and host then ok and Next
- In Configure Interfaces: press the green + sign
- Name: Uplink, Connected To: DV-VM, Press green + to add interface: 192.168.10.223 subnet 24, click ok
- Click Next
- In Default gateway settings insert default gateway of 192.168.10.1 then next
- Ignore firewall and HA settings and next
- Click Finish to deploy appliance
Configure Physical router
This is unique per router in mine I added a static route for the subnet:
Configure LDR
We need to add at least one inside network and configure OSPF.
- Logical Switch section we are going to add a switch for 10.0.1.0/24 called LS-10.0.1
- In Logical Switch Section: Green + button, Name LS-10.0.1 then OK
- Go to NSX Edges in Navigator
- Double click on LDR-3
- We need to add a interface for the new network Select Manage, Settings, Interfaces
- Select Green +
- Name: GW-10.0.1: Connected To LS-10.0.1, Green + button to add interface 10.0.1.1 subnet 24,
- Select Routing tab, global Configuration
- Go to Dynamic Routing configuration and click edit
- Make sure the uplink interface is chosen then click ok
- Press Publish Changes button
- Click on OSPF button
- Remove all current area definitions (51 ) with red X then publish changes
- Click green + on area definitions and add area 2 (just type 2 in area button leave rest default)
- Press green + in area to interface mapping button
- Make sure Uplink is selected and area 2 and press OK
- Press Edit button next to OSPF configuration and enable OSPF, For protocol address choose a free IP 10.0.0.3, forwarding is 10.0.0.2
- Publish Changes
- Go to firewall section
- Disable firewall
- Publish changes
Configure ESG-3
- Return to Networking & Security main section
- Select NSX Edges and double click on ESG-3
- Select Manage, Settings, Interfaces
- We need to add a interface for the transport between LDR and ESG
- Select vnic1 and press Edit button
- Connected to: Transport-10.0.0.0, IP: 10.0.0.1 subnet 24
- Select Routing
- In global configuration: Select edit next to dynamic routing configuration, ensure uplink is selected and press ok
- Publish changes
- Click on OSPF
- Remove current area definitions with red X and publish changes
- Add a new area for area 2 leaving everything else default
- In the area to interface mapping make sure you chose vnic1 (internal link) and area 2
- Select OSPF Configuration and Enable OSPF
- Publish Changes
- Select Firewall section and disable firewall and publish changes
Validate Configuration
Let’s validate configuration three ways: Confirming OSPF settings on ESG-3, Adding a new subnet, ping test
Confirming on ESG-3
- Login to ESG-3 via SSH (username admin password set during deployment)
- Type the following to see current routes (show ip route) ensure that the E2 learned route is showing:
Adding a new subnet
- Stay logged into the ESG-3
- Switch to the Networking and security console, navigate to Logical switches
- Press green + to add a switch for LS-10.0.2
- select NSX Edges, Double click on LDR-3
- Go to Manage and settings
- Select Interfaces and press green +
- Name: GW-10.0.2, Internal, Connected to: LS-10.0.2, IP 10.0.2.1 subnet 24
- Return to the ESG-3 ssh session and run the command show ip route to see 10.0.2.0/24
Test Via ping
- Attempt to ping either gateway on the LDR (10.0.1.1 or 10.0.2.1)
Additional commands on ESG-3
Here are some commands that will help you in troubleshooting OSPF
show ip ospf neightbors – show other members of the areas
show ip ospf database – understand current ospf database