Industrial vSwitch (IvS) is used for manifacturing use case where realtime application is required. IvS can support low latency forwarding for industrial ethernet called Profinet. To troubleshoot the details of IvS, sometimes vDS internal information like PortID and Switch ID are required to specify as command options. This article describes how to get these IDs for IvS.
4.2.x
IvS is one of the features of distributed vSwich managed by NSX-T. Therefore, the cli command “net-stats -l” can be used to retrieve Port ID from the vSwitch. The outputs can show the Port ID (PortNum) for the vnic that is connected to the VM and its also has MAC address of the vnic. So you can identify the Port ID by VM name or MAC address.
[root@localhost:~] net-stats -l
PortNum Type SubType SwitchName MACAddress ClientName
(snip)
67108928 5 9 DvsPortset-0 <MAC Address #1> <VM name with vnic #1>
67108932 5 9 DvsPortset-0 <MAC Address #2> <VM name with vnic #2>
67108935 5 9 DvsPortset-0 <MAC Address #3> <VM name with vnic #3>
(snip)
Some of the commands require Switch ID value for the options to specify the right vDS. The Switch ID value can be found by using “nsxcli -c get ens switch list”. For example, the next command shows that the Switch ID (swID) value of DvsPorttest-2 is 0.
[root@localhost:~] nsxcli -c get ens switch list
Fri Feb 21 2025 UTC 13:52:30.115
name : DvsPortset-2
swID : 0
maxPorts : 128
numActivePorts : 12
numPorts : 12
mtu : 1500
numLcores : 4
lcoreIDs : 0 1 2 3