Command Line Reference
IP Unicast Routing
Policy Route Configuration
11 min
show pbr interface show pbr interface \[command] show pbr interface \[ interface name ] \[purpose] view the binding relationship between interfaces and policy routes \[view] system view \[use cases] sonic# show pbr interface ethernet30 ethernet30(38) with pbr policy test show pbr map \[map name] show pbr map \[map name] \[command] show pbr map \[map name] \[purpose] display the configured policy routes \[view] system view \[use cases] sonic# show pbr map pbr map test valid no seq 10 rule 309 installed no reason invalid nh src match 10 255 255 0/30 nexthop 10 254 254 1 installed no tableid 10000 show pbr nexthop groups show pbr nexthop groups \[command] show pbr nexthop groups \[purpose] displays the next address group for the policy route \[view] system view \[use cases] sonic# show pbr nexthop groups nexthop group test table 10001 valid 1 installed 1 valid 0 nexthop ethernet32 valid 1 nexthop ethernet31 pbr map pbr map \[command] pbr map name seq number no pbr map name \[seq number ] \[purpose] create a policy route and enter the view \[parameter] true 98,563 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type \[view] system configuration view \[use cases] sonic(config)# pbr map test seq 10 sonic(config pbr map)# match match \[command] match {dst ip ip address |dst port port |ip protocol protocol |src ip ip address |src port port } no match {dst ip ip address |dst port port |ip protocol protocol |src ip ip address |src port port } \[purpose] create match conditions for policy routing \[parameter] true 170,491 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type left unhandled content type left unhandled content type \[view] policy route view \[use cases] sonic(config)# pbr map test seq 10 sonic(config pbr map)# match src ip 1 1 1 0/24 set set \[command] set {nexthop ip address |nexthop group name } no set {nexthop ip address |nexthop group name } \[purpose] configure an action of redirecting packets to a next hop ip address \[parameter] true 210,451 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type left #d8e5f5 unhandled content type left #d8e5f5 unhandled content type \[view] policy route view \[notes] the redirect nexthop command allows user to specify a maximum of 4 next hop ip addresses if multiple next hop ip addresses are configured, the device redirects packets in active/standby mode the device determines the primary link and backup links according to the sequence in which next hop ip addresses were configured the next hop ip address that was configured first has the highest priority and this next hop is used as the primary path other next hops are used as backup paths when the primary link becomes down, a next hop with higher priority is used as the primary path \[use cases] sonic(config)# nexthop group test sonic(config pbr map)# set nexthop 1 1 1 0/24 nexthop group nexthop group \[command] nexthop group name no nexthop group name \[purpose] create a next hop address group and enter the view \[view] system configuration view \[use cases] sonic(config)# nexthop group test sonic(config nh group)# nexthop nexthop \[command] nexthop ip address no nexthop ip address \[purpose] configure the member addresses in the next hop address group \[view] nexthop group view \[notes] if multiple next hop ip addresses are specified, the device redirects packets in ecmp load balancing mode \[use cases] sonic(config)# nexthop group test sonic(config nh group)# nexthop 1 1 1 0/24 sonic(config nh group)# nexthop 1 1 2 0/24 pbr policy pbr policy \[command] pbr policy name no pbr policy name \[purpose] bind the policy route to the specified interface \[view] interface view \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# pbr policy test
