Loopback-Detect-Netconf
此内容尚不支持你的语言。
Loopback Detect
Section titled “Loopback Detect”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /clear-loopback-detect-status | — | — | Y |
| /loopback-detect | Y | merge, replace, create, delete | — |
| /loopback-detect/global | Y | merge, replace, create, delete | — |
| /loopback-detect/interfaces/{name} | Y | merge, replace, create, delete | — |
| /show-loopback-detect-status | — | — | Y |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage Loopback Detect configurations on AsterNOS devices.
Edit Loopback Detect Global Configuration
Section titled “Edit Loopback Detect Global Configuration”log-interval is 0 seconds by default which means no log will be generated when loopback is detected.
transmit-interval is 30 seconds by default.
Request example to edit loopback detect global configuration via edit-config.
<config><top> <loopback-detect xmlns="http://asterfusion.com/ns/yang/loopback-detect"> <global> <transmit-interval>300</transmit-interval> <log-interval>255</log-interval> </global> </loopback-detect></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5d15f1d9-2f13-41aa-891e-73fadcc3595b"> <ok/></rpc-reply>Delete Loopback Detect Global Configuration
Section titled “Delete Loopback Detect Global Configuration”Request example to delete loopback detect global configuration via edit-config.
<config><top> <loopback-detect xmlns="http://asterfusion.com/ns/yang/loopback-detect"> <global operation="delete"/> </loopback-detect></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:aa1c372e-6e25-4f80-923c-3142b1131766"> <ok/></rpc-reply>Edit Loopback Detect Interface Configuration
Section titled “Edit Loopback Detect Interface Configuration”action is shutdown by default.
Request example to edit loopback detect interface configuration via edit-config.
<config><top> <loopback-detect xmlns="http://asterfusion.com/ns/yang/loopback-detect"> <interfaces> <interface> <name>Ethernet1</name> <action>logging</action> <recovery-interval>222</recovery-interval> <status>enable</status> </interface> </interfaces> </loopback-detect></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ac189d41-e6c1-442a-9d94-78ce70583128"> <ok/></rpc-reply>Edit Loopback Detect Vlan Configuration
Section titled “Edit Loopback Detect Vlan Configuration”The VLAN interface must be created before configuring loopback detection on it.
Request example to edit loopback detect vlan configuration via edit-config.
<config><top> <loopback-detect xmlns="http://asterfusion.com/ns/yang/loopback-detect"> <interfaces> <interface> <name>Vlan100</name> <action>shutdown</action> <status>enable</status> </interface> </interfaces> </loopback-detect></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ac189d41-e6c1-442a-9d94-78ce70583128"> <ok/></rpc-reply>Delete Loopback Detect Interface Configuration
Section titled “Delete Loopback Detect Interface Configuration”Request example to delete loopback detect interface configuration via edit-config.
<config><top> <loopback-detect xmlns="http://asterfusion.com/ns/yang/loopback-detect"> <interfaces> <interface operation="delete"> <name>Ethernet1</name> </interface> </interfaces> </loopback-detect></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ac189d41-e6c1-442a-9d94-78ce70583128"> <ok/></rpc-reply>Get The Loopback Detect Configuration Of Specified Interface
Section titled “Get The Loopback Detect Configuration Of Specified Interface”Request example to get the loopback detect configuration of specified interface via get-config.
<filter type="subtree"> <top> <loopback-detect xmlns="http://asterfusion.com/ns/yang/loopback-detect"> <interfaces> </interfaces> </loopback-detect> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:760e83c5-1831-4d36-b43c-47a93865b04d"> <data> <top> <loopback-detect xmlns="http://asterfusion.com/ns/yang/loopback-detect"> <interfaces> <interface> <name>Ethernet1</name> <status>enable</status> <recovery-interval>222</recovery-interval> <action>logging</action> </interface> <interface> <name>Vlan100</name> <status>enable</status> <recovery-interval>222</recovery-interval> <action>shutdown</action> </interface> </interfaces> </loopback-detect> </top> </data></rpc-reply>Show Loopback Detect Status
Section titled “Show Loopback Detect Status”Show loopback detect status for a specific interface.
Request example to show loopback detect status via rpc show-loopback-detect-status.
<show-loopback-detect-status> <name>Ethernet1</name></show-loopback-detect-status>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2bbee588-ddc1-436b-9317-03a07a86006d"> <data xmlns="http://asterfusion.com/ns/yang/loopback-detect"> <loopback-detected-interfaces> <loopback-detected-interface> <name>Ethernet1</name> <status>logging</status> <vlan>Vlan100</vlan> <port>Ethernet1</port> <time>123</time> </loopback-detected-interface> </loopback-detected-interfaces> </data></rpc-reply>Properties Descriptions
Section titled “Properties Descriptions”Loopback Detect
Section titled “Loopback Detect”Tree Diagram
module: asternos-loopback-detect +--rw loopback-detect +--rw global | +--rw log-interval? union | +--rw transmit-interval? uint16 +--rw interfaces +--rw interface* [name] +--rw name union +--rw status? enumeration +--rw recovery-interval? uint16 +--rw action? loopback-detect-actionTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| loopback-detect | M | Path-only node, has no configurable value. | |
| global | M | Path-only node, has no configurable value. Global loop-detect configuration | |
| log-interval | O | 0 10..300 | The interface loopback detection alarm message transmission interval. Specifies the period at which the information of disabled interfaces is printed. When the default value is 0, it means that the warning message will not be printed repeatedly. Default value: 0 |
| transmit-interval | O | 10..300 | The interval for periodically sending loopback detection packets. Users can adjust the loopback detection packet transmission interval based on network conditions. A shorter interval results in more loopback detection packets being sent per unit of time, leading to more accurate interface loopback responses, but also consuming more system resources. Default value: 30 |
| interfaces | M | Path-only node, has no configurable value. Interface-specific loopback detection configuration | |
| interface | M | Path-only node, has no configurable value. Interface entry for loopback configuration | |
| name | O | Ethernet name | The name of the interface to be configured for loopback detection. User can configure loopback detection on Ethernet interfaces and VLAN. For example, Ethernet1, Ethernet2, Vlan10, Vlan20, etc. |
| status | O | ”enable" "disable” | Enable or disable loopback detection on the interface. When loopback detection is enabled, the system will periodically send loopback detection packets. If a loop is detected, the configured action will be applied to the interface. If this is applied to a VLAN, all ports in the VLAN will be affected: once a port in this VLAN receives a detection packet sending from this vlan’s members, it will trigger the configured action. If this is applied to an interface, only the specified interface will be affected: only when the interface receives a detection packet sending from itself, it will trigger the configured action. |
| recovery-interval | O | 10..65535 | The time for the interface to automatically recover to normal state after detecting a loopback. After enabling interface loopback detection, the interface will periodically send loopback detection packets. Upon detecting a loop, the configured action will be applied to the interface, and a timer will start. Users can configure the interface recovery time. After the specified recovery-interval, the system will attempt to recover the interface. If the loop is cleared by that time, the interface will be restored to its normal state. |
| action | O | ”shutdown" "logging” | Policy to apply when loopback is detected, shutdown mode: Disable interfaces with loop detection configured, block-vlan mode: Blocking VLANs where loops occur, default is shutdown Default value: shutdown |
Global loop-detect configuration
Section titled “Global loop-detect configuration”Tree Diagram
module: asternos-loopback-detect +--rw loopback-detect +--rw global +--rw log-interval? union +--rw transmit-interval? uint16Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| global | M | Path-only node, has no configurable value. Global loop-detect configuration | |
| log-interval | O | 0 10..300 | The interface loopback detection alarm message transmission interval. Specifies the period at which the information of disabled interfaces is printed. When the default value is 0, it means that the warning message will not be printed repeatedly. Default value: 0 |
| transmit-interval | O | 10..300 | The interval for periodically sending loopback detection packets. Users can adjust the loopback detection packet transmission interval based on network conditions. A shorter interval results in more loopback detection packets being sent per unit of time, leading to more accurate interface loopback responses, but also consuming more system resources. Default value: 30 |
Interface-specific loopback detection configuration
Section titled “Interface-specific loopback detection configuration”Tree Diagram
module: asternos-loopback-detect +--rw loopback-detect +--rw interfaces +--rw interface* [name] +--rw name union +--rw status? enumeration +--rw recovery-interval? uint16 +--rw action? loopback-detect-actionTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| interfaces | M | Path-only node, has no configurable value. Interface-specific loopback detection configuration | |
| interface | M | Path-only node, has no configurable value. Interface entry for loopback configuration | |
| name | O | Ethernet name | The name of the interface to be configured for loopback detection. User can configure loopback detection on Ethernet interfaces and VLAN. For example, Ethernet1, Ethernet2, Vlan10, Vlan20, etc. |
| status | O | ”enable" "disable” | Enable or disable loopback detection on the interface. When loopback detection is enabled, the system will periodically send loopback detection packets. If a loop is detected, the configured action will be applied to the interface. If this is applied to a VLAN, all ports in the VLAN will be affected: once a port in this VLAN receives a detection packet sending from this vlan’s members, it will trigger the configured action. If this is applied to an interface, only the specified interface will be affected: only when the interface receives a detection packet sending from itself, it will trigger the configured action. |
| recovery-interval | O | 10..65535 | The time for the interface to automatically recover to normal state after detecting a loopback. After enabling interface loopback detection, the interface will periodically send loopback detection packets. Upon detecting a loop, the configured action will be applied to the interface, and a timer will start. Users can configure the interface recovery time. After the specified recovery-interval, the system will attempt to recover the interface. If the loop is cleared by that time, the interface will be restored to its normal state. |
| action | O | ”shutdown" "logging” | Policy to apply when loopback is detected, shutdown mode: Disable interfaces with loop detection configured, block-vlan mode: Blocking VLANs where loops occur, default is shutdown Default value: shutdown |
Clear Loopback Detect Status
Section titled “Clear Loopback Detect Status”Tree Diagram
module: asternos-loopback-detect
rpcs: +---x clear-loopback-detect-status +--ro output +--ro data? <anydata>Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| clear-loopback-detect-status | O | ||
| data | O | The status of the this operation. |
Show Loopback Detect Status
Section titled “Show Loopback Detect Status”Tree Diagram
module: asternos-loopback-detect
rpcs: +---x show-loopback-detect-status +---w input | +---w name? union +--ro output +--ro data +--ro loopback-detected-interfaces +--ro loopback-detected-interface* [name] +--ro name union +--ro status? loopback-detect-action +--ro vlan? union +--ro port? union +--ro time? uint64Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-loopback-detect-status | O | ||
| name | O | Ethernet name | The name of the interface to be queried for loopback detection status. |
| data | M | Path-only node, has no configurable value. | |
| loopback-detected-interfaces | M | Path-only node, has no configurable value. | |
| loopback-detected-interface | M | Path-only node, has no configurable value. | |
| name | O | Ethernet name | The name of the interface to be queried for loopback detection status. |
| status | O | ”shutdown" "logging” | Indicates whether a loop has been detected on the interface. |
| vlan | O | union | The VLAN that caused the loop detection on the interface. |
| port | O | Ethernet name | The port that caused the loop detection on the interface. |
| time | O | integer | The elapsed time in seconds since the loop was last detected on the interface when this RPC is handled. |