Command Line Reference
IP Unicast Routing
Route Map
56 min
show route map show route map \[command] show route map word \[purpose] display data about each daemons knowledge of individual route maps \[parameter] true 233,428 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] system view \[use cases] sonic# show route map clear route map counters clear route map counters \[command] clear route map counters word \[purpose] clear counters that are being stored about the route map utilization so that subsuquent show commands will indicate since the last clear \[parameter] true 210,451 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] system view \[use cases] sonic# clear route map counters show ip prefix list show ip prefix list \[command] show ip prefix list {detail|summary| name } \[purpose] display the ip prefix list \[view] system view \[use cases] sonic# show ip prefix list summary prefix list with the last deletion/insertion test zebra ip prefix list test count 1, range entries 0, sequences 1 1 prefix list with the last deletion/insertion test ospf ip prefix list test count 1, range entries 0, sequences 1 1 prefix list with the last deletion/insertion test bgp ip prefix list test count 1, range entries 0, sequences 1 1 prefix list with the last deletion/insertion test isis ip prefix list test count 1, range entries 0, sequences 1 1 bgp as path access list bgp as path access list \[command] bgp as path access list word {permit|deny} line no bgp as path access list word {permit|deny} line \[purpose] configure route filtering policies based on as path lists \[parameter] true 118,543 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# configure terminal sonic(config)# bgp as path access list s permit 66 bgp large community list bgp large community list \[command] bgp large community list {standard|expanded} name {permit|deny} large community no bgp large community list {standard|expanded} name {permit|deny} large community \[purpose] this command defines a new standard large community list \[parameter] true 237,424 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 \[view] system configuration view \[notes] when filtering bgp large community attributes, you can configure multiple filter criteria within the same entry the relationship between filter criteria is "and," which means all filter criteria must be matched for the rule to be considered a match for example, with the command " bgp large community list standard test 10 permit 100 1 1 200 1 1 300 1 1," the rule will be considered a match only when all three large community values (100 1 1, 200 1 1, and 300 1 1) are simultaneously present within a single list, multiple rules have an "or" relationship for example, with the commands " bgp large community list standard test 10 permit 100 1 1" and "bgp large community list standard test 20 permit 200 1 1," when searching for rules within the "test" group, matching either 100 1 1 or 200 1 1 will be considered a match \[use cases] sonic# configure terminal sonic(config)# bgp large community list standard as permit aa\ bb\ cc route map route map \[command] route map word {permit|deny} order no route map word {permit|deny} order \[purpose] configure the order’th entry in route map name with match policy of either permit or deny \[parameter] true 101,560 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 \[notes] this command unconfigures the order entry in the routing table name \[view] system configuration view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 ip prefix ip prefix \[command] ip prefix name no ip prefix name \[ seq number ] {permit|deny} {any| a b c d/m {ge|le} length } \[purpose] configures an ip prefix list or one entry in the ip prefix list \[parameter] true 108,553 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 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 \[notes] an ip prefix list can be used as a filter or as filtering conditions of a route map the matching principle of table entries in the address prefix list is match according to the ordinal id from smallest to largest, and no other table entries will be matched after the filtered route hits a certain table entry, and the route that cannot match any table entry is deemed to have failed the filter and will not enter any subsequent processing \[view] system config view \[use cases] sonic(config)# ip prefix list test permit 1 1 1 0/24 ge 32 match {ip|ipv6} address match {ip|ipv6} address \[command] match {ip|ipv6} address {prefix len length |prefix list prefix list name } no match {ip|ipv6} address {prefix len length |prefix list prefix list name } \[purpose] matches the specified prefix list \[parameter] true 237,424 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] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match ip address prefix list test match {ip|ipv6} next hop match {ip|ipv6} next hop \[command] match {ip|ipv6} next hop {prefix len length |prefix list prefix list name |address{ a b c d | x\ x x \ x }|type blackhole} no match {ip|ipv6} next hop {prefix len length |prefix list prefix listname |address{ a b c d | x\ x x \ x }|type blackhole} \[purpose] match the next hop \[parameter] true 217,444 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 \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match ip next hop type blackhole match as path match as path \[command] match as path string no match as path string \[purpose] matches the specified as path \[parameter] true 204,457 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match as path test match metric match metric \[command] match metric metric no match metric metric \[purpose] matches the specified metric \[parameter] true 224,437 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match metric 12 match tag match tag \[command] match tag tag no match tag tag \[purpose] matches the specified tag value associated with the route \[parameter] true 198,463 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match tag 12 match local preference match local preference \[command] match local preference metric no match local preference metric \[purpose] matches the specified local preference \[parameter] true 219,442 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match local preference 12 match community match community \[command] match community community list no math community community list \[purpose] matches the specified community list \[parameter] true 201,460 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match community test match peer match peer \[command] match peer { a b c d | x\ x x \ x | interace name } no match peer { a b c d | x\ x x \ x | interace name } \[purpose] this is a bgp specific match command matches the peer ipv6 address if the neighbor was specified in this manner \[parameter] true 219,442 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 \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match peer 1 1 1 1 match peer local match peer local \[command] match peer local no match peer local \[purpose] matches the peer static or redistributed routes \[notes] this command unmatches peer to peer static or redistributed routes \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match peer local match source protocol match source protocol \[command] match source protocol {kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|eigrp|nhrp|table|vnc|babel|sharp|openfabric} no match source protocol {kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|eigrp|nhrp|table|vnc|babel|sharp|openfabric} \[purpose] this is a zebra specific match command matches the originating protocol specified \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match source protocol static l match source instance match source instance \[command] match source instance instance no match source instance instance \[purpose] this is a zebra specific match command \[parameter] true 235,426 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# match source instance 2 set tag set tag \[command] set tag tag no set tag tag \[purpose] set a tag on the matched route \[parameter] true 202,459 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set tag 12 set ip next hop set ip next hop \[command] set ip next hop a b c d no set ip next hop a b c d \[purpose] set the bgp nexthop address \[parameter] true 174,487 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set ip next hop 1 1 1 1 set ip next hop peer address set ip next hop peer address \[command] set ip next hop peer address no set ip next hop peer address \[purpose] set the bgp nexthop address to the address of the peer \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set ip next hop peer address set ip next hop unchanged set ip next hop unchanged \[command] set ip next hop unchanged no set ip next hop unchanged \[purpose] set the route map as unchanged \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set ip next hop unchanged set ipv6 next hop peer address set ipv6 next hop peer address \[command] set ipv6 next hop peer address no set ipv6 next hop peer address \[purpose] set the bgp nexthop address to the address of the peer \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set ipv6 next hop peer address set ipv6 next hop prefer global set ipv6 next hop prefer global \[command] set ipv6 next hop prefer global no set ipv6 next hop prefer global \[purpose] for incoming and import route maps if we receive a v6 global and v6 ll address for the route, then prefer to use the global address as the nexthop \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set ipv6 next hop prefer global set ipv6 next hop global set ipv6 next hop global \[command] set ipv6 next hop global x\ x x \ x no set ipv6 next hop global x\ x x \ x \[purpose] set the next hop to the specified ipv6 address for both incoming and outgoing route maps \[parameter] true 201,460 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set ipv6 next hop global 100 1 set ipv6 next hop local set ipv6 next hop local \[command] set ipv6 next hop local x\ x x \ x no set ipv6 next hop local x\ x x \ x \[purpose] set the bgp 4+ link local ipv6 nexthop address \[parameter] true 196,465 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set ipv6 next hop local 100 1 set local preference set local preference \[command] set local preference preference no set local preference preference \[purpose] subtract the bgp local preference \[parameter] true 205,456 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set local preference 12 set distance set distance \[command] set distance distance no set distance distance \[purpose] set the administrative distance \[parameter] true 237,424 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set distance 12 set weight set weight \[command] set weight weight no set weight weight \[purpose] set the route’s weight \[parameter] true 190,471 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set weight 12 set metric set metric \[command] set metric { metric |rtt|+rtt| rtt>} no set metric { metric |rtt|+rtt| rtt>} \[purpose] set the bgp attribute med to a specific value \[parameter] true 155,506 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set metric 12 set as path prepend set as path prepend \[command] set as path prepend \[ as path ] \[ last as number ] no set as path prepend \[ as path ] \[ last as number ] \[purpose] set the bgp as path to prepend \[parameter] true 189,472 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] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set as path prepend 12 set as path exclude set as path exclude \[command] set as path exclude \[ as number ] no set as path exclude \[ as number ] \[purpose] drop as number from the bgp as path \[parameter] true 190,471 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set as path exclude 12 set community set community \[command] set community \[ community ] no set community \[ community ] \[purpose] set the bgp community attribute \[parameter] true 152,509 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set community 12 set origin {egp|igp|incomplete} set origin {egp|igp|incomplete} \[command] set origin {egp|igp|incomplete} no set origin {egp|igp|incomplete} \[purpose] set bgp route origin \[notes] this command cancels the bgp route origin setting \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set origin igp set table set table \[command] set table tableid no set table tableid \[purpose] set the bgp table to a given table identifier \[parameter] true 184,477 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set table 12 set sr te color set sr te color \[command] set sr te color color no set sr te color color \[purpose] set the color of a sr te policy to be applied to a learned route \[parameter] true 151,510 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# set sr te color 12 on match on match \[command] on match {goto number |next} no on match {goto number |next} \[purpose] proceed on to the next entry in the route map \[parameter] true 154,507 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic# clear route map counters sonic(config)# route map test permit 233 sonic(config route map)# on match next set src set src \[command] set src ip address \[purpose] set the preferred source address for matching routes when installing in the kernel \[parameter] true 196,465 left #2166ae #4283c7 unhandled content type left #2166ae #4283c7 unhandled content type left unhandled content type left unhandled content type \[view] route map view \[use cases] sonic(config)# route map rm set src permit 10 sonic(config route map)# set src 30 11 0 48 ip protocol ip protocol \[command] ip protocol protocol route map routemap \[purpose] filter which routes will install in the kernel \[parameter] true 199,462 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)# ip protocol bgp route map rm set src
