Configuring CDPv2 for voice transmission

Legacy Cisco VOIP phones only support manual configuration or using CDPv2 for voice VLAN auto-configuration. LLDP-MED is not supported. CDPv2 exchanges information such as software version, device capabilities, and voice VLAN information between directly connected devices such as a VOIP phone and a switch.

When the Cisco VOIP phone boots up (or sometimes periodically), it queries the switch and advertises information about itself using CDPv2. The switch receives the VOIP VLAN Query TLV (type 0x0f) from the phone and then immediately sends the voice VLAN ID in a reply packet to the phone using the VLAN Reply TLV (type 0x0e). The phone then begins tagging all packets with the advertised voice VLAN ID.
NOTE:

A voice VLAN must be configured before the voice VLAN can be advertised. For example, to configure VLAN 10 as a voice VLAN tagged for ports 1 through 10, enter these commands:

switch(config)# vlan 10
switch(vlan-10)# tagged 1-10
switch(vlan-10)# voice
switch(vlan-10)# exit
The switch CDP packet includes these TLVs:
  • CDP Version: 2

  • CDP TTL: 180 seconds

  • Checksum

  • Capabilities (type 0x04): 0x0008 (is a switch)

  • Native VLAN: The PVID of the port

  • VOIP VLAN Reply (type 0xe): voice VLAN ID (same as advertised by LLDPMED)

  • Trust Bitmap (type 0x12): 0x00

  • Untrusted port COS (type 0x13): 0x00

CDP should be enabled and running on the interfaces to which the phones are connected. Use the cdp enable and cdp run commands.

The pre-standard-voice option for the cdp mode command allows the configuration of CDP mode so that it responds to received CDP queries from a VoIP phone.

Syntax:


no cdp mode pre-standard-voice [admin-status < port-list > [tx_rx | rxonly]]
Enable CDP-compatible voice VLAN discovery with pre-standard VoIP phones. In this mode, when a CDP VoIP VLAN query is received on a port from pre-standard phones, the switch replies back with a CDP packet that contains the VID of the voice VLAN associated with that port.
NOTE:

Not recommended for phones that support LLDP-MED.

pre-standard-voice

Enables CDP-compatible voice VLAN discovery with pre-standard VoIP phones.

admin-status

Sets the port in either transmit and receive mode, or receive mode only.Default: tx-rx.
<port-list>

Sets this port in transmit and receive mode, or receive mode only.

rxonly

Enable receive-only mode of CDP processing.

tx_rx

Enable transmit and receive mode.

switch(config)# cdp mode pre-standard-voice admin-status A5 rxonly

The show cdp output when CDP Run is disabled

switch(config)# show cdp
Global CDP information
Enable CDP [yes] : no

The show cdp output when cdp run and sdp mode are enabled

switch(config)# show cdp

 Global CDP Information

  Enable CDP [Yes]  : Yes
  CDP mode [rxonly] : pre-standard-voice
  CDP Hold Time [180] : 180
  CDP Transmit Interval [60] : 60

  Port CDP       admin-status
  ---- --------- ------------
  A1   enabled   rxonly
  A2   enabled   tx_rx
  A3   enabled   tx_rx

When CDP mode is not pre-standard voice, the admin-status column is note displayed.

The show cdp output when cdp run and cdp mode rxonly are enabled

switch(config)# show cdp

 Global CDP Information

  Enable CDP [Yes} : Yes
  CDP mode [rxonly] : rxonly

  Port CDP
  ---- --------
  A1   enabled
  A2   enabled
  A3   enabled

The show running-config when admin-status is configured

switch(config)# show running-config

Running configuration:

; J9477A Configuration Editor; Created on release #XX.16.09.0000x
; Ver #03:01:1f:ef:f2
hostname “Switch”
module 1 type J9307A
cdp mode pre-standard-voice admin-status A5 RxOnly