Loopback‑Detect
AsterNOS-Loopback-Detect
This chapter provides examples on how to use Netconf to manage Loopback Detect configurations on AsterNOS devices.
Edit Loopback Detect Global Configuration
NOTE: 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
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
NOTE: 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
NOTE: 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
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
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
NOTE: 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>