NETCONF Configuration Guide
...
Layer2
VLAN
26 min
asternos vlan note for vlanif(svi) related example, please refer to module asternos interface 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 request example to delete vlan via edit config note when user delete vlan, all members under this vlan will be deleted \<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 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 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 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 request example to create vlan group via rpc config vlan group note use rpc to create or merge 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 request example to delete vlan group via rpc delete vlan group note use rpc to 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 request example to delete switchports in vlan group via rpc delete vlan group switchports note use rpc to delete switchports by vlan group \<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 request example to show vlan summary via rpc show vlan summary note use rpc to show vlan summary of configuration and status \<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 request example to show vlan detail via rpc show vlan detail note use rpc to show vlan detail of the specified vlan id or all \<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 request example to show mac flapping configuration via rpc show mac flapping config note use rpc to show mac flapping configuration of the specified vlan or all \<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 request example to show mac flapping status via rpc show mac flapping status note use rpc to show mac flapping status of the specified vlan or all \<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 request example to clear mac flapping status via rpc clear mac flapping status note use rpc to clear mac flapping statistics of the specified vlan or all \<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>
