VLAN
此内容尚不支持你的语言。
Create Vlan
Section titled “Create Vlan”Request example to create vlan via edit-config.
<config><top> <vlans> <vlan operation="create"> <vlanid>300</vlanid> </vlan> </vlans></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Delete Vlan
Section titled “Delete Vlan”Request example to delete vlan via edit-config.
<config><top> <vlans> <vlan operation="delete"> <vlanid>100</vlanid> </vlan> </vlans></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Create Vlan Member
Section titled “Create Vlan Member”Request example to create vlan member via edit-config.
<config><top> <interfaces> <interface> <name>Ethernet1</name> <vlan-config operation="create"> <vlan> <vlan-id>1000</vlan-id> <tagging-mode>untagged</tagging-mode> </vlan> </vlan-config> </interface> </interfaces> <interfaces> <interface> <name>Ethernet2</name> <vlan-config operation="create"> <vlan> <vlan-id>1000</vlan-id> <tagging-mode>untagged</tagging-mode> </vlan> </vlan-config> </interface> </interfaces> <interfaces> <interface> <name>PortChannel0001</name> <vlan-config operation="create"> <vlan> <vlan-id>1000</vlan-id> <tagging-mode>tagged</tagging-mode> </vlan> </vlan-config> </interface> </interfaces></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Delete Vlan Member
Section titled “Delete Vlan Member”Request example to delete vlan member via edit-config.
<config><top> <interfaces> <interface> <name>Ethernet1</name> <vlan-config operation="delete"> <vlan> <vlan-id>1000</vlan-id> </vlan> </vlan-config> </interface> </interfaces></top></config>Get Vlan on Device
Section titled “Get Vlan on Device”Request example to get vlan via get-config.
<filter type="subtree"> <top> <vlans> <vlan> <vlanid>100</vlanid> </vlan> </vlans> </filter>Response example
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <top> <vlans> <vlan> <vlanid>100</vlanid> <mac-limit>10000</mac-limit> <description>this is a test1</description> <broadcast-action>flood</broadcast-action> <unknown-unicast-action>flood</unknown-unicast-action> <unknown-multicast-action>drop</unknown-multicast-action> </vlan> </vlans> </top></data>Create Vlan Group
Section titled “Create Vlan Group”Request example to create vlan group via rpc config-vlan-group.
<config-vlan-group xmlns="http://asterfusion.com/ns/yang/asternos-vlan"> <vlan-ranges>400-410</vlan-ranges> <description>batch by netconf rpc</description> <mac-limit>99</mac-limit> <mac-learning>true</mac-learning> <flapping-detect>true</flapping-detect> <flapping-action>error-down</flapping-action> <flapping-aging>1000</flapping-aging> <flapping-level>99</flapping-level> <unknown-unicast-action>drop</unknown-unicast-action> <unknown-multicast-action>flood</unknown-multicast-action> <broadcast-action>drop</broadcast-action> <stp-ignored>false</stp-ignored></config-vlan-group>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Delete Vlan Group
Section titled “Delete Vlan Group”Request example to delete vlan group via rpc delete-vlan-group.
<delete-vlan-group xmlns="http://asterfusion.com/ns/yang/asternos-vlan"> <vlan-ranges>400-410</vlan-ranges></delete-vlan-group>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Delete Switchports by Vlan Group
Section titled “Delete Switchports by Vlan Group”Request example to delete switchports in vlan group via rpc delete-vlan-group-switchports.
<delete-vlan-group-switchports xmlns="http://asterfusion.com/ns/yang/asternos-vlan"> <vlan-ranges>400-410</vlan-ranges> <switchports>Ethernet1</switchports></delete-vlan-group-switchports>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Show Vlan Summary
Section titled “Show Vlan Summary”Request example to show vlan summary via rpc show-vlan-summary.
<show-vlan-summary/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:43f30268-f755-4ea1-a9fc-cbf379960a6e"> <data xmlns="http://asterfusion.com/ns/yang/asternos-vlan">+-----------+--------------+-----------+----------------+-------------+---------------+-----------------------+| VLAN ID | IP Address | Ports | Port Tagging | Proxy ARP | Description | DHCP Helper Address |+===========+==============+===========+================+=============+===============+=======================+| 100 | | Ethernet1 | tagged | disable | | || | | Ethernet2 | tagged | | | |+-----------+--------------+-----------+----------------+-------------+---------------+-----------------------+| 102 | | | | disable | | |+-----------+--------------+-----------+----------------+-------------+---------------+-----------------------+| 105 | | | | disable | | |+-----------+--------------+-----------+----------------+-------------+---------------+-----------------------+| 123 | | | | disable | | |+-----------+--------------+-----------+----------------+-------------+---------------+-----------------------+ </data></rpc-reply>Show Vlan Detail
Section titled “Show Vlan Detail”Request example to show vlan detail via rpc show-vlan-detail.
<show-vlan-detail/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:d1a23528-bd0e-4eca-af2f-5e8f019833c6"> <data> VLAN ID: 100 Router interface: Name: Vlan100 Tagged ports: Ethernet1 Ethernet2 Untagged ports: MAC-learning: enable </data> <data>VLAN ID: 102 Router interface: Name: Vlan102 Tagged ports: Untagged ports: MAC-learning: enable </data> <data> VLAN ID: 105 Router interface: Name: Vlan105 Tagged ports: Untagged ports: MAC-learning: enable </data> <data> VLAN ID: 123 Router interface: Name: Vlan123 Tagged ports: Untagged ports: MAC-learning: enable </data></rpc-reply>Show MAC Flapping Configuration
Section titled “Show MAC Flapping Configuration”Request example to show mac flapping configuration via rpc show-mac-flapping-config.
<show-mac-flapping-config/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:838acb6c-ba6c-4f4e-80ff-ae995710cde2"> <data xmlns="http://asterfusion.com/ns/yang/asternos-vlan"> <mac-flapping-config> <vlan-id>100</vlan-id> <flapping-detect>false</flapping-detect> </mac-flapping-config> <mac-flapping-config> <vlan-id>102</vlan-id> <flapping-detect>false</flapping-detect> </mac-flapping-config> <mac-flapping-config> <vlan-id>105</vlan-id> <flapping-detect>false</flapping-detect> </mac-flapping-config> <mac-flapping-config> <vlan-id>123</vlan-id> <flapping-detect>true</flapping-detect> <flapping-action>error-down</flapping-action> <flapping-aging>100</flapping-aging> <flapping-level>50</flapping-level> </mac-flapping-config> </data></rpc-reply>Show MAC Flapping Status
Section titled “Show MAC Flapping Status”Request example to show mac flapping status via rpc show-mac-flapping-status.
<show-mac-flapping-status> <vlan-id>999</vlan-id></show-mac-flapping-status>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:6f45e7e1-10aa-4aa6-a8a2-aa7beebebec6"> <data xmlns="http://asterfusion.com/ns/yang/asternos-vlan"> <mac-flapping-status> <vlan-id>999</vlan-id> <mac-address>00:00:01:01:02:01</mac-address> <flapping-times>3</flapping-times> <last-update>Thu Jul 10 08:37:50 2025</last-update> <interface-status>No</interface-status> </mac-flapping-status> </data></rpc-reply>Clear MAC Flapping Status
Section titled “Clear MAC Flapping Status”Request example to clear mac flapping status via rpc clear-mac-flapping-status.
<clear-mac-flapping-status/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:08971595-f0fc-4452-997f-f148f01eaf4d"> <result xmlns="http://asterfusion.com/ns/yang/asternos-vlan"/></rpc-reply>