NETCONF Configuration Guide
...
Layer2
Mirror
7 min
asternos mirror this chapter provides examples on how to use netconf to manage mirror configurations on asternos devices create mirror session span/rspan request example to create mirror session via edit config note the vlan must be created before configuring mirror session with vlan as port \<config>\<top> \<mirror operation="create"> \<session> \<id>3\</id> \<mirror type>span\</mirror type> \<direction>rx\</direction> \<destination ports>ethernet5\</destination ports> \<destination ports>vlan102\</destination ports> \<source ports>ethernet6\</source ports> \<source ports>vlan100\</source ports> \</session> \<session> \<id>4\</id> \<mirror type>rspan\</mirror type> \<direction>tx\</direction> \<destination ports>ethernet7\</destination ports> \<source ports>ethernet8\</source ports> \<remote vlan>105\</remote vlan> \</session> \</mirror> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 5d15f1d9 2f13 41aa 891e 73fadcc3595b"> \<ok/> \</rpc reply> delete single mirror session request example to delete mirror session via edit config \<config>\<top> \<mirror> \<session operation="delete"> \<id>3\</id> \</session> \</mirror> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 6145a695 3177 4e48 b09d f8dcef0fbb18"> \<ok/> \</rpc reply> delete all mirror sessions request example to delete all mirror sessions via edit config \<config>\<top> \<mirror operation="delete"/> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 20ba7726 d0f5 400d b4d3 1ead94203b7a"> \<ok/> \</rpc reply> get all mirror sessions request example to get all mirror sessions via get config \<filter type="subtree"> \<top xmlns="http //www asterfusion com/asternos schema/1 0/config"> \<mirror> \<session/> \</mirror> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 8a8928ca d91d 48aa 8c71 b358fa5e107a"> \<data> \<top> \<mirror xmlns="http //asterfusion com/ns/yang/asternos mirror"> \<session> \<id>3\</id> \<mirror type>span\</mirror type> \<direction>rx\</direction> \<destination ports>ethernet5\</destination ports> \<destination ports>vlan102\</destination ports> \<source ports>ethernet6\</source ports> \<source ports>vlan100\</source ports> \</session> \<session> \<id>4\</id> \<mirror type>rspan\</mirror type> \<direction>tx\</direction> \<destination ports>ethernet7\</destination ports> \<source ports>ethernet8\</source ports> \<remote vlan>105\</remote vlan> \</session> \</mirror> \</top> \</data> \</rpc reply>
