Short answer: to troubleshoot NSX routing, start on NSX Manager with get gateways, get gateway <uuid> interfaces and get gateway <uuid> route. Then go to the Edge node, enter the Tier-0 service router with vrf <ID>, and check get bgp neighbor or the OSPF equivalents. Finish on the ESXi host to confirm what the distributed router actually programmed. All commands are listed below; for every other NSX CLI command (all gateway, BGP and OSPF variants by version), see the NSX CLI interactive mindmap.
This blog post delves into the logical routing capabilities of NSX-T and how network administrators can harness the power of NSX Manager and Edge CLI commands to efficiently manage and troubleshoot their network infrastructure.
NSX Manager: Your Gateway to Network Management
NSX Manager serves as the centralized network management console in VMware’s NSX-T architecture. From listing gateways to viewing detailed route information, NSX Manager equips administrators with the tools they need to manage their network effectively.
Key Commands from NSX Manager:
- List All Gateways: Easily view all the gateways within your network with
get gateways - Gateway Details: For specifics about a gateway, use
get gateway <uuid> - Interface Management: View a gateway’s interfaces using
get gateway <uuid> interfacesand get detailed interface information withget gateway <uuid> interface <interface-id> - Routing Information: Access route details on a gateway with
get gateway <uuid> route - NSX Edge Node Status: Check the status of NSX Edge nodes registered with the NSX Manager using
get transport-node status
Edge CLI: Deep Dive into Gateway Diagnostics
The Edge CLI is your go-to for an in-depth analysis and diagnostics of gateways. Whether you’re monitoring gateway statistics or reviewing BGP and OSPF configurations, the Edge CLI commands offer a granular view of network operations.
View the gateway BGP information:
- Gateway Overview:
get gatewaysprovides a list of all gateways. - To enter into the VRF construct:
vrf <ID> - View the bgp neighbor of a Tier-0 SR:
(Tier-0)> get bgp neighbor - View the interfaces on a Tier-0 SR:
(Tier-0)> get interfaces - View the forwarding table:
(Tier-0)> get forwarding - View the Routes:
(Tier-0)> get route - View the BFG configuration:
(Tier-0)> get bfd-config
View the gateway OSPF information
- To enter into the VRF construct:
vrf <ID> - View the bgp neighbor of a Tier-0 SR:
(Tier-0)> get ospf neighbor - View the details of the OSPF interface:
(Tier-0)> get ospf interface - View the forwarding table:
(Tier-0)> get forwarding - View the Routes:
(Tier-0)> get route - View the OSPF database:
(Tier-0)> get ospf database
- Statistics and Neighbors: Use
get gateway <uuid> statsfor statistics andget gateway <uuid> neighborto view neighbor details. - BGP and OSPF Configurations: Enter the VRF construct with
vrf <ID>to view BGP neighbors, OSPF interfaces, and routing information.
ESXi Host-Level Insights
At the ESXi host level, NSX-T extends its capabilities to provide essential diagnostics and log file access, ensuring administrators have all the necessary tools at their fingertips.
Commands Run from ESXi:
- Forwarding Table and Interfaces: View the gateway’s forwarding table and interfaces with
get gateway <UUID> forwardingandget gateway <UUID> interfaces. - Neighbors: To see a gateway’s neighbors, use
get gateway <UUID> neighbors.
Log Files on ESXi:
- NSX Syslog Log File: Located at
/var/log/nsx-syslog.log, this log file is critical for troubleshooting and understanding the events within your NSX environment.