{"id":2215,"date":"2015-08-28T16:04:12","date_gmt":"2015-08-28T15:04:12","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=2215"},"modified":"2015-08-28T16:04:12","modified_gmt":"2015-08-28T15:04:12","slug":"troubleshooting-vmware-networking","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=2215","title":{"rendered":"Troubleshooting VMWare Networking"},"content":{"rendered":"<p>To locate a VM Host on a Cisco switch, enable the sending of CDP (Cisco Discovery Protocol) packets on the VMWare host, the syntax is:<\/p>\n<blockquote><p># esxcli network vswitch standard set \u2013c both \u2013v vSwitch# (Note: Replace # with the vSwitch number)<\/p><\/blockquote>\n<p>In ESXCLI 5.1, you can now retrieve additional network statistics at a physical NIC (vmnic), on a per VLAN (portgroup) which needs to be configured and on a per VM port (vNIC). Here is a quick diagram to help you visualize where you can retrieve network statistics:<!--more--><\/p>\n<p><a href=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2015\/08\/VMWare-Net-diagram.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-2216\" src=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2015\/08\/VMWare-Net-diagram.png\" alt=\"VMWare-Net-diagram\" width=\"885\" height=\"684\" srcset=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2015\/08\/VMWare-Net-diagram.png 885w, http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2015\/08\/VMWare-Net-diagram-300x232.png 300w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/><\/a><\/p>\n<p>list all available vmnics:<\/p>\n<blockquote><p># esxcli network nic list<\/p><\/blockquote>\n<p>Get stats for a single vmnic:<\/p>\n<blockquote><p>\u00a0# esxcli network nic stats get -n vmnic2<\/p><\/blockquote>\n<p>Statistics on a per portgroup (vlan) basis using the new \u201cvlan\u201d namespace.<br \/>\nNOTE: By default VLAN statistics is disabled. To enable:<\/p>\n<blockquote><p>\u00a0# esxcli network nic vlan stats set -e true -n vmnic2<\/p><\/blockquote>\n<p>Get VLAN stats for vmnic:<\/p>\n<blockquote><p>\u00a0# esxcli network nic vlan stats get -n vmnic2<\/p><\/blockquote>\n<p>Use \u201cvm\u201d namespace &#8211; list all virtual machines, ports (configured vNIC) and networks:<\/p>\n<blockquote><p># esxcli network vm list<\/p><\/blockquote>\n<p>Get World ID (World ID is process ID for a given VM):<\/p>\n<blockquote><p>\u00a0# esxcli vms vm list<\/p><\/blockquote>\n<p>Use World ID for details about the VM\u2019s network configuration (Port ID, VSS\/VDS, Portgroup, DVPort Group, MAC Address, IP Address, vmnic Uplink, Uplink ID and any active filters):<\/p>\n<blockquote><p>\u00a0# esxcli network vm port list -w [World ID]<\/p><\/blockquote>\n<p>Note: IP Address information is made available by ARP packet inspection, which is disabled by default. To enable:<\/p>\n<blockquote><p>\u00a0# esxcli system settings advanced set -o \/Net\/GuestIPHack -i 1<\/p><\/blockquote>\n<p>Now retrieve network statistics per VM port (vNIC) using new \u201cport\u201d namespace. (Port ID US located in previous step)<\/p>\n<blockquote><p># esxcli network port stats get -p 50331660<\/p><\/blockquote>\n<p>&#8212;<\/p>\n<p>source: <a href=\"https:\/\/blogs.vmware.com\/vsphere\/2013\/01\/network-troubleshooting-using-esxcli-5-1.html\">https:\/\/blogs.vmware.com\/vsphere\/2013\/01\/network-troubleshooting-using-esxcli-5-1.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To locate a VM Host on a Cisco switch, enable the sending of CDP (Cisco Discovery Protocol) packets on the VMWare host, the syntax is: # esxcli network vswitch standard set \u2013c both \u2013v vSwitch# (Note: Replace # with the vSwitch number) In ESXCLI 5.1, you can now retrieve additional network statistics at a physical [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[80],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2215"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2215"}],"version-history":[{"count":1,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2215\/revisions"}],"predecessor-version":[{"id":2217,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2215\/revisions\/2217"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2215"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}