Example: Create and Delete LACP Bundle or Member
OpenConfig-Link Aggregation Control Protocol (OC-LACP) data model can be used to stream model-driven telemetry (MDT) and event-driven telemetry (EDT) data. Link Aggregation Control Protocol (LACP) controls the bundling of one or more ports together to form a single logical link. This single link provides higher bidirectional bandwidth, redundancy, and load balancing between the routers in the network.
Note |
Streaming model-driven or event-driven telemetry data is supported only on operational state parameters. |
The support for telemetry is provided only for LACP state data at global, bundle and member level.
Using this model, user can configure LACP parameters on the bundle interface and view state data for LACP-enabled bundle and member interfaces.
The OC LACP yang model is available in the Github repository.
The following logs shows an example of expected telemetry data when a LACP member is added to bundle, and then deleted from the bundle.
Add a LACP Member to Bundle
-
Add an ethernet link bundle with the specified bundle-id. Router#config Router(config)#interface bundle-ether 4
-
Specify the interface details. Router(config)#interface gigabitEthernet 0/2/0/3
-
Add the link to the specified bundle. To enable active or passive LACP on the bundle, include the optional mode active
ormode passive
keywords in the command string.Router(config-if)#bundle id 4 mode passive Router(config-if)#no shutdown
-
Check the log. Sub_id 200000001, flag 4, len 830 -------- {"node_id_str":"ios","subscription_id_str":"app_TEST_200000001","encoding_path":"openconfig-lacp:lacp", "collection_id":"5","collection_start_time":"1542876320548","msg_timestamp":"1542876320548"," data_json":[{"timestamp":"1542876320548","keys":[],"content":{"interfaces":{"interface":{"name":"Bundle-Ether4", "members":{"member":{"interface":"GigabitEthernet0/2/0/3","state":{"interface":"GigabitEthernet0/2/0/3", "activity":"PASSIVE","timeout":"LONG","synchronization":"OUT_SYNC","aggregatable":true,"collecting":false, "distributing":false,"system-id":"02-9d-af-84-41-05","oper-key":4,"partner-id":"00-00-00-00-00-00","partner-key":0, "port-num":0,"partner-port-num":0,"counters":{"lacp-in-pkts":"0","lacp-out-pkts":"0","lacp-rx-errors":"0", "lacp-unknown-errors":"0","lacp-errors":"0"}}}}}}}}],"collection_end_time":"1542876320548"} -------- Sub_id 200000001, flag 4, len 830 -------- {"node_id_str":"ios","subscription_id_str":"app_TEST_200000001","encoding_path":"openconfig-lacp:lacp","collection_id": "6","collection_start_time":"1542876320569","msg_timestamp":"1542876320569","data_json":[{"timestamp":"1542876320568", "keys":[],"content":{"interfaces":{"interface":{"name":"Bundle-Ether4","members":{"member":{"interface": "GigabitEthernet0/2/0/3","state":{"interface":"GigabitEthernet0/2/0/3","activity":"PASSIVE","timeout":"LONG", "synchronization":"OUT_SYNC","aggregatable":true,"collecting":false,"distributing":false,"system-id": "02-9d-af-84-41-05","oper-key":4,"partner-id":"00-00-00-00-00-00","partner-key":0,"port-num":4,"partner-port-num":0, "counters":{"lacp-in-pkts":"0","lacp-out-pkts":"0","lacp-rx-errors":"0","lacp-unknown-errors":"0","lacp-errors":"0"}}}}}}}}], "collection_end_time":"1542876320569"} -------- Sub_id 200000001, flag 4, len 466 -------- {"node_id_str":"ios","subscription_id_str":"app_TEST_200000001","encoding_path":"openconfig-lacp:lacp","collection_id": "7","collection_start_time":"1542876320570","msg_timestamp":"1542876320570","data_json":[{"timestamp":"1542876320568", "keys":[],"content":{"interfaces":{"interface":{"name":"Bundle-Ether4","state":{"name":"Bundle-Ether4","interval":"SLOW","lacp-mode": "PASSIVE","system-id-mac":"02-9d-af-84-41-05","system-priority":32768}}}}}],"collection_end_time":"1542876320570"}
Delete a LACP Member from Bundle
-
Delete a LACP member from the bundle, a scenario where the bundle also becomes non-LACP. Router(config)#interface gigabitEthernet 0/2/0/3 Router(config-if)#bundle id 4 mode on Router(config-if)#commit
-
Check the log. -------- Sub_id 200000001, flag 4, len 425 -------- {"node_id_str":"ios","subscription_id_str":"app_TEST_200000001","encoding_path":"openconfig-lacp:lacp", "collection_id":"8","collection_start_time":"1542876408256","msg_timestamp":"1542876408256","data_json": [{"timestamp":"1542876408256","delete":true,"keys":[],"content":{"interfaces":{"interface":{"name": "Bundle-Ether4","members":{"member":{"interface":"GigabitEthernet0/2/0/3"}}}}}}],"collection_end_time": "1542876408256"} -------- Sub_id 200000001, flag 4, len 365 -------- {"node_id_str":"ios","subscription_id_str":"app_TEST_200000001","encoding_path":"openconfig-lacp:lacp", "collection_id":"9","collection_start_time":"1542876408256","msg_timestamp":"1542876408256","data_json": [{"timestamp":"1542876408256","delete":true,"keys":[],"content":{"interfaces":{"interface":{"name": "Bundle-Ether4"}}}}],"collection_end_time":"1542876408256"}