Skip to content

Commit

Permalink
New template for Alcatel AOS: show lldp remote-system (#1917)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Bear <[email protected]>
  • Loading branch information
evilmonkey19 and mjbear authored Dec 9, 2024
1 parent fded2cb commit b6b030d
Show file tree
Hide file tree
Showing 6 changed files with 381 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Value Filldown LOCAL_INTERFACE (\S+)
Value Required CHASSIS_ID (\S+)
Value Required MAC_ADDRESS (\S+)
# question mark in many regexes so we don't capture the optional trailing comma
Value REMOTE_ID (.+?)
Value CHASSIS_SUBTYPE (.+?)
Value PORT_SUBTYPE (.+?)
Value NEIGHBOR_INTERFACE (.+?)
Value NEIGHBOR_NAME (.+?)
Value NEIGHBOR_DESCRIPTION (.+?)
Value CAPABILITIES_SUPPORTED (.+?)
Value CAPABILITIES_ENABLED (.+?)
Value MGMT_ADDRESS (.+?)
Value MED_DEVICE_TYPE (.+?)
Value MED_CAPABILITIES (.+?)
Value MED_EXTENSION_TLVS_PRESENT (.+?)
Value POWER_DEVICE_TYPE (.+?)
Value POWER_SOURCE (.+?)
Value POWER_PRIORITY (.+?)
Value POWER_REQUESTED (.+?)
Value REMOTE_PORT_MAC_PHY_AUTONEG (.+?)
Value MAU_TYPE (.+?)

Start
^\s*Remote\s+LLDP\s+nearest-bridge\s+Agents\s+on\s+Local\s+Port\s+${LOCAL_INTERFACE}:\s*$$
^\s*Remote\s+LLDP\s+Agents\s+on\s+Local\s+Slot\/Port\s+${LOCAL_INTERFACE}:\s*$$
^\s*$$ -> LLDP
^.*$$ -> Error

LLDP
^\s*Chassis\s+${CHASSIS_ID},\s+Port\s+${MAC_ADDRESS}:\s*$$
^\s*Remote\s+ID\s+=\s+${REMOTE_ID},?\s*$$
^\s*Chassis\s+Subtype\s+=\s+${CHASSIS_SUBTYPE},?\s*$$
^\s*Port\s+Subtype\s+=\s+${PORT_SUBTYPE},?\s*$$
^\s*Port\s+Description\s+=\s+(\(null\)|${NEIGHBOR_INTERFACE}),?\s*$$
^\s*System\s+Name\s+=\s+${NEIGHBOR_NAME},?\s*$$
^\s*System\s+Description\s+=\s+(\(null\)|${NEIGHBOR_DESCRIPTION}),?\s*$$
^\s*Capabilities\s+Supported\s+=\s+${CAPABILITIES_SUPPORTED},?\s*$$
^\s*Capabilities\s+Enabled\s+=\s+${CAPABILITIES_ENABLED},?\s*$$
^\s*Management\s+IP\s+Address\s+=\s+${MGMT_ADDRESS},?\s*$$
^\s*MED\s+Device\s+Type\s+=\s+${MED_DEVICE_TYPE},?\s*$$
^\s*MED\s+Capabilities\s+=\s+${MED_CAPABILITIES},?\s*$$
^\s*MED\s+Extension\s+TLVs\s+Present\s+=\s+${MED_EXTENSION_TLVS_PRESENT},?\s*$$
^\s*MED\s+Power\s+Type\s+=\s+${POWER_DEVICE_TYPE},?\s*$$
^\s*MED\s+Power\s+Source\s+=\s+${POWER_SOURCE},?\s*$$
^\s*MED\s+Power\s+Priority\s+=\s+${POWER_PRIORITY},?\s*$$
^\s*MED\s+Power\s+Value\s+=\s+${POWER_REQUESTED},?\s*$$
^\s*Remote\s+port\s+MAC\/PHY\s+AutoNeg\s+=\s+${REMOTE_PORT_MAC_PHY_AUTONEG},?\s*$$
^\s*Remote\s+port\s+default\s+vlan
^\s*Mau\s+Type\s+=\s+${MAU_TYPE},?\s*$$
^\s*$$ -> Record Start
^.*$$ -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#
Template, Hostname, Platform, Command

alcatel_aos_show_lldp_remote-system.textfsm, .*, alcatel_aos, sh[[ow]] lldp r[[emote-system]]
alcatel_aos_show_interfaces_status.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] st[[atus]]
alcatel_aos_show_mac-address-table.textfsm, .*, alcatel_aos, sh[[ow]] mac-(a[[ddress-table]]|l[[earning]])
alcatel_aos_show_port-security.textfsm, .*, alcatel_aos, sh[[ow]] port-[[security]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Remote LLDP Agents on Local Slot/Port 1/1:

Chassis aa:aa:aa:aa:aa:aa, Port bb:bb:bb:bb:bb:bb:
Remote ID = 1,
Chassis Subtype = 1 (MAC Address),
Port Subtype = 1 (MAC address),
Port Description = Alcatel-Lucent Enterprise OAW-AP1201H eth0-4094,
System Name = AP,
System Description = Alcatel-Lucent Enterprise OAW-AP1201H 1.0.0.10,
Capabilities Supported = Bridge WLAN AP Router Station Only,
Capabilities Enabled = Bridge WLAN AP Router,
Management IP Address = 1.1.1.1,
MED Device Type = Network Connectivity,
MED Capabilities = Capabilities | Power via MDI-PD(33),
MED Extension TLVs Present = Network Policy| Inventory,
MED Power Type = PD Device,
MED Power Source = PSE and Local,
MED Power Priority = Low,
MED Power Value = 25.4 W

Remote LLDP Agents on Local Slot/Port 1/2:

Chassis aa:aa:aa:aa:aa:aa, Port bb:bb:bb:bb:bb:bb:
Remote ID = 1,
Chassis Subtype = 1 (MAC Address),
Port Subtype = 1 (MAC address),
Port Description = Alcatel-Lucent Enterprise OAW-AP1321 eth1,
System Name = AP,
System Description = Alcatel-Lucent Enterprise OAW-AP1321 1.0.0.10,
Capabilities Supported = Bridge WLAN AP Router Station Only,
Capabilities Enabled = Bridge WLAN AP Router,
Management IP Address = 1.1.1.1,
MED Device Type = Network Connectivity,
MED Capabilities = Capabilities | Power via MDI-PD(33),
MED Extension TLVs Present = Network Policy| Inventory,
MED Power Type = PD Device,
MED Power Source = PSE and Local,
MED Power Priority = Low,
MED Power Value = 25.4 W,
Remote port MAC/PHY AutoNeg = Supported Enabled Capability 0x8336,
Mau Type = 1000BaseTFD - Four-pair Category 5 UTP full duplex mode

Remote LLDP Agents on Local Slot/Port 1/3:

Chassis aa:aa:aa:aa:aa:aa, Port bb:bb:bb:bb:bb:bb:
Remote ID = 1,
Chassis Subtype = 1 (MAC Address),
Port Subtype = 1 (MAC address),
Port Description = Alcatel-Lucent Enterprise OAW-AP1361 eth0,
System Name = AP,
System Description = Alcatel-Lucent Enterprise OAW-AP1361 1.0.0.10,
Capabilities Supported = Bridge WLAN AP Router Station Only,
Capabilities Enabled = Bridge WLAN AP Router,
Management IP Address = 1.1.1.1,
MED Device Type = Network Connectivity,
MED Capabilities = Capabilities | Power via MDI-PD(33),
MED Extension TLVs Present = Network Policy| Inventory,
Remote port MAC/PHY AutoNeg = Supported Enabled Capability 0x8337,
Mau Type = 1000BaseTFD - Four-pair Category 5 UTP full duplex mode

Remote LLDP Agents on Local Slot/Port 1/4:

Chassis aa:aa:aa:aa:aa:aa, Port 1001:
Remote ID = 123,
Chassis Subtype = 1 (MAC Address),
Port Subtype = 1 (Locally assigned),
Port Description = Alcatel-Lucent OS6860 GNI 1/1/1,
System Name = SW,
System Description = (null),
Capabilities Supported = Bridge Router,
Capabilities Enabled = Bridge Router,
Management IP Address = 1.1.1.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
parsed_sample:
- capabilities_enabled: "Bridge WLAN AP Router"
capabilities_supported: "Bridge WLAN AP Router Station Only"
chassis_id: "aa:aa:aa:aa:aa:aa"
chassis_subtype: "1 (MAC Address)"
local_interface: "1/1"
mac_address: "bb:bb:bb:bb:bb:bb"
mau_type: ""
med_capabilities: "Capabilities | Power via MDI-PD(33)"
med_device_type: "Network Connectivity"
med_extension_tlvs_present: "Network Policy| Inventory"
mgmt_address: "1.1.1.1"
neighbor_description: "Alcatel-Lucent Enterprise OAW-AP1201H 1.0.0.10"
neighbor_interface: "Alcatel-Lucent Enterprise OAW-AP1201H eth0-4094"
neighbor_name: "AP"
port_subtype: "1 (MAC address)"
power_device_type: "PD Device"
power_priority: "Low"
power_requested: "25.4 W"
power_source: "PSE and Local"
remote_id: "1"
remote_port_mac_phy_autoneg: ""
- capabilities_enabled: "Bridge WLAN AP Router"
capabilities_supported: "Bridge WLAN AP Router Station Only"
chassis_id: "aa:aa:aa:aa:aa:aa"
chassis_subtype: "1 (MAC Address)"
local_interface: "1/2"
mac_address: "bb:bb:bb:bb:bb:bb"
mau_type: "1000BaseTFD - Four-pair Category 5 UTP full duplex mode"
med_capabilities: "Capabilities | Power via MDI-PD(33)"
med_device_type: "Network Connectivity"
med_extension_tlvs_present: "Network Policy| Inventory"
mgmt_address: "1.1.1.1"
neighbor_description: "Alcatel-Lucent Enterprise OAW-AP1321 1.0.0.10"
neighbor_interface: "Alcatel-Lucent Enterprise OAW-AP1321 eth1"
neighbor_name: "AP"
port_subtype: "1 (MAC address)"
power_device_type: "PD Device"
power_priority: "Low"
power_requested: "25.4 W"
power_source: "PSE and Local"
remote_id: "1"
remote_port_mac_phy_autoneg: "Supported Enabled Capability 0x8336"
- capabilities_enabled: "Bridge WLAN AP Router"
capabilities_supported: "Bridge WLAN AP Router Station Only"
chassis_id: "aa:aa:aa:aa:aa:aa"
chassis_subtype: "1 (MAC Address)"
local_interface: "1/3"
mac_address: "bb:bb:bb:bb:bb:bb"
mau_type: "1000BaseTFD - Four-pair Category 5 UTP full duplex mode"
med_capabilities: "Capabilities | Power via MDI-PD(33)"
med_device_type: "Network Connectivity"
med_extension_tlvs_present: "Network Policy| Inventory"
mgmt_address: "1.1.1.1"
neighbor_description: "Alcatel-Lucent Enterprise OAW-AP1361 1.0.0.10"
neighbor_interface: "Alcatel-Lucent Enterprise OAW-AP1361 eth0"
neighbor_name: "AP"
port_subtype: "1 (MAC address)"
power_device_type: ""
power_priority: ""
power_requested: ""
power_source: ""
remote_id: "1"
remote_port_mac_phy_autoneg: "Supported Enabled Capability 0x8337"
- capabilities_enabled: "Bridge Router"
capabilities_supported: "Bridge Router"
chassis_id: "aa:aa:aa:aa:aa:aa"
chassis_subtype: "1 (MAC Address)"
local_interface: "1/4"
mac_address: "1001"
mau_type: ""
med_capabilities: ""
med_device_type: ""
med_extension_tlvs_present: ""
mgmt_address: "1.1.1.1"
neighbor_description: ""
neighbor_interface: "Alcatel-Lucent OS6860 GNI 1/1/1"
neighbor_name: "SW"
port_subtype: "1 (Locally assigned)"
power_device_type: ""
power_priority: ""
power_requested: ""
power_source: ""
remote_id: "123"
remote_port_mac_phy_autoneg: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Remote LLDP nearest-bridge Agents on Local Port 1/1/1:

Chassis aa:aa:aa:aa:aa:aa, Port 1025:
Remote ID = 1,
Chassis Subtype = 2 (MAC Address),
Port Subtype = 3 (Locally assigned),
Port Description = Alcatel-Lucent Enterprise 1/1,
System Name = SW,
System Description = (null),
Capabilities Supported = none supported,
Capabilities Enabled = none enabled,
Management IP Address = 1.1.1.1,
Remote port default vlan = 1

Remote LLDP nearest-bridge Agents on Local Port 1/1/2:

Chassis aa:aa:aa:aa:aa:aa, Port 1025:
Remote ID = 1,
Chassis Subtype = 2 (MAC Address),
Port Subtype = 3 (Locally assigned),
Port Description = Alcatel-Lucent OS6360 GNI 1/1/1,
System Name = SW,
System Description = (null),
Capabilities Supported = Bridge Router,
Capabilities Enabled = Bridge Router,
Management IP Address = 1.1.1.1

Remote LLDP nearest-bridge Agents on Local Port 1/1/3:

Chassis aa:aa:aa:aa:aa:aa, Port Vlan_1_things:
Remote ID = 1,
Chassis Subtype = 2 (MAC Address),
Port Subtype = 3 (Interface name),
Port Description = (null),
System Name = SomeSystem_that_has_FW,
System Description = Mikrotik RouterOS 1.1 (stable) Jan/1/2000 01:01:01 RB1100AHx4,
Capabilities Supported = Bridge Router,
Capabilities Enabled = Router,
Management IP Address = 1.1.1.1


Chassis bb:bb:bb:bb:bb:bb, Port Vlan_2_more_things:
Remote ID = 1,
Chassis Subtype = 2 (MAC Address),
Port Subtype = 3 (Interface name),
Port Description = (null),
System Name = SomeSystem_that_has_FW,
System Description = Mikrotik RouterOS 1.1 (stable) Jan/1/2000 01:01:01 RB1100AHx4,
Capabilities Supported = Bridge Router,
Capabilities Enabled = Router,
Management IP Address = 1.1.1.1


Chassis cc:cc:cc:cc:cc:cc, Port sfp-sfpplus1:
Remote ID = 1,
Chassis Subtype = 2 (MAC Address),
Port Subtype = 3 (Interface name),
Port Description = (null),
System Name = SomeSystem_that_has_FW,
System Description = Mikrotik RouterOS 1.1 (stable) Jan/1/2000 01:01:01 RB1100AHx4,
Capabilities Supported = Bridge Router,
Capabilities Enabled = Router
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
parsed_sample:
- capabilities_enabled: "none enabled"
capabilities_supported: "none supported"
chassis_id: "aa:aa:aa:aa:aa:aa"
chassis_subtype: "2 (MAC Address)"
local_interface: "1/1/1"
mac_address: "1025"
mau_type: ""
med_capabilities: ""
med_device_type: ""
med_extension_tlvs_present: ""
mgmt_address: "1.1.1.1"
neighbor_description: ""
neighbor_interface: "Alcatel-Lucent Enterprise 1/1"
neighbor_name: "SW"
port_subtype: "3 (Locally assigned)"
power_device_type: ""
power_priority: ""
power_requested: ""
power_source: ""
remote_id: "1"
remote_port_mac_phy_autoneg: ""
- capabilities_enabled: "Bridge Router"
capabilities_supported: "Bridge Router"
chassis_id: "aa:aa:aa:aa:aa:aa"
chassis_subtype: "2 (MAC Address)"
local_interface: "1/1/2"
mac_address: "1025"
mau_type: ""
med_capabilities: ""
med_device_type: ""
med_extension_tlvs_present: ""
mgmt_address: "1.1.1.1"
neighbor_description: ""
neighbor_interface: "Alcatel-Lucent OS6360 GNI 1/1/1"
neighbor_name: "SW"
port_subtype: "3 (Locally assigned)"
power_device_type: ""
power_priority: ""
power_requested: ""
power_source: ""
remote_id: "1"
remote_port_mac_phy_autoneg: ""
- capabilities_enabled: "Router"
capabilities_supported: "Bridge Router"
chassis_id: "aa:aa:aa:aa:aa:aa"
chassis_subtype: "2 (MAC Address)"
local_interface: "1/1/3"
mac_address: "Vlan_1_things"
mau_type: ""
med_capabilities: ""
med_device_type: ""
med_extension_tlvs_present: ""
mgmt_address: "1.1.1.1"
neighbor_description: "Mikrotik RouterOS 1.1 (stable) Jan/1/2000 01:01:01 RB1100AHx4"
neighbor_interface: ""
neighbor_name: "SomeSystem_that_has_FW"
port_subtype: "3 (Interface name)"
power_device_type: ""
power_priority: ""
power_requested: ""
power_source: ""
remote_id: "1"
remote_port_mac_phy_autoneg: ""
- capabilities_enabled: "Router"
capabilities_supported: "Bridge Router"
chassis_id: "bb:bb:bb:bb:bb:bb"
chassis_subtype: "2 (MAC Address)"
local_interface: "1/1/3"
mac_address: "Vlan_2_more_things"
mau_type: ""
med_capabilities: ""
med_device_type: ""
med_extension_tlvs_present: ""
mgmt_address: "1.1.1.1"
neighbor_description: "Mikrotik RouterOS 1.1 (stable) Jan/1/2000 01:01:01 RB1100AHx4"
neighbor_interface: ""
neighbor_name: "SomeSystem_that_has_FW"
port_subtype: "3 (Interface name)"
power_device_type: ""
power_priority: ""
power_requested: ""
power_source: ""
remote_id: "1"
remote_port_mac_phy_autoneg: ""
- capabilities_enabled: "Router"
capabilities_supported: "Bridge Router"
chassis_id: "cc:cc:cc:cc:cc:cc"
chassis_subtype: "2 (MAC Address)"
local_interface: "1/1/3"
mac_address: "sfp-sfpplus1"
mau_type: ""
med_capabilities: ""
med_device_type: ""
med_extension_tlvs_present: ""
mgmt_address: ""
neighbor_description: "Mikrotik RouterOS 1.1 (stable) Jan/1/2000 01:01:01 RB1100AHx4"
neighbor_interface: ""
neighbor_name: "SomeSystem_that_has_FW"
port_subtype: "3 (Interface name)"
power_device_type: ""
power_priority: ""
power_requested: ""
power_source: ""
remote_id: "1"
remote_port_mac_phy_autoneg: ""

0 comments on commit b6b030d

Please sign in to comment.