NETCONF Configuration Guide
...
Layer3
PBR
14 min
asternos pbr this chapter provides examples on how to use netconf to manage pbr configurations on asternos devices get pbr configurations request example to get all pbr configurations via get config \<filter type="subtree"> \<top> \<pbr maps> \</pbr maps> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 3275a152 4163 421b 832d 97f128fad8b4"> \<data> \<top> \<pbr maps xmlns="http //asterfusion com/ns/yang/asternos pbr"> \<pbr map> \<name>pbr map 1\</name> \<seq>60\</seq> \<match condition> \<src port>80\</src port> \<src ip>1 2 3 4/24\</src ip> \<dst port>50\</dst port> \<dst ip>10 20 30 40/24\</dst ip> \<ip protocol>udp\</ip protocol> \</match condition> \<set action> \<nexthop>1 2 3 4\</nexthop> \</set action> \</pbr map> \</pbr maps> \</top> \</data> \</rpc reply> create pbr map request example to create pbr map configuration via edit config \<config> \<top> \<pbr maps> \<pbr map operation="create"> \<name>pbr map 1\</name> \<seq>60\</seq> \<match condition> \<ip protocol>udp\</ip protocol> \<dst ip>10 20 30 40/24\</dst ip> \<src ip>1 2 3 4/24\</src ip> \<dst port>50\</dst port> \<src port>80\</src port> \</match condition> \<set action> \<nexthop>1 2 3 4\</nexthop> \</set action> \</pbr map> \</pbr maps> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 805ba8e7 bff9 4323 bb23 3bbdaabbd4bb"> \<ok/> \</rpc reply> modify pbr map configurations request example to modify pbr map configuration via edit config \<config> \<top> \<pbr maps> \<pbr map operation="merge"> \<name>pbr map 1\</name> \<seq>60\</seq> \<match condition> \<src ip>2 2 3 4/24\</src ip> \<src port>120\</src port> \</match condition> \</pbr map> \</pbr maps> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 7d2b6e6a 9155 4144 ad1d 5a9be8a86147"> \<ok/> \</rpc reply> delete pbr map configurations request example to delete pbr map configuration via edit config \<config> \<top> \<pbr maps> \<pbr map operation="delete"> \<name>pbr map 1\</name> \</pbr map> \</pbr maps> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 5d2b6e6a 9155 4144 ad1d 5a9be8a841548"> \<ok/> \</rpc reply> bind pbr map to interface configurations request example to bind pbr map to interface configuration via edit config \<config> \<top> \<interfaces> \<interface operation="merge"> \<name>ethernet1\</name> \<pbr policy>pbr map 1\</pbr policy> \</interface> \</interfaces> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ a74c26e6 a739 423b b1c1 1a524554406a"> \<ok/> \</rpc reply> show pbr map information request example to show pbr map via rpc show pbr map \<show pbr map/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ ac6a5232 48f1 42ae ab96 f76e71ec55e0"> \<data xmlns="http //asterfusion com/ns/yang/asternos pbr"> pbr map pbr map 1 valid no seq 60 rule 359 installed no reason invalid nh ip protocol match udp src ip match 2 2 3 4/24 dst ip match 10 20 30 40/24 src port match 120 dst port match 50 nexthop 1 2 3 4 installed no tableid 10002 \</data> \</rpc reply> get interfaces bind with pbr map request example to show pbr map bind to interface via rpc show pbr interface \<show pbr interface/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ db04baad f088 4e7b aeac f3e215a3f90c"> \<data xmlns="http //asterfusion com/ns/yang/asternos pbr"> ethernet1(11) with pbr policy pbr map 1 \</data> \</rpc reply> get pbr map nexthop groups note the nexthop group name is generated by concatenating the pbr map name with the sequence number request example to show pbr nexthop groups via rpc show pbr nexthop groups \<show pbr nexthop groups/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 86b98ba4 0f32 45d4 a5ce 4ed6dc92cb58"> \<data xmlns="http //asterfusion com/ns/yang/asternos pbr"> nexthop group pbr map 160 table 10002 valid 1 installed 0 valid 1 nexthop 1 2 3 4 \</data> \</rpc reply>
