NETCONF Configuration Guide
...
Layer2
Fdb
12 min
asternos fdb this chapter provides examples on how to use netconf to manage fdb configurations on asternos devices get all static fdb entries note dynamic learned fdb entries cannot be retrieved via get config to get dynamic learned fdb entries, please refer to rpc show mac address aging time is 1800 seconds by default request example to get all static fdb entries via get config with subtree filter \<filter type="subtree"> \<top> \<fdb/> \</top> \</filter> response example \<data xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0"> \<top> \<fdb xmlns="http //asterfusion com/ns/yang/asternos fdb"> \<aging time>300\</aging time> \<fdb entries> \<fdb entry> \<mac address>12 34 56 78 9a\ bc\</mac address> \<vlan id>1000\</vlan id> \<type>static\</type> \<port>ethernet1\</port> \</fdb entry> \<fdb entry> \<mac address>ee\ ee\ ee\ ee\ ee\ ee\</mac address> \<vlan id>1001\</vlan id> \<type>static\</type> \<blackhole>true\</blackhole> \</fdb entry> \<fdb entry> \<mac address>cc\ cc\ cc\ cc\ cc\ cc\</mac address> \<vlan id>1002\</vlan id> \<type>static\</type> \<port>portchannel0002\</port> \</fdb entry> \</fdb entries> \</fdb> \</top> \</data> get all fdb entries on device note both static and dynamic learned fdb entries will be retrieved request example to get all fdb entries via rpc show mac address \<show mac address> \<interface type>all\</interface type> \</show mac address> response example \<data xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0"> \<fdb entries> \<fdb entry> \<mac address>00 11 22 33 44 55\</mac address> \<vlan id>1000\</vlan id> \<type>dynamic\</type> \<port>ethernet1\</port> \</fdb entry> \<fdb entry> \<mac address>66 77 88 99\ aa\ bb\</mac address> \<vlan id>1001\</vlan id> \<type>dynamic\</type> \<port>ethernet2\</port> \</fdb entry> \<fdb entry> \<mac address>dd\ dd\ dd\ dd\ dd\ dd\</mac address> \<vlan id>1002\</vlan id> \<type>dynamic\</type> \<port>portchannel0001\</port> \</fdb entry> \</fdb entries> \</data> clear all fdb entries on device request example to clear all fdb via rpc clear mac address \<rpc> \<clear mac address/> \</rpc> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 0435992a fec6 45d5 ae5b 56f8d584d952"> \<data xmlns="http //asterfusion com/ns/yang/asternos fdb">fdb entries are cleared \</data> \</rpc reply> show mac learning information request example to show mac learning info via rpc show mac learning \<rpc> \<show mac learning/> \</rpc> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ c9c752c1 1331 4fc1 9567 a37c596ef20c"> \<data xmlns="http //asterfusion com/ns/yang/asternos fdb"> interface mac learning \ ethernet1 enable ethernet2 enable ethernet3 enable ethernet4 enable ethernet5 enable ethernet6 enable ethernet7 enable ethernet8 enable ethernet9 enable ethernet10 enable \</data> \</rpc reply> create static/blackhole mac in fdb request example to create static mac or blackhole mac via edit config note the vlan must be created before port switch to l2 \<config> \<top> \<fdb xmlns="http //asterfusion com/ns/yang/asternos fdb"> \<aging time>4000\</aging time> \<fdb entry> \<mac address>12 34 56 78 9a\ bc\</mac address> \<vlan id>100\</vlan id> \<type>static\</type> \<port>ethernet1\</port> \</fdb entry> \<fdb entry> \<mac address>ee\ ee\ ee\ ee\ ee\ ee\</mac address> \<vlan id>123\</vlan id> \<type>static\</type> \<blackhole>true\</blackhole> \</fdb entry> \<fdb entry> \<mac address>cc\ cc\ cc\ cc\ cc\ cc\</mac address> \<vlan id>102\</vlan id> \<type>static\</type> \<port>portchannel0001\</port> \</fdb entry> \</fdb> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ c6c88e9e 79fe 4633 9249 cedcfe32aea7"> \<ok/> \</rpc reply> delete static/blackhole mac in fdb request example to delete static mac or blackhole mac via edit config \<config> \<top> \<fdb xmlns="http //asterfusion com/ns/yang/asternos fdb"> \<fdb entry operation="delete"> \<mac address>12 34 56 78 9a\ bc\</mac address> \<vlan id>100\</vlan id> \</fdb entry> \<fdb entry operation="delete"> \<mac address>ee\ ee\ ee\ ee\ ee\ ee\</mac address> \<vlan id>123\</vlan id> \</fdb entry> \</fdb> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ c6c88e9e 79fe 4633 9249 cedcfe32aea7"> \<ok/> \</rpc reply>
