Lets list logical switches and verify the Logical switches information from nsxcli command line on ESXi, KVM, NSX Edges and NSX Controller nodes. In order to get the logical switches information from the nsxcli command line run the “get logical-switches” command on the Transport nodes (ESXi, KVM and NSX Edge noes) and Controller nodes. In the previous blog posts, we have seen how to create the logical switches and how to connect vSphere and KVM virtual machines to logical switches.
To get the logical-switches information from the nsxcli command line on the ESXi/KVM hypervisors,
- Log in to the hypervisor hosts (ESXi/KVM) with the root credentials
- Type nsxcli command to enter into the nsxcli command-line prompt.
To list logical-switches information on the ESXi host:
The following are list of possible command line options to get logical-switches information, that includes the number of logical-switches available on the ESXi host, arp-table, mac-table and vtep-table for a given logical switches. If you arent sure of the command options, you may type the partial command and then press the TAB key to list all the possible options available for a specific command.
esx-04a.corp.local> get logical-switch % Ambiguous command: get logical-switch Possible alternatives: get logical-switch <logical-switch-id> get logical-switch <logical-switch-id> arp-table get logical-switch <logical-switch-id> mac-table get logical-switch <logical-switch-id> vtep-table get logical-switch {local | remote} {mac-cache | arp-cache | vtep-cache} <vni> get logical-switch-port status get logical-switches
List logical switches on ESXi host:
To list all the logical switches available on the ESXi host, run the get logical-swiches command.
This command will show the following details in the command output.
- Host switches configured on the ESXi host under Overlay Kernel Entry sectionwith the VNI, DVS Name and VIF num
- Logical switches information under the Overlay LCP Entry section with the logical Switch VNI and Logical Switch UUID
- VLAN backed logical switches under the VLAN Backed Entry Section with the Logical Switch UUID and VLAN ID.
esx-04a.corp.local> get logical-switches Logical Switches Summary ------------------------------------------------------------ Overlay Kernel Entry ============================================================ VNI DVS name VIF num Overlay LCP Entry ============================================================ VNI Logical Switch UUID 73729 e6b3552b-ded8-432e-bd35-58cb177704ad 73732 350360c8-54f0-4b55-884c-37d1299a8c26 73731 941e0e3c-8f81-4292-a393-8844d9d229e5 73728 3cacd5b9-d231-46ab-9225-6fb135e729aa 73730 e03cd08f-2206-44c4-9e46-2f25e1b4e77c VLAN Backed Entry ============================================================ Logical Switch UUID VLAN ID
List Logical Switches details:
If you want to get more details for a specific VNI, run the following command. The command output includes the details of the DVS Name, VNI, Replication mode configured for a given logical switch, Multicast proxy, Controller IP details, etc.,
esx-04a.corp.local> get logical-switch 56207 Logical Switch -------------------------------------------------------------- Host Kernel Entry ============================================================== DVS name : Overlay VNI : 56207 Replication mode : unicast mtep Multicast proxy enable : True ARP proxy enable : True CP connection up : True Controller IP : 192.168.110.213 MAC entry count : 0 ARP entry count : 0 VIF entry count : 1 MTEP entry count : 0 Routing Domain : c37e27ac-975b-4426-a45f-bc0c813bd0a2 LCP Entry =========================================================== Logical switch UUID : 2b6b475a-93ec-422c-ba14-f7b34beabc0c VNI : 56207 Replication mode : unicast mtep Transport binding : None Vlan ID : None Admin state up : True esx-04a.corp.local>
List Logical Switches arp-table:
If you want to get the arp-table for a given logical switch, run the following command.
esx-04a.corp.local> get logical-switch 56207 arp-table
List logical switches vTEP table:
esx-04a.corp.local> get logical-switch 56207 vtep-table Logical Switch VTEP Table ----------------------------------------------------------------- Host Kernel Entry ================================================================ Label VTEP IP Segment ID Is MTEP VTEP MAC BFD count 36870 192.168.140.154 192.168.140.0 False 00:50:56:88:a8:71 1 36869 192.168.140.153 192.168.140.0 False 00:50:56:88:05:8f 1 LCP Remote Entry ================================================================ Label VTEP IP Segment ID VTEP MAC DEVICE NAME 36869 192.168.140.153 192.168.140.0 00:50:56:88:05:8f None 36870 192.168.140.154 192.168.140.0 00:50:56:88:a8:71 None LCP Local Entry ================================================================ Label VTEP IP Segment ID VTEP MAC DEVICE NAME esx-04a.corp.local>
List logical switches on NSX Controller:
nsxctrl-01a> get logical-switches VNI UUID Name 73729 e6b3552b-ded8-432e-bd35-58cb177704ad App Logical Switch 73732 350360c8-54f0-4b55-884c-37d1299a8c26 transit-bp-fa9e6b4b-dd80-4db6-87ea-9a69c16839d1 73730 e03cd08f-2206-44c4-9e46-2f25e1b4e77c DB Logical Switch 73728 3cacd5b9-d231-46ab-9225-6fb135e729aa Web Logical Switch 73731 941e0e3c-8f81-4292-a393-8844d9d229e5 transit-rl-38fe3f37-4a7b-49a7-a793-98678917c32b nsxctrl-01a>
List logical switches on NSX Edge nodes:
edge-01a> get logical-switches Logical Switch UUID : cfa308c8-d5d3-5ef1-9d82-9e6c318abc98 VLAN : untagged device : fp-eth1 IFUID : 1 Logical Switch UUID : 04d13460-9ef4-4ca8-93e3-0a98e2260f0a VLAN : untagged device : fp-eth0 IFUID : 0 Logical Switch UUID : 350360c8-54f0-4b55-884c-37d1299a8c26 VNI : 73732 ENCAP : GENEVE Replication : mtep routing-domain: fa9e6b4b-dd80-4db6-87ea-9a69c16839d1 Logical Switch UUID : 3cacd5b9-d231-46ab-9225-6fb135e729aa VNI : 73728 ENCAP : GENEVE Replication : mtep routing-domain: 38fe3f37-4a7b-49a7-a793-98678917c32b Logical Switch UUID : d9e87f2a-9240-49da-856c-115b58934786 VNI : 73733 ENCAP : GENEVE Replication : mtep routing-domain: 38fe3f37-4a7b-49a7-a793-98678917c32b Logical Switch UUID : e6b3552b-ded8-432e-bd35-58cb177704ad VNI : 73729 ENCAP : GENEVE Replication : mtep routing-domain: 38fe3f37-4a7b-49a7-a793-98678917c32b Logical Switch UUID : 941e0e3c-8f81-4292-a393-8844d9d229e5 VNI : 73731 ENCAP : GENEVE Replication : mtep routing-domain: fa9e6b4b-dd80-4db6-87ea-9a69c16839d1 Logical Switch UUID : e03cd08f-2206-44c4-9e46-2f25e1b4e77c VNI : 73730 ENCAP : GENEVE Replication : mtep routing-domain: 38fe3f37-4a7b-49a7-a793-98678917c32b edge-01a>
Please refer to the VMware Documentation for more information on NSX-T Data Center product at https://docs.vmware.com/en/VMware-NSX-T/index.html
I hope this is informative for you and I thank you for reading.
Related Posts:
- NSX-T 2.1 Complete video series:
- Introduction to NSX-T
- NSX-T Architecture
- Deploy NSX-T Manager Virtual Machine on ESXi host
- Configure NSX-T Control cluster
- Prepare ESXi host as fabric node in NSX-T
- Prepare KVM hosts as fabric Node in NSX-T
- How to add vCenter Server as Compute Manager?
- What is N-VDS or hostSwitch in NSX-T?
- How to create Transport Zones in NSX-T?
- What is Uplink Profile and how to Create in NSX-T?
- Create an IP pools for TEP in NSX-T
- Verify hostswitch configuration on ESXi and KVM
- How to create Logical Switches in NSX-T?