VMware ESX Networking | Trabajando con Cisco Discovery Protocol (CDP) Parte 1
21 julio, 2009 por
VMware ESX Networking | Trabajando con Cisco Discovery Protocol (CDP) Parte 1
Solop, Nicolas

Una de las funcionalidades más interesantes para los administradores de red que cuentan con equipamiento Cisco es la posibilidad de comprender la topología completa de su red por medio del Cisco Discovery Protocol o CDP.

Por defecto VMware ESX Server viene con el CDP habilitado solo  para “escuchar” a nuestros vecinos de red Cisco. Para ver esta configuración tenemos que ejecutar el comando:

[root@esxserver root]# esxcfg-vswitch -b vSwitch0
listen
[root@esxserver root]#

Donde vSwitch0 es el nombre del virtual switch al cual le queremos habilitar CDP.

Cuáles son las opciones que tenemos para trabajar con Cisco Discovery Protocol? Para verlo tenemos que ejecutar el comando:

[root@esxserver root]# esxcfg-vswitch
esxcfg-vswitch [options] [vswitch[:ports]]
  -a|—add                          Add a new virtual switch.
  -d|—delete                     Delete the virtual switch.
  -l|—list                            List all the virtual switches.
  -L|–link=pnic                  Set pnic as an uplink for the vswitch.
  -U|–unlink=pnic             Remove pnic from the uplinks for the vswitch.
  -M|–add-pg-uplink         Add an uplink to the list of uplinks for a portgroup
  -N|–del-pg-uplink          Delete an uplink from the list of uplinks for a portgroup
  -p|–pg=portgroup          Specify a portgroup for operation
                                         Use ALL to set VLAN IDs on all portgroups
  -v|–vlan=id                     Set vlan id for portgroup specified by –p
                                         0 would disable the vlan
  -c|—check                       Check to see if a virtual switch exists.
                                         Program outputs a 1 if it exists, 0 otherwise.
  -A|–add-pg=name          Add a new portgroup to the virtual switch.
  -D|–del-pg=name           Delete the portgroup from the virtual switch.
  -C|–check-pg=name       Check to see if a portgroup exists.  Program
                                         outputs a 1 if it exists, 0 otherwise.
  -B|–set-cdp                    Set the CDP status for a given virtual switch.
                                         To set pass one of "down", "listen", "advertise", "both".
  -b|–get-cdp                   Print the current CDP setting for this switch.
  -m|–mtu=MTU                Set MTU for the vswitch. This affects all the nics attached on the vswitch.
  -r|—restore                     Restore all virtual switches from the configuration file
                                         (FOR INTERNAL USE ONLY).
  -h|—help                         Show this message.
[root@esxserver root]#

Para habilitar el anuncio y escucha del switch virtual a sus vecinos Cisco tenemos que configurarlo en modo “both” ejecutando el siguiente comando:

[root@esxserver root]# esxcfg-vswitch -B both vSwitch0
[root@esxserver root]#

En nuestro ejemplo ya teníamos configurado el Cisco Discovery Protocol en both.

VMware ESX Server - Cisco Discovery Protocol CDP Configuration

Espero que les sirva.

Nicolas Solop