Diving Deep into CDP

CDP does not run over IP, but it runs directly over the data link layer. When Ethernet is used, the IEEE 802.3 and IEEE 802.1 encapsulation are used rather than the usual Ethernet II direct encapsulation (which IPv4 uses). The Subnetwork Access Protocol (SNAP) is used. SNAP consists of 3 bytes of Logical Link Layer header (typically AA-AA-03), followed by the Cisco Organizational Unique Identifier (OUI) 00-00-0C, and the CDP identifier 20-00.

Figure 11-1 displays the CDP packet format.

Figure 11-1 CDP Packet Format

32 Bits

Version TTL

Checksum

Type 1

Length 1

Value 1

Type 2

Length 2

Value 2

■ ■ ■

Type n

Length n

Value n

The Version field is either 1 or 2. The Time to Live (TTL) field indicates the amount of time (in seconds) that a receiver should retain the information contained in this packet.

The actual information is conveyed by several combinations of Type, Length, and Value fields. The Length field is simply the length (in bytes) of the corresponding Value field. Table 11-1 shows the list of the published CDP types associated with different information elements.

Table 11-1 CDP Information

Type

Information

1

Hostname of the device or hardware serial number as an ASCII character string

2

Layer 3 address of the interface that sent the update

3

Port on which the CDP update has been sent

4

Functional capabilities of the device (router, switch, and so on)

5

Character string containing the software version (same as show version)

6

Hardware platform

7

List of IP directly attached network prefixes

9

VTP domain

10

In IEEE 802.1Q, the untagged VLAN (that is, the native VLAN)

11

Contains the duplex setting of the sending port

14 and 15

Negotiation of the auxiliary VLAN for IP phones

16

Amount of power a VoIP phone consumes (in milliWatts)

A CDP's expected behavior is to send this frame every 60 seconds or when the value of data from Table 11-1 changes. The CDP packets are sent to Ethernet multicast 0100.0CCC.CCCC. Upon receiving a CDP packet, a node should keep the information in its CDP neighbor cache for the value of the TTL field.

Continue reading here: CDP Risk Analysis

Was this article helpful?

0 0