LLDP протокол позволяет уведомить своих соседей о своем существовании и передать им свои характеристики, а также получать аналогичные сведения от соседей.
Рассмотрим основы конфигурации LLDP.
Активация протокола LLDP выполняется следующим образом (в качестве примера используем агент nearest-bridge):
lldp interface tengigabitethernet 0/0/1 agent nearest-bridge exit exit exit
Для просмотра найденных соседств, используется команда:
0/ME5100:SW_17.128# show lldp neighbors Thu Apr 25 17:47:55 2024 Capability codes: (R) Router, (B) Bridge, (T) Telephone, (D) DOCSIS Cable Device (W) WLAN Access Point, (r) Repeater, (H) Host, (s) Station only (TP) - Two Ports MAC Relay, (S) - S-VLAN, (C) - C-VLAN, (O) Other LLDP agent codes: (N) Nearest Bridge, (NnT) Nearest non-TPMR Bridge (NC) Nearest Customer Bridge local port device id port id capabilities agent system name --------------- ------------------ ------------------ --------------------- ------ ------------ te0/0/1 e4:5a:d4:de:01:e0 te0/0/1 B R N AR3_17.126 te0/0/2 e4:5a:d4:de:01:e0 te0/0/2 B R N AR3_17.126 te0/0/3 e4:5a:d4:de:01:e0 te0/0/3 B R N AR3_17.126 te0/0/4 e4:5a:d4:de:01:e0 te0/0/4 B R N AR3_17.126 te0/0/5 e4:5a:d4:de:03:00 te0/0/5 B R N AR2_17.127 te0/0/6 e4:5a:d4:de:03:00 te0/0/6 B R N AR2_17.127 te0/0/7 e4:5a:d4:de:37:c0 te0/0/26 B R N AR1_17.129 te0/0/8 e4:5a:d4:de:37:c0 te0/0/27 B R N AR1_17.129 te0/0/9 e4:5a:d4:de:37:c0 te0/0/28 B R N AR1_17.129 te0/0/10 e4:5a:d4:de:01:e0 te0/0/17 B R N AR3_17.126 te0/0/12 a8:f9:4b:8b:9a:00 te0/1/18 B R N DR1_17.141 te0/0/13 a8:f9:4b:8b:9a:00 te0/1/3 B R N DR1_17.141 te0/0/14 e4:5a:d4:de:37:c0 te0/0/25 B R N AR1_17.129 te0/0/15 e4:5a:d4:d6:2e:c0 te1/0/4 N te0/0/20 e4:5a:d4:de:37:c0 te0/0/29 B R N AR1_17.129
Детальную информацию об соседе мы можем посмотреть выполнив команду:
0/ME5100:SW_17.128# show lldp neighbors detail interfaces te0/0/1 Thu Apr 25 17:50:08 2024 Local Interface: Tengigabitethernet0/0/1 Chassis id: e4:5a:d4:de:01:e0 Port id: te0/0/1 Neighbor MAC address: e4:5a:d4:de:01:e1 Port Description: DR1 via SW System Name: AR3_17.126 System Description: Eltex ME5100 carrier router System Capabilities: Bridge, Router Enabled Capabilities: Bridge, Router Agent: Nearest Bridge Management Address: 3.3.3.5
Также имеется возможность изменить management address устройства для конкретного соседа:
lldp interface tengigabitethernet 0/0/1 agent nearest-bridge optional-tlv mgmt-addr set 172.20.1.1 exit exit exit
Или задать глобально:
lldp optional-tlv mgmt-addr set <IPv4 or IPv6> exit
Проверяем измененный management address на соседнем устройстве:
0/ME5100:SW_17.128# show lldp neighbors detail interfaces te0/0/1 Thu Apr 25 17:56:13 2024 Local Interface: Tengigabitethernet0/0/1 Chassis id: e4:5a:d4:de:01:e0 Port id: te0/0/1 Neighbor MAC address: e4:5a:d4:de:01:e1 Port Description: DR1 via SW System Name: AR3_17.126 System Description: Eltex ME5100 carrier router System Capabilities: Bridge, Router Enabled Capabilities: Bridge, Router Agent: Nearest Bridge Management Address: 172.20.1.1
Команда «optional-tlv» определяет, какие опции TLV-поля будут включены устройством в передаваемый LLDP пакет. По умолчанию передаются следующие TLV поля: mgmt-addr, port-desc, system-cap, system-desc, system-name.
Кроме агента: nearest-bridge, на маршрутизаторах ME поддерживаются следующие типы агентов: nearest-customer-bridge, nearest-non-tpmr-bridge.