SNMP lldpLocManAddrTable and lldpRemManAddrTable design - mykolaf/SONiC GitHub Wiki
The SNMP lldpLocManAddrTable and lldpRemManAddrTable MIB design
High Level Design Document
Rev 0.2
Table of Contents
List of Tables
Revision
Rev | Date | Author | Change Description |
---|---|---|---|
0.1 | Andrii Savka | Initial version | |
0.2 | Mykola Faryma | Add sync from CONFIG DB to lldpd |
About this Manual
This document provides general information about the design of lldpLocManAddrTable and lldpRemManAddrTable in SONiC.
Scope
This document describes the high level design of the design of MIB for lldpLocManAddrTable and lldpRemManAddrTable.
Definitions/Abbreviation
Table 2: Abbreviations
Definitions/Abbreviation | Description |
---|---|
SNMP | Simple Network Management Protocol |
LLDP | Link Layer Discovery Protocol |
API | Application Programmable Interface |
SAI | Switch Abstraction Interface |
1 Overview
1.1 System Chart
Following diagram describes a top level overview of the SONiC SNMP LLDP architecture:
1.2 Modules description
1.2.1 SNMP agent
Stores the information from APP DB in the local cash and handles the SNMP requests.
1.2.2 APP DB
Located in the Redis DB and running inside the container "database". Redis DB works with the data in format of key-value tuples, needs no predefined schema and holds various LLDP counters in the "LLDP_ENTRY_TABLE", and port attributes in "PORT_TABLE".
1.2.3 LLDP sync daemon
This component is updating "LLDP_ENTRY_TABLE" tables in the APP DB with the information from LLDP docker container. In addition, a separate thread subscribes to CONFIG DB for updates in "PORT" and "MGMT_INTERFACE". On startup this thread reads the tables and updates lldpd with relevant information.
1.2.4 LLDP docker container
Consists the LLDP CLI tools and daemon with LLDP protocol implementation.
2 Requirements
The following OIDs should be supported in the SNMP agent:
2.1 The lldpLocPortTable requirements
OID | SNMP counter | Description |
---|---|---|
1.0.8802.1.1.2.1.3.7 | lldpLocPortTable | |
1.0.8802.1.1.2.1.3.7.1 | lldpLocPortEntry | |
1.0.8802.1.1.2.1.3.7.1.1 | lldpLocPortNum | The index value used to identify the port component (contained in the local chassis with the LLDP agent) associated with this entry |
1.0.8802.1.1.2.1.3.7.1.2 | lldpLocPortIdSubtype | The type of port identifier encoding used in the associated 'lldpLocPortId' object |
1.0.8802.1.1.2.1.3.7.1.4 | lldpLocPortDesc | The string value used to identify the 802 LAN station's port description associated with the local system. If the local agent supports IETF RFC 2863, lldpLocPortDesc object should have the same value of ifDescr object |
Note: to provide actual local port data, the values will be taken from and calculated based on SONiC's databases:
- lldpLocPortNum - port numbering is calculated based on port name.
- lldpLocPortIdSubtype - we're using interface name as port id, so according to textual convention, the subtype is 5
- lldpLocPortDesc - we subscribe to CONFIG DB to get updated value. We get this from field "description" in PORT table.
2.2 The lldpLocManAddrTable requirements
OID | SNMP counter | Description |
---|---|---|
1.0.8802.1.1.2.1.3.8 | lldpLocManAddrTable | |
1.0.8802.1.1.2.1.3.8.1 | lldpLocManAddrEntry | |
1.0.8802.1.1.2.1.3.8.1.1 | lldpLocManAddrSubtype | The type of management address identifier encoding used in the associated 'lldpLocManagmentAddr' object |
1.0.8802.1.1.2.1.3.8.1.2 | lldpLocManAddr | The string value used to identify the management address component associated with the local system. The purpose of this address is to contact the management entity. |
1.0.8802.1.1.2.1.3.8.1.3 | lldpLocManAddrLen | The total length of the management address subtype and the management address fields in LLDPDUs transmitted by the local LLDP agent. |
1.0.8802.1.1.2.1.3.8.1.4 | lldpLocManAddrIfSubtype | The enumeration value that identifies the interface numbering method used for defining the interface number, associated with the local system |
1.0.8802.1.1.2.1.3.8.1.5 | lldpLocManAddrIfId | The integer value used to identify the interface number regarding the management address component associated with the local system. |
1.0.8802.1.1.2.1.3.8.1.6 | lldpLocManAddrOID | The OID value used to identify the type of hardware component or protocol entity associated with the management address advertised by the local system agent. |
2.3 The lldpRemTable requirements
OID | SNMP counter | Description |
---|---|---|
1.0.8802.1.1.2.1.4.1 | lldpRemTable | |
1.0.8802.1.1.2.1.4.1.1 | lldpRemEntry | |
1.0.8802.1.1.2.1.4.1.1.2 | lldpRemLocalPortNum | The index value used to identify the port component associated with this entry. The lldpRemLocalPortNum identifies the port on which the remote system information is received |
1.0.8802.1.1.2.1.4.1.1.3 | lldpRemIndex | This object represents an arbitrary local integer value used by this agent to identify a particular connection instance, unique only for the indicated remote system |
1.0.8802.1.1.2.1.4.1.1.11 | lldpRemSysCapSupported | The bitmap value used to identify which system capabilities are supported on the remote system |
1.0.8802.1.1.2.1.4.1.1.12 | lldpRemSysCapEnabled | The bitmap value used to identify which system capabilities are enabled on the remote system |
2.4 The lldpRemManAddrTable requirements
OID | SNMP counter | Description |
---|---|---|
1.0.8802.1.1.2.1.4.2 | lldpRemManAddrTable | |
1.0.8802.1.1.2.1.4.2.1 | lldpRemManAddrTable | |
1.0.8802.1.1.2.1.4.2.1.1 | lldpRemManAddrSubtype | The type of management address identifier encoding used in the associated 'lldpRemManagmentAddr' object |
1.0.8802.1.1.2.1.4.2.1.2 | lldpRemManAddr | The string value used to identify the management address component associated with the remote system. The purpose of this address is to contact the management entity |
1.0.8802.1.1.2.1.4.2.1.3 | lldpRemManAddrIfSubtype | The enumeration value that identifies the interface numbering method used for defining the interface number, associated with the remote system |
1.0.8802.1.1.2.1.4.2.1.4 | lldpRemManAddrIfId | The integer value used to identify the interface number regarding the management address component associated with the remote system |
1.0.8802.1.1.2.1.4.2.1.5 | lldpRemManAddrOID | The OID value used to identify the type of hardware component or protocol entity associated with the management address advertised by the remote system agent |
3 Modules Design
3.1 Modules that need to be updated
3.1.1 SNMP agent
- The implementation of lldpLocPortTable and lldpRemTable tables should be updated to support the missed OIDs which are described in Requirements.
- The lldpLocManAddrTable table should be implemented in ieee802.1 LLDP MIB.
- The lldpRemManAddrTable table should be implemented in ieee802.1 LLDP MIB.
3.1.2 LLDP sync daemon
The LLDP sync daemon should be extended to parse and update the following information:
- local port number, subtype and description
- local management address info
- remote port number, index and system capabilities map
- remote management address info
In addition, LLDP sync deamon should be subscribed for updates in CONFIG DB and update lldpd accordingly(via lldpcli). Tables to subscribe to:
- PORT table for lldpLocPortTable
3.2 APP DB
The LLDP_ENTRY_TABLE table should be extended with following keys:
Key | Value |
---|---|
lldpRemLocalPortNum | The port index that remote port is related to |
lldpRemIndex | The remote port index |
lldpRemSysCapSupported | System capabilities which are supported on the remote system |
lldpRemSysCapEnabled | System capabilities which are enabled on the remote system |
lldpRemManAddr | The management address of the remote system |
The LLDP_LOC_CHASSIS hash should include following keys:
Key | Value |
---|---|
lldpLocManAddr | The management address of the local system |
lldpRemSysCapSupported | System capabilities which are supported on the local system |
lldpRemSysCapEnabled | System capabilities which are enabled on the local system |
lldpLocChassisIdSubtype | Describes the source of a chassis identifier - macAddress(4) |
lldpLocChassisId | This string identifies a particular unicast source address (encoded in network byte order and IEEE 802.3 canonical bit order), of a port on the containing chassis as defined in IEEE Std 802-2001. |
lldpLocSysDesc | The string value used to identify the system description of the local system. |
lldpLocSysName | The string value used to identify the system name of the local system. |
3.3 CONFIG DB
No update is needed. Lldp syncd will subscribe to this db for updates, and local system data will be polled from here.