Command Line Reference
IP Unicast Routing
Route Map
52 min
route map route map show route map show route map word \[command] show route map word \[purpose] display data about each daemons knowledge of individual route maps \[parameter] true 130,531 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type \[view] system view \[use cases] sonic# show route map clear route map counters clear route map counters word \[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 138,523 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type \[view] system view \[use cases] sonic# clear route map counters show ip prefix list { show ip prefix list { detail|summary|name } \[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 bgp large community list {standard|expanded} name {permit|deny} bgp large community list {standard|expanded} name {permit|deny} large communityity \[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 186,475 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 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 word {permit|deny} route map word {permit|deny} orderde \[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 124,537 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 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 name \[command] ip prefix name \[seq number ] {permit|deny} {any| a b c d/m {ge|le} length } no ip prefix name \[purpose] configures an ip prefix list or one entry in the ip prefix list \[parameter] true 124,537 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 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 { prefix len length|prefix list prefix list name } \[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 186,475 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 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 {prefix len length|prefix list prefix list name|address{a b c d|x\ x x\ x}|type blackhole} match {ip|ipv6} next hop {prefix len length|prefix list prefix list name|address{a b c d|x\ x x\ x}|type blackhole} \[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 list name |address{ a b c d | x\ x x \ x }|type blackhole} \[purpose] match the next hop \[parameter] true 180,481 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 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 string \[command] match as path string no match as path string \[purpose] matches the specified as path \[parameter] true 133,528 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 metric \[command] match metric metric no match metric metric \[purpose] matches the specified metric \[parameter] true 150,511 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 tag \[command] match tag tag no match tag tag \[purpose] matches the specified tag value associated with the route \[parameter] true 126,535 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 metric \[command] match local preference metric no match local preference metric \[purpose] matches the specified local preference \[parameter] true 131,530 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 community list \[command] match community community list no math community community list \[purpose] matches the specified community list \[parameter] true 183,478 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 { a b c d|x\ x x \ x |interface name } \[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 202,459 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 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 {kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|eigrp|nhrp|table|vnc|babel|sharp|openfabric} match source protocol {kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|eigrp|nhrp|table|vnc|babel|sharp|openfabric} \[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 match source instance match source instance instance \[command] match source instance instance no match source instance instance \[purpose] this is a zebra specific match command \[parameter] true 171,490 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 tag \[command] set tag tag no set tag tag \[purpose] set a tag on the matched route \[parameter] true 138,523 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 a b c d \[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 135,526 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 x\ x x\ x \[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 138,523 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 local preference set local preference preference \[command] set local preference preference no set local preference preference \[purpose] subtract the bgp local preference \[parameter] true 151,510 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 distance \[command] set distance distance no set distance distance \[purpose] set the administrative distance \[parameter] true 136,525 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 weight \[command] set weight weight no set weight weight \[purpose] set the route’s weight \[parameter] true 138,523 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 { metric | rtt | +rtt | rtt } \[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 145,516 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 \[ as path ] \[last as number ] \[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 144,517 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 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 \[ as number ] \[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 138,523 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 \[ community ] \[command] set community \[ community ] no set community \[ community ] \[purpose] set the bgp community attribute \[parameter] true 131,530 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 tableid \[command] set table tableid no set table tableid \[purpose] set the bgp table to a given table identifier \[parameter] true 152,509 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 on match {goto number|next} on match {goto number|next} \[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 132,529 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 ip addresss \[command] set src ip address \[purpose] set the preferred source address for matching routes when installing in the kernel \[parameter] true 146,515 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 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 protocol route map routemap routemap \[command] ip protocol protocol route map routemap \[purpose] filter which routes will install in the kernel \[parameter] true 172,489 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type \[view] system configuration view \[use cases] sonic(config)# ip protocol bgp route map rm set src
