Static Route
15 min
\<font color="#1d50a2">urls summary\</font> url get post patch put delete /rest/v1/rpc/show ip route n y n n n /rest/v1/rpc/show ipv6 route n y n n n /rest/v1/running/static routes/{vrf}/{prefix} y y y n y /rest/v1/running/static routes/{vrf}/{prefix}/nexthops/blackhole nexthop n y y n y /rest/v1/running/static routes/{vrf}/{prefix}/nexthops/ifindex nexthops/{nh vrf}/{interface} n y y n y /rest/v1/running/static routes/{vrf}/{prefix}/nexthops/ip ifindex nexthops/{nh vrf}/{gateway}/{interface} n y y n y /rest/v1/running/static routes/{vrf}/{prefix}/nexthops/ip nexthops/{nh vrf}/{gateway} n y y n y \<font color="#1d50a2">examples\</font> \<font color="#1d50a2">show ipv4 route vrf all\</font> post https //{switch ip}/rest/v1/rpc/show ip route { "vrf" "all" } \<font color="#1d50a2">show ipv6 route\</font> post https //{switch ip}/rest/v1/rpc/show ipv6 route { "vrf" "vrftest" } \<font color="#1d50a2">create a static route \</font> post https //{switch ip}/rest/v1/running/static routes/ { "vrf" "vrf200", "prefix" "224 0 0 1/32", "nexthops" { "ip ifindex nexthops" \[ { "gateway" "50 0 0 1", "interface" "ethernet24" } ] } } \<font color="#1d50a2">modify a static route with a blackhole next hop \</font> post https //{switch ip}/rest/v1/running/static routes/vrf200/10 1 1 0%2f24/nexthops/blackhole nexthop/ { "bh type" "null" } \<font color="#1d50a2">create an interface nexthop for static route \</font> post https //{switch ip}/rest/v1/running/static routes/vrftest/100 0 0 0/24/nexthops/ifindex nexthops { "nh vrf" "vrftest", "interface" "vlan100" } \<font color="#1d50a2">modify an ip \& interface nexthop for static route\</font> patch https //{switch ip}/rest/v1/running/static routes/vrf200/10 1 1 0%2f24/nexthops/ip ifindex nexthops/vrf100/10 0 0 1/ethernet24 { "bfd" { "enable" "true" } } \<font color="#1d50a2">modify an ip nexthop for static route \</font> patch https //{switch ip}/rest/v1/running/static routes/vrf200/10 1 1 0%2f24/nexthops/ip nexthops/default/10 0 0 1 { "bfd" { "enable" "true" } } \<font color="#1d50a2">properties descriptions\</font> \<font color="#1d50a2">static route blackhole entry\</font> tree diagrams + rw static routes + rw static route \[vrf prefix] + rw vrf + rw prefix + rw nexthops + rw (nexthop) + (blackhole) \| + rw blackhole nexthop \| + rw bh type \| + rw distance? \| + rw tag? \| + rw description? table of properties name required type/range description static routes m path only node, has no configurable value vrf m "default" vrf name (sub property of static routes) vrf of staticd ip route prefix m a b c d/m xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx/m (sub property of static routes) ip prefix nexthops m (sub property of static routes) path only node, has no configurable value nexthop object blackhole nexthop m (sub property of nexthops) path only node, has no configurable value bh type m "unspec" "null" "reject" "prohibited" (sub property of blackhole nexthop) a blackhole sub type, if the nexthop is a blackhole type "unspec" "generic unreachable " "null" "null type " "reject" "icmp unreachable " "prohibited" "icmp admin prohibited " default value "null" distance o 1 255 (sub property of blackhole nexthop) admin distance associated with this route default value 1 tag o 1 4294967295 (sub property of blackhole nexthop) route tag description o string within 255 characters (sub property of blackhole nexthop) a textual description of the nexthop spaces are not permitted in the description \<font color="#1d50a2">static route non blackhole entry\</font> tree diagrams + rw static routes + rw static route \[vrf prefix] + rw vrf + rw prefix + rw nexthops + rw (nexthop) + (non blackhole) + rw ifindex nexthops \[nh vrf interface] \| + rw interface \| + rw nh vrf \| + rw distance? \| + rw tag? \| + rw description? + rw ip nexthops \[nh vrf gateway] \| + rw nh vrf \| + rw gateway \| + rw distance? \| + rw tag? \| + rw description? \| + rw bfd \| | + rw enable? \| | + rw multihop? \| | + rw local address? \| + rw track? + rw ip ifindex nexthops \[nh vrf gateway interface] + rw gateway + rw nh vrf + rw interface + rw onlink? + rw distance? + rw tag? + rw description? + rw bfd \| + rw enable? \| + rw multihop? \| + rw local address? + rw track? table of properties name required type/range description static routes m path only node, has no configurable value vrf m "default" vrf name (sub property of static routes) vrf of staticd ip route prefix m a b c d/m xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx/m (sub property of static routes) ip prefix nexthops m (sub property of static routes) path only node, has no configurable value nexthop object ifindex nexthops o (sub property of nexthops) path only node, has no configurable value a list of nexthop objects interface m ethernet name lag1 9999 vlan1 4094 vxlan vni name (sub property of ifindex nexthops) the nexthop egress interface nh vrf m "default" vrf name (sub property of ifindex nexthops) the nexthop vrf name, if different from the route distance o 1 255 (sub property of ifindex nexthops) admin distance associated with this route default value 1 tag o 1 4294967295 (sub property of ifindex nexthops) route tag description o string within 255 characters (sub property of ifindex nexthops) a textual description of the nexthop spaces are not permitted in the description ip nexthops o (sub property of nexthops) path only node, has no configurable value a list of nexthop objects of type ip4 or ip6 nh vrf m "default" vrf name (sub property of ip nexthops) the nexthop vrf name, if different from the route gateway m a b c d xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx (sub property of ip nexthops) the nexthop gateway address distance o 1 255 (sub property of ip nexthops) admin distance associated with this route default value 1 tag o 1 4294967295 (sub property of ip nexthops) route tag description o string within 255 characters (sub property of ip nexthops) a textual description of the nexthop spaces are not permitted in the description bfd o (sub property of ip nexthops) path only node, has no configurable value frr nexthop bfd object enable o "true" "false" (sub property of bfd) nexthop open bfd default value "false" multihop co "true" "false" (sub property of bfd) only applicable when enable = "true" open bfd multihop mode default value "false" local address co a b c d xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx (sub property of bfd) only applicable when enable = "true" and multihop = "true" the bfd local address track o 1 4294967295 (sub property of ip nexthops) route track ip ifindex nexthops o (sub property of nexthops) path only node, has no configurable value a list of nexthop objects of type ip4 ifindex or ip6 ifindex gateway m a b c d xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx (sub property of ip ifindex nexthops) the nexthop gateway address nh vrf m "default" vrf name (sub property of ip ifindex nexthops) the nexthop vrf name, if different from the route interface m ethernet name lag1 9999 vlan1 4094 vxlan vni name (sub property of ip ifindex nexthops) the nexthop egress interface onlink o "true" "false" (sub property of ip ifindex nexthops) treat the nexthop as directly attached to the interface default value "false" distance o 1 255 (sub property of ip ifindex nexthops) admin distance associated with this route default value 1 tag o 1 4294967295 (sub property of ip ifindex nexthops) route tag description o string within 255 characters (sub property of ip ifindex nexthops) a textual description of the nexthop spaces are not permitted in the description bfd o (sub property of ip ifindex nexthops) path only node, has no configurable value frr nexthop bfd object enable o "true" "false" (sub property of bfd) nexthop open bfd default value "false" multihop co "true" "false" (sub property of bfd) only applicable when enable = "true" open bfd multihop mode default value "false" local address co a b c d xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx (sub property of bfd) only applicable when enable = "true" and multihop = "true" the bfd local address track o 1 4294967295 (sub property of ip ifindex nexthops) route track \<font color="#1d50a2">show ipv4 route\</font> tree diagrams + x show ip route + w input \| + w vrf? + ro output + ro data? table of properties name required type/range description show ip route m path only node, has no configurable value show ipv4 routes vrf o "all" "default" vrf name (sub property of input) vrf of ipv4 route data ro \<anydata> (sub property of output) \<font color="#1d50a2">show ipv6 route\</font> tree diagrams + x show ipv6 route + w input \| + w vrf? + ro output + ro data? table of properties name required type/range description show ipv6 route m path only node, has no configurable value show ipv6 routes vrf o "all" "default" vrf name (sub property of input) vrf of ipv6 route data ro \<anydata> (sub property of output)
