Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


lldpad_-_link_layer_discovery_protocol_lldp_agent_daemon

This is an old revision of the document!


If you have a switch that supports LLDP, then you can use the lldpad to send and receive LLDP PDUs.

Install and enable lldpad

yum install lldpad
chkconfig lldpad on
service lldpad start

LLDP settings

  • -L = set parameters for interface
  • -i = interface
  • -g = bridge scope
  # enable transmission of information
  lldptool -L -i eth0 adminstatus=rxtx
  
  lldptool -i eth0 -T -V portDesc enableTx=yes
  lldptool -i eth0 -T -V sysName  enableTx=yes
  lldptool -i eth0 -T -V sysDesc enableTx=yes
  lldptool -i eth0 -T -V sysCap enableTx=yes
  lldptool -i eth0 -T -V mngAddr ipv4=192.168.42.66 enableTx=yes
  
  service lldpad restart

Query neighbour from command line

lldptool -t -n -i eth0

Chassis ID TLV
        MAC: 9c:8e:99:bd:b1:20
Port ID TLV
        Local: 12
Time to Live TLV
        120
Port Description TLV
        Port #12
System Name TLV
        switch1
System Description TLV
         HP ProCurve 1810G - 24 GE, P.2.12, eCos-2.0, CFE-2.1
System Capabilities TLV
        System capabilities:  Bridge
        Enabled capabilities: Bridge
Management Address TLV
        IPv4: 192.168.40.11
        Ifindex: 25
End of LLDPDU TLV

View from switch Web GUI

tcpdump LLDP

  • Port and CDP Neighbor Info:
    tcpdump -v -s 1500 -c 1 '(ether[12:2]=0x88cc or ether[20:2]=0x2000)'
lldpad_-_link_layer_discovery_protocol_lldp_agent_daemon.1402405599.txt.gz · Last modified: 2014/06/10 13:06 by admin