NETCONF Configuration Guide
...
Layer3
Static‑Route
18 min
asternos static route this chapter provides examples on how to use netconf to manage static routes on asternos devices create static route entry request example to create a static route entry via edit config \<config>\<top> \<static routes> \<static route operation="create"> \<vrf>default\</vrf> \<prefix>20 0 0 1/32\</prefix> \<nexthops> \<ip ifindex nexthops> \<gateway>200 0 0 1\</gateway> \<interface>vlan100\</interface> \</ip ifindex nexthops> \</nexthops> \</static route> \</static routes> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ f0664782 0072 4b64 990b 228306437b46"> \<ok/> \</rpc reply> get static route entry request example to get a static route entry via get config \<filter type="subtree"> \<top> \<static routes> \<static route> \<vrf>default\</vrf> \<prefix>20 0 0 1/32\</prefix> \</static route> \</static routes> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 905bb409 0fb4 4e29 8e98 0f0f815157f5"> \<data> \<top> \<static routes xmlns="http //asterfusion com/ns/yang/asternos static route"> \<static route> \<vrf>default\</vrf> \<prefix>20 0 0 1/32\</prefix> \<nexthops> \<ip ifindex nexthops> \<gateway>200 0 0 1\</gateway> \<interface>vlan100\</interface> \<bfd/> \</ip ifindex nexthops> \</nexthops> \</static route> \</static routes> \</top> \</data> \</rpc reply> modify static route entry request example to modify a static route entry via edit config \<config>\<top> \<static routes> \<static route operation="merge"> \<vrf>default\</vrf> \<prefix>20 0 0 1/32\</prefix> \<nexthops> \<ip ifindex nexthops> \<gateway>200 0 0 1\</gateway> \<interface>ethernet1\</interface> \<bfd/> \</ip ifindex nexthops> \</nexthops> \</static route> \</static routes> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ f0664782 0072 4b64 990b 228306437b46"> \<ok/> \</rpc reply> delete static route entry request example to delete a static route entry via edit config \<top xmlns="http //www asterfusion com/asternos schema/1 0/config"> \<static routes> \<static route operation="delete"> \<vrf>default\</vrf> \<prefix>20 0 0 1/32\</prefix> \</static route> \</static routes> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ f0664782 0072 4b64 990b 228306437b46"> \<ok/> \</rpc reply> show ipv4 route request example to show ipv4 route via rpc show ip route \<show ip route/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 9fc00984 0c97 4cb8 ad66 74d2440c5802"> \<data> \<prefix>0 0 0 0/0\</prefix> \<prefixlen>0\</prefixlen> \<protocol>kernel\</protocol> \<vrfid>0\</vrfid> \<vrfname>default\</vrfname> \<selected>true\</selected> \<destselected>true\</destselected> \<distance>0\</distance> \<metric>201\</metric> \<installed>true\</installed> \<table>254\</table> \<internalstatus>16\</internalstatus> \<internalflags>8\</internalflags> \<internalnexthopnum>1\</internalnexthopnum> \<internalnexthopactivenum>1\</internalnexthopactivenum> \<nexthopgroupid>7\</nexthopgroupid> \<installednexthopgroupid>7\</installednexthopgroupid> \<uptime>1d09h02m\</uptime> \<nexthops> \<flags>3\</flags> \<fib>true\</fib> \<ip>192 168 0 1\</ip> \<afi>ipv4\</afi> \<interfaceindex>3\</interfaceindex> \<interfacename>eth0\</interfacename> \<active>true\</active> \<weight>1\</weight> \</nexthops> \</data> \<data> \<prefix>20 0 0 1/32\</prefix> \<prefixlen>32\</prefixlen> \<protocol>static\</protocol> \<vrfid>0\</vrfid> \<vrfname>default\</vrfname> \<distance>1\</distance> \<metric>0\</metric> \<table>254\</table> \<internalstatus>2\</internalstatus> \<internalflags>65\</internalflags> \<internalnexthopnum>1\</internalnexthopnum> \<internalnexthopactivenum>0\</internalnexthopactivenum> \<nexthopgroupid>61\</nexthopgroupid> \<uptime>00 07 33\</uptime> \<nexthops> \<flags>0\</flags> \<ip>200 0 0 1\</ip> \<afi>ipv4\</afi> \<interfaceindex>62\</interfaceindex> \<interfacename>ethernet1\</interfacename> \<weight>1\</weight> \</nexthops> \</data> \<data> \<prefix>192 168 0 0/20\</prefix> \<prefixlen>20\</prefixlen> \<protocol>connected\</protocol> \<vrfid>0\</vrfid> \<vrfname>default\</vrfname> \<selected>true\</selected> \<destselected>true\</destselected> \<distance>0\</distance> \<metric>0\</metric> \<installed>true\</installed> \<table>254\</table> \<internalstatus>16\</internalstatus> \<internalflags>8\</internalflags> \<internalnexthopnum>1\</internalnexthopnum> \<internalnexthopactivenum>1\</internalnexthopactivenum> \<nexthopgroupid>5\</nexthopgroupid> \<installednexthopgroupid>5\</installednexthopgroupid> \<uptime>1d09h02m\</uptime> \<nexthops> \<flags>3\</flags> \<fib>true\</fib> \<directlyconnected>true\</directlyconnected> \<interfaceindex>3\</interfaceindex> \<interfacename>eth0\</interfacename> \<active>true\</active> \<weight>1\</weight> \</nexthops> \</data> \</rpc reply> create ipv6 static route entry request example to create a ipv6 static route entry via edit config \<config>\<top> \<static routes> \<static route> \<vrf>default\</vrf> \<prefix>2001\ db8 1234 /64\</prefix> \<nexthops> \<ip nexthops> \<gateway>2002 1\</gateway> \<nh vrf>default\</nh vrf> \</ip nexthops> \</nexthops> \</static route> \</static routes> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ f0664782 0072 4b64 990b 228306437b46"> \<ok/> \</rpc reply> get ipv6 static route entry request example to get a ipv6 static route entry via get config with subtree filter \<filter type="subtree"> \<top> \<static routes> \<static route> \<vrf>default\</vrf> \<prefix>2001\ db8 1234 /64\</prefix> \</static route> \</static routes> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 1eaafdf3 f363 42b9 b3c5 0e6a817c7e47"> \<data> \<top> \<static routes xmlns="http //asterfusion com/ns/yang/asternos static route"> \<static route> \<vrf>default\</vrf> \<prefix>2001\ db8 1234 /64\</prefix> \<nexthops> \<ip nexthops> \<nh vrf>default\</nh vrf> \<gateway>2002 1\</gateway> \<bfd/> \</ip nexthops> \</nexthops> \</static route> \</static routes> \</top> \</data> \</rpc reply> delete ipv6 static route entry request example to delete a ipv6 static route entry via edit config \<config>\<top> \<static routes> \<static route operation="delete"> \<vrf>default\</vrf> \<prefix>2001\ db8 1234 /64\</prefix> \</static route> \</static routes> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 133892cb e2d7 4af8 823c a0b34b1d00ec"> \<ok/> \</rpc reply> show ipv6 static route request example to show ipv6 static route via rpc show ipv6 router \<show ipv6 route/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ e1c3c49c c8a9 4125 b19d f493f036e789"> \<data> \<prefix>2011 /20\</prefix> \<prefixlen>20\</prefixlen> \<protocol>connected\</protocol> \<vrfid>0\</vrfid> \<vrfname>default\</vrfname> \<selected>true\</selected> \<destselected>true\</destselected> \<distance>0\</distance> \<metric>0\</metric> \<installed>true\</installed> \<table>254\</table> \<internalstatus>16\</internalstatus> \<internalflags>8\</internalflags> \<internalnexthopnum>1\</internalnexthopnum> \<internalnexthopactivenum>1\</internalnexthopactivenum> \<nexthopgroupid>53\</nexthopgroupid> \<installednexthopgroupid>53\</installednexthopgroupid> \<uptime>04 31 10\</uptime> \<nexthops> \<flags>3\</flags> \<fib>true\</fib> \<directlyconnected>true\</directlyconnected> \<interfaceindex>55\</interfaceindex> \<interfacename>ethernet10\</interfacename> \<active>true\</active> \<weight>1\</weight> \</nexthops> \</data> \<data> \<prefix>2011 /20\</prefix> \<prefixlen>20\</prefixlen> \<protocol>kernel\</protocol> \<vrfid>0\</vrfid> \<vrfname>default\</vrfname> \<distance>0\</distance> \<metric>256\</metric> \<installed>true\</installed> \<table>254\</table> \<internalstatus>16\</internalstatus> \<internalflags>0\</internalflags> \<internalnexthopnum>1\</internalnexthopnum> \<internalnexthopactivenum>1\</internalnexthopactivenum> \<nexthopgroupid>53\</nexthopgroupid> \<uptime>04 31 10\</uptime> \<nexthops> \<flags>3\</flags> \<fib>true\</fib> \<directlyconnected>true\</directlyconnected> \<interfaceindex>55\</interfaceindex> \<interfacename>ethernet10\</interfacename> \<active>true\</active> \<weight>1\</weight> \</nexthops> \</data> \<data> \<prefix>3011 /20\</prefix> \<prefixlen>20\</prefixlen> \<protocol>connected\</protocol> \<vrfid>0\</vrfid> \<vrfname>default\</vrfname> \<selected>true\</selected> \<destselected>true\</destselected> \<distance>0\</distance> \<metric>0\</metric> \<installed>true\</installed> \<table>254\</table> \<internalstatus>16\</internalstatus> \<internalflags>8\</internalflags> \<internalnexthopnum>1\</internalnexthopnum> \<internalnexthopactivenum>1\</internalnexthopactivenum> \<nexthopgroupid>53\</nexthopgroupid> \<installednexthopgroupid>53\</installednexthopgroupid> \<uptime>04 31 10\</uptime> \<nexthops> \<flags>3\</flags> \<fib>true\</fib> \<directlyconnected>true\</directlyconnected> \<interfaceindex>55\</interfaceindex> \<interfacename>ethernet10\</interfacename> \<active>true\</active> \<weight>1\</weight> \</nexthops> \</data> \<data> \<prefix>3011 /20\</prefix> \<prefixlen>20\</prefixlen> \<protocol>kernel\</protocol> \<vrfid>0\</vrfid> \<vrfname>default\</vrfname> \<distance>0\</distance> \<metric>256\</metric> \<installed>true\</installed> \<table>254\</table> \<internalstatus>16\</internalstatus> \<internalflags>0\</internalflags> \<internalnexthopnum>1\</internalnexthopnum> \<internalnexthopactivenum>1\</internalnexthopactivenum> \<nexthopgroupid>53\</nexthopgroupid> \<uptime>04 31 10\</uptime> \<nexthops> \<flags>3\</flags> \<fib>true\</fib> \<directlyconnected>true\</directlyconnected> \<interfaceindex>55\</interfaceindex> \<interfacename>ethernet10\</interfacename> \<active>true\</active> \<weight>1\</weight> \</nexthops> \</data> \<data> \<prefix>fe80 /64\</prefix> \<prefixlen>64\</prefixlen> \<protocol>connected\</protocol> \<vrfid>0\</vrfid> \<vrfname>default\</vrfname> \<distance>0\</distance> \<metric>0\</metric> \<installed>true\</installed> \<table>254\</table> \<internalstatus>16\</internalstatus> \<internalflags>0\</internalflags> \<internalnexthopnum>1\</internalnexthopnum> \<internalnexthopactivenum>1\</internalnexthopactivenum> \<nexthopgroupid>59\</nexthopgroupid> \<uptime>01 07 29\</uptime> \<nexthops> \<flags>3\</flags> \<fib>true\</fib> \<directlyconnected>true\</directlyconnected> \<interfaceindex>70\</interfaceindex> \<interfacename>vlan100\</interfacename> \<active>true\</active> \<weight>1\</weight> \</nexthops> \</data> \</rpc reply> create blackhole static route entry request example to create blackhole static route entry via edit config \<config>\<top> \<static routes> \<static route operation="create"> \<vrf>default\</vrf> \<prefix>10 0 0 1/24\</prefix> \<nexthops> \<blackhole nexthop> \<bh type>unspec\</bh type> \</blackhole nexthop> \</nexthops> \</static route> \</static routes> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ b0488783 fff9 4ba2 8c4b 1df897126dc3"> \<ok/> \</rpc reply> get blackhole static route entry request example to get blackhole static route entry via get config with subtree filter \<filter type="subtree"> \<top> \<static routes> \<static route> \<vrf>default\</vrf> \<prefix>10 0 0 0/24\</prefix> \</static route> \</static routes> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ dce27bcf 285d 44dc a11b 5e1525354c5f"> \<data> \<top> \<static routes xmlns="http //asterfusion com/ns/yang/asternos static route"> \<static route> \<vrf>default\</vrf> \<prefix>10 0 0 0/24\</prefix> \<nexthops> \<blackhole nexthop> \<bh type>unspec\</bh type> \</blackhole nexthop> \</nexthops> \</static route> \</static routes> \</top> \</data> \</rpc reply>
