How to Enable CDP On Cisco UCS vNICs

If you are familiar with managing VMware ESX 3.5/4.x in an environment that includes Cisco LAN switches then you have probably used “CDP listen state” that is enabled by default on an ESX install. To view this information in vCenter select an ESX host, go to the configuration tab in the right pane, select the Networking link and then click on the little blue call out box next to a vmnic that is uplinked to a vSwitch. A pop-up window opens displaying the CDP information. The information can be invaluable when troubleshooting networking issues. You can determine which switch/switch port the NIC is plugged into, native VLAN and other useful information. This is also a great way to verify that your vSwitch uplinks are going to 2 different physical switches (if you have that option).





As I stated earlier the default CDP configuration on an ESX vSwitch is the listen only state. I have found that the network engineers find it very useful if you configure CDP to advertise as well. When you enable this on a vSwitch the network engineer can issue the “show cdp neighbors” command from the IOS command line and witch switch ports each ESX vmnic is plugged into. This can also be very useful when you and the network engineer are troubleshooting network issues with ESX.


To configure CDP to advertise run this command from the ESX console or from an SSH session.

“esxcfg-vswitch -B both vSwitch0”

To check the state of the CDP configuration run this command..

“esxcfg-vswitch -b vSwitch0”

Note – you must enable CDP on all vSwitches if you want to see every vmnic from the switch side.

If you are using a VMware vNetwork Distributed Switch then you can configure the CDP state from the vCenter GUI. To do this go to the edit settings on the dvSwitch and then go to Advanced.




Ok, now to the point of configuring all of this on Cisco UCS blades.

By default the vNICs in Cisco UCS have CDP listen and advertise turned off. You can see this from an ESX host that is running on a UCS blade by clicking on the little blue call out box. When the pop-up opens it states that Cisco Discovery Protocol is not available.




To enable CDP the first thing you must do is to create a new Network Control policy. To do this go to the LAN tab in UCSM, expand Policies, right-click Network Control Policies to create a new policy. Name it something like “Enable-CDP” and select the option to enable CDP.




The next step is to apply the new policy to the ESX vNICs. If you are using updating vNIC templates then all you need to do is go to each vNIC template for your ESX vNICs select the new policy from the Network Control Policy drop down. If you are not using vNIC templates but you are using an updating Service Profile Template then you can enable it there. If you are using one-off Service Profiles are a non-updating Service Profile then you must go to every Service Profile and enable this new policy on every vNIC.








Now when you click the call-out box you should see the CDP information coming from the Fabric Interconnect that you are plugged into.




3 thoughts on “How to Enable CDP On Cisco UCS vNICs

  1. Funny that you would blog about this, I was just discussing the use of CDP in VMware vSphere environments on Cisco UCS last week while at Cisco RTP. Given the architecture of Cisco UCS, I’m not entirely sure that CDP will be as useful in UCS environments as it was in standard rackmounted server environments. Any thoughts on whether it’s really useful to enable CDP? It does show you to which vEthernet the vmNIC is connected; I suppose that might be handy if you are trying to verify the configuration.

  2. You are right that it is not as useful as in a rack mount server environment where you have 6+ NICs. Where it is useful is in verifying that you have each uplink configured to for a different Fabric Interconnect (A and B). Also useful on the Fabric Interconnect side so that you can see which Eth interface you pinned to. If you SSH to the Fabric Interconnect and then “connect nxos” you can issue “show cdp neighbors” command to see which Eth that vmnic is pinned to.

  3. This blog is about a bigger environments with UCSMAN , what about folks in smaller standalone UCS environments with the same issue where cdp is not available on some vmnics.I have enabled listen and advertise in the esxi host on all the 4 vSwitches but nothing has changed..any help?

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s