CDP-compatible LLDP configuration example
Network requirements
As shown in Figure 73, Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2 of Switch A are each connected to a Cisco IP phone, which sends VLAN-tagged voice traffic.
Configure voice VLAN 2 on Switch A. Enable CDP compatibility of LLDP on Switch A to allow the Cisco IP phones to automatically configure the voice VLAN. The voice VLAN feature performs the following actions:
Confines the voice traffic to the voice VLAN.
Isolates the voice traffic from other types of traffic.
Figure 73: Network diagram
Configuration procedure
Configure a voice VLAN on Switch A:
# Create VLAN 2.
<SwitchA> system-view [SwitchA] vlan 2 [SwitchA-vlan2] quit
# Set the link type of Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2 to trunk, and enable voice VLAN on them.
[SwitchA] interface ten-gigabitethernet 1/0/1 [SwitchA-Ten-GigabitEthernet1/0/1] port link-type trunk [SwitchA-Ten-GigabitEthernet1/0/1] voice vlan 2 enable [SwitchA-Ten-GigabitEthernet1/0/1] quit [SwitchA] interface ten-gigabitethernet 1/0/2 [SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk [SwitchA-Ten-GigabitEthernet1/0/2] voice vlan 2 enable [SwitchA-Ten-GigabitEthernet1/0/2] quit
Configure CDP-compatible LLDP on Switch A:
# Enable LLDP globally, and enable CDP compatibility globally.
[SwitchA] lldp global enable [SwitchA] lldp compliance cdp
# Enable LLDP on Ten-GigabitEthernet 1/0/1. By default, LLDP is enabled on ports.
[SwitchA] interface ten-gigabitethernet 1/0/1 [SwitchA-Ten-GigabitEthernet1/0/1] lldp enable
# Configure LLDP to operate in TxRx mode on Ten-GigabitEthernet 1/0/1.
[SwitchA-Ten-GigabitEthernet1/0/1] lldp admin-status txrx
# Configure CDP-compatible LLDP to operate in TxRx mode on Ten-GigabitEthernet 1/0/1.
[SwitchA-Ten-GigabitEthernet1/0/1] lldp compliance admin-status cdp txrx [SwitchA-Ten-GigabitEthernet1/0/1] quit
# Enable LLDP on Ten-GigabitEthernet 1/0/2. By default, LLDP is enabled on ports.
[SwitchA] interface ten-gigabitethernet 1/0/2 [SwitchA-Ten-GigabitEthernet1/0/2] lldp enable
# Configure LLDP to operate in TxRx mode on Ten-GigabitEthernet 1/0/2.
[SwitchA-Ten-GigabitEthernet1/0/2] lldp admin-status txrx
# Configure CDP-compatible LLDP to operate in TxRx mode on Ten-GigabitEthernet 1/0/2.
[SwitchA-Ten-GigabitEthernet1/0/2] lldp compliance admin-status cdp txrx [SwitchA-Ten-GigabitEthernet1/0/2] quit
Verifying the configuration
# Verify that Switch A has completed the following tasks:
Discovering the IP phones connected to Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2.
Obtaining IP phone information.
[SwitchA] display lldp neighbor-information CDP neighbor-information of port 1[Ten-GigabitEthernet1/0/1]: CDP neighbor index : 1 Chassis ID : SEP00141CBCDBFE Port ID : Port 1 Software version : P0030301MFG2 Platform : Cisco IP Phone 7960 Duplex : Full CDP neighbor-information of port 2[Ten-GigabitEthernet1/0/2]: CDP neighbor index : 2 Chassis ID : SEP00141CBCDBFF Port ID : Port 1 Software version : P0030301MFG2 Platform : Cisco IP Phone 7960 Duplex : Full