Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CDP (cdp)

Reached from

Lower layerSelectorValue
snappid8192 (0x2000)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)2CDP protocol version (2).
ttluint(8)180Time this advertisement stays valid, in seconds.
checksumuint(16)Internet checksum over the header and everything after itInternet checksum over the CDP header and TLVs (Auto).
tlvstlv — rest of the PDUCDP TLVs (16-bit type, 16-bit length including the header).

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)device_id
2 (0x0002)addresses
3 (0x0003)port_id
4 (0x0004)capabilities
5 (0x0005)software_version
6 (0x0006)platform
7 (0x0007)ip_prefix
10 (0x000a)native_vlan
11 (0x000b)duplex

Sample templates

  • cdp — templates/protocols/l2/cdp.wpg.yaml