<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ESX &#8211; Blog of Kliment Andreev &#8211; A place so I won&#039;t forget things</title>
	<atom:link href="https://blog.andreev.it/tag/esx/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.andreev.it</link>
	<description></description>
	<lastBuildDate>Thu, 05 Nov 2020 14:12:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>ESX/ESXi, Cisco: Trace network cables remotely using Cisco CDP</title>
		<link>https://blog.andreev.it/2012/01/trace-network-cables-remotely-using-cisco-cdp/</link>
					<comments>https://blog.andreev.it/2012/01/trace-network-cables-remotely-using-cisco-cdp/#respond</comments>
		
		<dc:creator><![CDATA[Kliment Andreev]]></dc:creator>
		<pubDate>Fri, 20 Jan 2012 20:39:17 +0000</pubDate>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[ESX/ESXi]]></category>
		<category><![CDATA[Cisco CDP]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[ESXi]]></category>
		<guid isPermaLink="false">http://blog.iandreev.com/?p=291</guid>

					<description><![CDATA[Several times I had to trace a network cable from a server to the&#8230;]]></description>
										<content:encoded><![CDATA[<div id="bsf_rt_marker"></div><p>Several times I had to trace a network cable from a server to the switch. Most of the times, this can be a pain, because cables are so tight to each other, that it is almost impossible to trace them. Fortunately, there is a way to trace a cable.<br />
First, make sure that CDP is enabled on your switch, because if it&#8217;s not, nothing further will work. If you have an ESX host, by default CDP on the NICs is disabled, so you&#8217;ll have to enable it. Refer to this <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1003885" target="_blank" rel="noopener noreferrer">VMWare article</a>, but pretty much all you have to do is to enable it on all virtual switches.</p>
<pre class="brush: bash; title: ; notranslate">
esxcfg-vswitch -B both vSwitchX
</pre>
<p>, where <strong>X </strong>is the switch number (e.g vSwitch0).<br />
Once you do that, wait for 60 seconds for the CDP broadcast, and then go to vCenter, select the ESX host, click the <strong>Configuration </strong>tab, then <strong>Networking </strong>and on the right side, click on the comic baloon shape next to the physical NIC. You should see something like this.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2012/01/P020-01.png"><img fetchpriority="high" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2012/01/P020-01.png" alt="" width="467" height="511" class="aligncenter size-full wp-image-8603" srcset="https://blog.andreev.it/wp-content/uploads/2012/01/P020-01.png 467w, https://blog.andreev.it/wp-content/uploads/2012/01/P020-01-274x300.png 274w" sizes="(max-width: 467px) 100vw, 467px" /></a><br />
This means that the physical NIC is connected to a device called <strong>SB-CORE2</strong>, the blade number is 8, and the port number is 8 as well (Gigabit8/8). If you have a Windows OS, it might be easier if you find a MAC address of the NIC, and then do <strong>show mac-address | i </strong> where aabb.ccdd.eeff is the MAC address. Most of the times, you won&#8217;t have access to the network switch, so what you have to do is to download a tool called TCPdump from <a href="http://www.microolap.com/products/network/tcpdump/download/">here</a>. Put this tool somewhere on the server and execute from a command prompt:</p>
<pre class="brush: bash; title: ; notranslate">
tcpdump -D
</pre>
<p>You will see a list of *ALL* NICs on the server, but what you need is the actual physical NIC, in my case number 5.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2012/01/P020-02.png"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2012/01/P020-02.png" alt="" width="650" height="405" class="aligncenter size-full wp-image-8604" srcset="https://blog.andreev.it/wp-content/uploads/2012/01/P020-02.png 650w, https://blog.andreev.it/wp-content/uploads/2012/01/P020-02-300x187.png 300w, https://blog.andreev.it/wp-content/uploads/2012/01/P020-02-585x365.png 585w" sizes="(max-width: 650px) 100vw, 650px" /></a><br />
Now, execute:</p>
<pre class="brush: bash; title: ; notranslate">
tcpdump -i 5 -nn -v -s 1500 -c 1 ether&#x5B;20:2] == 0x2000
</pre>
<p>where &#8220;-i 5&#8221; is the 5th adapter. For more information, follow up this <a href="http://chall32.blogspot.com/2009/10/cisco-discovery-protocol-for-windows.html">link</a>. And, this is the output.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2012/01/P020-03.png"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2012/01/P020-03.png" alt="" width="677" height="714" class="aligncenter size-full wp-image-8605" srcset="https://blog.andreev.it/wp-content/uploads/2012/01/P020-03.png 677w, https://blog.andreev.it/wp-content/uploads/2012/01/P020-03-284x300.png 284w, https://blog.andreev.it/wp-content/uploads/2012/01/P020-03-585x617.png 585w" sizes="(max-width: 677px) 100vw, 677px" /></a><br />
Update 06/13/2012: For an ESXi host, use VMware vSphere CLI:</p>
<pre class="brush: bash; title: ; notranslate">
vicfg-vswitch.pl --server your.vcenter.server -h your.esxi.host -B both vSwitch0
</pre>
<p>You are going to be prompted for an username and password. Wait for 5-10 minutes and the information will show up.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.andreev.it/2012/01/trace-network-cables-remotely-using-cisco-cdp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
