Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

The Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer protocol used by network devices for advertising their identity, capabilities, and neighbors on ethernet networks. The protocol is formally referred to by the IEEE as Station and Media Access Control Connectivity Discovery specified in standards document IEEE 802.1AB

Figure1: LLDP packet format and the mandatory LLDP PDUs

The LLDP frame consists of the following:

  1. a well know destination multicast address (01:80:C2:00:00:0E)
  2. ether type of 0x88cc
  3. LLDP PDU consisting of the following mandatory LLDP TLVs:
    1. Chassis TLV: Identifies the 802 LAN device's chassis. 
    2. Port-ID TLV: Identifies the port from which the LLDPDU is transmitted.
    3. TTL TLV: Indicates how long (in seconds) the LAN device's information received in the LLDPDU is to be treated as valid information. Non-zero information indicates the device's information is to be updated in the LLDP remote system MIB. A value of 0 indicates the information associated with the LAN device is no longer valid and should be removed.
    4. End-of-LLDP TLV:  Indicates the end of TLVs in the LLDPDU.

Typically, an open flow controller uses LLDP messages to discover neighbor devices, active links and hosts connected to the open flow switches. Following represents a typical flow used to relay LLDP messages from an open flow switch to the controller

dl_dst=01:80:c2:00:00:0e,dl_type=0x88cc, actions:CONTROLLER

 

Alternatively LLDP can be enabled in PicOS. PicOS supports the following LLDP TLVs:

  1. Port Description TLV
  2. System Name TLV
  3. System Description TLV
  4. System Capabilities TLV
  5. Management Address TLV.802.1 
  6. Organizationally Specific TLV includes: 
    1. PVID TLV (The default value is false)
    2. MAC PHY TLV (The default value is false)
    3. MDI TLV (The default value is false)
    4. Max Frame Size TLV (The default value is false)

 

 PicOS supports LLDP from version 2.6.

LLDP commands

Enable or disable lldp on bridge

admin@PicOS-OVS$ovs-vsctl set bridge br0 lldp_enable=true
admin@PicOS-OVS$ovs-vsctl clear bridge br0 lldp_enable

LLDP admin status

admin@PicOS-OVS$ovs-vsctl set interface ge-1/1/1 lldp_admin_status=RxTx
admin@PicOS-OVS$ovs-vsctl set interface ge-1/1/1 lldp_admin_status=RxOnly
admin@PicOS-OVS$ovs-vsctl set interface ge-1/1/1 lldp_admin_status=TxOnly
admin@PicOS-OVS$ovs-vsctl set interface ge-1/1/1 lldp_admin_status=disabled

LLDP transmit parameters

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-msg-tx-hold=4
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-msg-tx-interval=30
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-reinit-delay=2
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tx-delay=2

LLDP transmit parameters on a per interface

ovs-vsctl set interface te-1/1/25 lldp_tx_interval=4
ovs-vsctl set interface te-1/1/25 lldp_tx_delay=2
 
clear commands:
ovs-vsctl clear interface te-1/1/14 lldp_tx_interval
ovs-vsctl clear interface te-1/1/14 lldp_tx_delay

Optional TLVs in lldpdu

Port Description TLV (The default value is true)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-port-desc=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-port-desc=false

 

System Name TLV (The default value is true)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-name=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-name=false

 

System Description TLV (The default value is true)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-desc=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-desc=false

 

System Capabilities TLV (The default value is true)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-cap=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-cap=false

 

Management Address TLV (The default value is true)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-mgmt-addr=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-mgmt-addr=false

 

PVID TLV (802.1 Organizationally Specific TLV) (The default value is false)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-pvid=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-pvid=false

 

MAC PHY TLV (802.3 Organizationally Specific TLV) (The default value is false)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-mac-phy=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-mac-phy=false

 

Power Via MDI TLV (802.3 Organizationally Specific TLV) (The default value is false)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-power-via-mdi=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-power-via-mdi=false

 

Link Aggregation TLV (802.3 Organizationally Specific TLV) (The default value is false)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-link-aggregation=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-link-aggregation=false

 

Max Frame Size TLV (802.3 Organizationally Specific TLV) (The default value is false)

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-max-frame-size=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-max-frame-size=false

show configuration

admin@PicOS-OVS$ovs-vsctl list bridge br0
admin@PicOS-OVS$ovs-vsctl list interface ge-1/1/1

show LLDP remote neighbors

admin@PicOS-OVS$ovs-vsctl list lldp_neighbor

show LLDP using "ovs-appctl"

admin@PicOS-OVS$ovs-appctl lldp/show br0
admin@PicOS-OVS$ovs-appctl lldp/show br0 ge-1/1/1

Examples

topology

default port status test

Cisco3560 (mac 00:22:BE:96:F5:94):

Switch#configure terminal
Switch(config)#lldp run(default status is TXRx)
Switch(config)#monitor session 1 source interface gigabitEthernet 0/20 rx
Switch(config)#monitor session 1 destination interface gigabitEthernet 0/19

P3297 (mac 00:e0:ec:25:2d:5e):

admin@PicOS-OVS$ovs-vsctl set bridge br0 lldp_enable=true
not  set lldp_admin_status(default value is RxTx)
admin@PicOS-OVS$ovs-vsctl list lldp_neighbor
_uuid               : dc8a0cba-aefd-4b54-b02f-e53b315fd783
local_id            : "<00:e0:ec:25:2d:5e>:<ge-1/1/20>"
mgmt_address        : {"10.10.51.132"=0}
port_description    : "GigabitEthernet0/20"
remote_id           : "<00:22:be:96:f5:80>:<Gi0/20>"
system_description  : "Cisco IOS Software, C3560E Software (C3560E-UNIVERSALK9-M), Version 15.0(2)SE2, RELEASE SOFTWARE (fc1)\nTechnical Support: http://www.cisco.com/techsupport\nCopyright (c) 1986-2013 by Cisco Systems, Inc.\nCompiled Tue 05-Feb-13 12:04 by prod_rel_team"
system_name         : Switch
admin@PicOS-OVS$

Result:

7/1: receive the lldp from both Cisco3560 and P3297

7/2: only receiving the lldp with src mac 00:e0:ec:25:2d:5e





note

1. LLDP only works on physical ports;

2. PicOS does not support power-via-mdi TLV;

3. 1=<lldp-tx-delay<=0.25*msg-tx-interval;

  • No labels