Mac-Scan-Netconf
此内容尚不支持你的语言。
Mac Scan
Section titled “Mac Scan”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /mac-scan | Y | merge, replace, create, delete | — |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage mac scan configurations on AsterNOS devices.
Mac Scan Global Configuration
Section titled “Mac Scan Global Configuration”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>Mac Scan Vlan Interface Configuration
Section titled “Mac Scan Vlan Interface Configuration”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>Properties Descriptions
Section titled “Properties Descriptions”MAC Scan global configuration entry
Section titled “MAC Scan global configuration entry”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? stringTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| mac-scan | M | Path-only node, has no configurable value. MAC Scan global configuration entry. | |
| enabled | O | ”true" "false” | Enable MAC scan Default value: False |
| period | O | 1..1000 | Mac-scan period; range 1..1000 ms; default 10. Default value: 10 |
| remove-on-timeout | O | ”true" "false” | Enable the function to delete entries after no response from MAC scan. Default value: False |
| remote | O | ”true" "false” | Enable MAC remote terminal detection Default value: False |
| interfaces | M | Path-only node, has no configurable value. | |
| interface | RO | Path-only node, has no configurable value. Read-only VLAN interface MAC scan status and ip ranges. | |
| name | RO | if:interface-ref | Vlan Interface name. |
| mac-scan-enabled | RO | ”true" "false” | VLAN level MAC scan enable. Default value: False |
| mac-scan-ips | RO | string | mac-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’. |