跳转到内容
Ask AI

Loopback-Detect-Netconf

此内容尚不支持你的语言。

YANG Pathget/get-configedit-configrpc
/clear-loopback-detect-status——Y
/loopback-detectYmerge, replace, create, delete—
/loopback-detect/globalYmerge, replace, create, delete—
/loopback-detect/interfaces/{name}Ymerge, replace, create, delete—
/show-loopback-detect-status——Y

This chapter provides examples on how to use Netconf to manage Loopback Detect configurations on AsterNOS devices.

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>

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 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>

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-action

Table of Properties

NameRequiredType/RangeDescription
loopback-detectMPath-only node, has no configurable value.
globalMPath-only node, has no configurable value.
Global loop-detect configuration
log-intervalO0
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-intervalO10..300The 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
interfacesMPath-only node, has no configurable value.
Interface-specific loopback detection configuration
interfaceMPath-only node, has no configurable value.
Interface entry for loopback configuration
nameOEthernet nameThe 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.
statusO”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-intervalO10..65535The 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.
actionO”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

Tree Diagram

module: asternos-loopback-detect
+--rw loopback-detect
+--rw global
+--rw log-interval? union
+--rw transmit-interval? uint16

Table of Properties

NameRequiredType/RangeDescription
globalMPath-only node, has no configurable value.
Global loop-detect configuration
log-intervalO0
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-intervalO10..300The 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-action

Table of Properties

NameRequiredType/RangeDescription
interfacesMPath-only node, has no configurable value.
Interface-specific loopback detection configuration
interfaceMPath-only node, has no configurable value.
Interface entry for loopback configuration
nameOEthernet nameThe 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.
statusO”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-intervalO10..65535The 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.
actionO”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

Tree Diagram

module: asternos-loopback-detect
rpcs:
+---x clear-loopback-detect-status
+--ro output
+--ro data? <anydata>

Table of Properties

NameRequiredType/RangeDescription
clear-loopback-detect-statusO
dataOThe status of the this operation.

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? uint64

Table of Properties

NameRequiredType/RangeDescription
show-loopback-detect-statusO
nameOEthernet nameThe name of the interface to be queried for loopback detection status.
dataMPath-only node, has no configurable value.
loopback-detected-interfacesMPath-only node, has no configurable value.
loopback-detected-interfaceMPath-only node, has no configurable value.
nameOEthernet nameThe name of the interface to be queried for loopback detection status.
statusO”shutdown"
"logging”
Indicates whether a loop has been detected on the interface.
vlanOunionThe VLAN that caused the loop detection on the interface.
portOEthernet nameThe port that caused the loop detection on the interface.
timeOintegerThe elapsed time in seconds since the loop was last detected on the interface when this RPC is handled.