Skip to content
Ask AI

Mac-Scan-Netconf

YANG Pathget/get-configedit-configrpc
/mac-scanYmerge, replace, create, delete—

This chapter provides examples on how to use Netconf to manage mac scan configurations on AsterNOS devices.

Create and enable mac scan globally, set period, enable remove-on-timeout and remote via edit-config.

<config><top>
<mac-scan xmlns="http://asterfusion.com/ns/yang/mac-scan" operation="create">
<enabled>true</enabled>
<period>100</period>
<remove-on-timeout>true</remove-on-timeout>
<remote>true</remote>
</mac-scan>
</top></config>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a93d63b2-8c95-4480-86c8-60a431e7d6f2">
<ok/>
</rpc-reply>

Update global mac scan period and remote via edit-config.

<config><top>
<mac-scan xmlns="http://asterfusion.com/ns/yang/mac-scan" operation="merge">
<period>200</period>
<remote>false</remote>
</mac-scan>
</top></config>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a93d63b2-8c95-4480-86c8-60a431e7d6f2">
<ok/>
</rpc-reply>

Get global mac scan configuration via get-config.

<filter type="subtree">
<top xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<mac-scan/>
</top>
</filter>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:fbf44465-b889-4bbf-8d8a-1f7769ee4033">
<data>
<top>
<mac-scan xmlns="http://asterfusion.com/ns/yang/mac-scan">
<enabled>true</enabled>
<period>10</period>
<remove-on-timeout>true</remove-on-timeout>
</mac-scan>
</top>
</data>
</rpc-reply>

Delete global mac scan configuration via edit-config.

<config><top>
<mac-scan xmlns="http://asterfusion.com/ns/yang/mac-scan" operation="delete"/>
</top></config>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a93d63b2-8c95-4480-86c8-60a431e7d6f2">
<ok/>
</rpc-reply>

Enable mac scan on VLAN interface and set ip ranges via edit-config, then show via get-config.

<config>
<top>
<interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<interface>
<name>Vlan300</name>
<mac-scan-enabled>true</macsmac-scan-enabledcan>
<mac-scan-ips>10.0.1.7/24</mac-scan-ips>
</interface>
</interfaces>
</top>
</config>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a93d63b2-8c95-4480-86c8-60a431e7d6f2">
<ok/>
</rpc-reply>

Clear VLAN mac scan ip ranges via edit-config.

<config>
<top>
<interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<interface>
<name>Vlan300</name>
<mac-scan-ips operation="delete"/>
</interface>
</interfaces>
</top>
</config>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a93d63b2-8c95-4480-86c8-60a431e7d6f2">
<ok/>
</rpc-reply>

Get VLAN mac scan via get-config.

<filter type="subtree">
<top xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<interfaces>
<interface>
<name>Vlan300</name>
</interface>
</interfaces>
</top>
</filter>
<?xml version="1.0" ?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b4d1f8af-d9f1-4a19-9ecf-47df3cb91bbb">
<data>
<top>
<interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<interface>
<name>Vlan300</name>
<admin-status>true</admin-status>
<interface-mode>routed</interface-mode>
<mac-scan-enabled>true</mac-scan-enabled>
<ipv4 xmlns="http://asterfusion.com/ns/yang/asternos-ip">
<dhcp-alloc>false</dhcp-alloc>
<address>
<ip-prefix>3.3.3.2/24</ip-prefix>
</address>
</ipv4>
<ipv6 xmlns="http://asterfusion.com/ns/yang/asternos-ip">
<router-advertisement/>
</ipv6>
</interface>
</interfaces>
</top>
</data>
</rpc-reply>

Tree Diagram

module: asternos-mac-scan
+--rw mac-scan
+--rw enabled? boolean
+--rw period? uint16
+--rw remove-on-timeout? boolean
+--rw remote? boolean
+--rw interfaces
+--ro interface* [name]
+--ro name if:interface-ref
+--ro mac-scan-enabled? boolean
+--ro mac-scan-ips? string
augment /if:interfaces/if:interface:
+--rw mac-scan-enabled? boolean
+--rw mac-scan-ips? string

Table of Properties

NameRequiredType/RangeDescription
mac-scanMPath-only node, has no configurable value.
MAC Scan global configuration entry.
enabledO”true"
"false”
Enable MAC scan
Default value: False
periodO1..1000Mac-scan period; range 1..1000 ms; default 10.
Default value: 10
remove-on-timeoutO”true"
"false”
Enable the function to delete entries after no response from MAC scan.
Default value: False
remoteO”true"
"false”
Enable MAC remote terminal detection
Default value: False
interfacesMPath-only node, has no configurable value.
interfaceROPath-only node, has no configurable value.
Read-only VLAN interface MAC scan status and ip ranges.
nameROif:interface-refVlan Interface name.
mac-scan-enabledRO”true"
"false”
VLAN level MAC scan enable.
Default value: False
mac-scan-ipsROstringmac-scan ip-ranges; supports comma-separated prefixes/ranges, e.g. ‘80.0.0.1-90.0.0.2,91.0.0.1/24-91.0.0.5/24,92.0.0.3/24,93.0.0.2’.