Command Line Reference
Layer 3 Configuration
Routing Policy
44 min
ip prefix list ip prefix list ip prefix list view ip prefix list view table 1 ip prefix list view table 1 ip prefix list view command purpose show ip prefix list \[ summary | detail | list name ] display ip prefix list configuration show ip prefix list \[summary|detail| show ip prefix list \[summary|detail| list name ] \[command] show ip prefix list \[ summary | detail | list name ] \[purpose] display ip prefix list configuration \[parameters] parameter description list name specify the name of ip prefix list \[view] privileged user view \[use cases] sonic# show ip prefix list list1 zebra ip prefix list list1 2 entries seq 3 permit 10 0 0 0/24 ge 25 le 26 seq 4 permit 20 0 0 0/24 ge 25 le 26 ospf ip prefix list list1 2 entries seq 3 permit 10 0 0 0/24 ge 25 le 26 seq 4 permit 20 0 0 0/24 ge 25 le 26 bgp ip prefix list list1 2 entries seq 3 permit 10 0 0 0/24 ge 25 le 26 seq 4 permit 20 0 0 0/24 ge 25 le 26 isis ip prefix list list1 2 entries seq 3 permit 10 0 0 0/24 ge 25 le 26 seq 4 permit 20 0 0 0/24 ge 25 le 26 ip prefix list config ip prefix list config table 2 ip prefix list config table 2 ip prefix list config command purpose ip prefix list list name \[ seq sequence number ] { permit|deny } { any | a b c d/m \[ ge ge| le le]} add an ip prefix list ip prefix list ip prefix list list name \[seq sequence number ] {permit|deny} {any| a b c d/m \[ge ge |le le ]} \[command] ip prefix list list name \[ seq sequence number ] { permit | deny } { any | a b c d/m \[ ge ge | le le ]} \[purpose] add an ip prefix list for reference by route map \[parameters] parameter description list name specify the name of ip prefix list sequence number specify the sequence number a b c d/m specifiy the network segment that this table entry matches ge specify the minimum prefix length, and the range is from 0 to 32 le specify the maximum prefix length, and the range is from 0 to 32 \[view] global configuration view \[notes] the relationship between le , ge and length is length <= ge <= le; configuration of logically conflicting table entries within the same prefix list is not allowed the list name and sequence number uniquely identify a table entry, and the ip prefix is not allowed to be the same between different table entries run command no ip prefix list list name \[ seq sequence number ] { permit | deny } { any | a b c d/m \[ ge ge | le le ]} to delete ip prefix list \[use cases] sonic# configure terminal sonic(config)# ip prefix list list1 seq 3 permit 10 0 0 0/24 le 26 ge 25 route map route map route map view route map view table 3 route map view table 3 route map view command purpose show route map \[ route map | json ] display route map show route map \[ show route map \[ route map |json] \[command] show route map \[ route map | json ] \[purpose] display route map \[parameters] parameter description route map route map name \[view] privileged user view \[use cases] sonic# show route map zebra route map test invoked 0 optimization enabled processed change false permit, sequence 10 invoked 0 match clauses set clauses call clause action exit routemap permit, sequence 1000 invoked 0 match clauses set clauses call clause action exit routemap ospf route map test invoked 0 optimization enabled processed change false permit, sequence 10 invoked 0 match clauses set clauses call clause action exit routemap permit, sequence 1000 invoked 0 match clauses set clauses call clause action exit routemap ospf6 route map test invoked 0 optimization enabled processed change false permit, sequence 10 invoked 0 match clauses set clauses call clause action exit routemap permit, sequence 1000 invoked 0 match clauses set clauses call clause action exit routemap bgp route map test invoked 0 optimization enabled processed change false permit, sequence 10 invoked 0 match clauses set clauses as path exclude 1 31 comm list 1 call clause action exit routemap permit, sequence 1000 invoked 0 match clauses community 10 set clauses as path prepend 1 1 call clause action exit routemap isis route map test invoked 0 optimization enabled processed change false permit, sequence 10 invoked 0 match clauses set clauses call clause action exit routemap permit, sequence 1000 invoked 0 match clauses set clauses call clause action exit routemap route map config route map config table 4 route map config table 4 route map config command purpose route map route map { permit | deny } seq num create a route map and enter route map configuration view description description specify the description for the route map matchas path as path filter name match as path list match community { community list number|community list name } \[ exact match ] match bgp community list match extcommunity { extcommunity list number | extcommunity list name } match bgp/vpn extended community list match { ip | ipv6 } address { prefix len length | prefix list list name } match address of route match { ip | ipv6 } next hop { prefix len length | prefix list list name | address { a b c d | x\ x x\ x }| type blackhole } match next hop address of route match local preference preference value match local preference of route match metric metric value match metric of route match peer { a b c d | x\ x x\ x | interface name } match peer address set as path prepend { as path | last as number } prepend to the as path set as path exclude as number exclude from the as path setcommunity aa\ nn set bgp community set community none set no bgp community set distance distance set bgp administrative distance to use set extcommunitynone set no extended community attribute set extcommunity rt asn\ nn or ip address\ nn set route target extended community set extcommunity soo asn\ nn or ip address\ nn set site of origin extended community setip next hop { a b c d|peer address } set next hop ip address set ipv6 next hop { local x\ x x\ x | global x\ x x\ x | peer address } set next hop ipv6 address set local preference preference value set local preference of route set metric { metric value | rtt | +rtt | rtt } set metric value set weight weight set bgp weight for routing table route map route map route map {permit|deny} seq num \[command] route map route map { permit | deny } seq num \[purpose] create a route map and enter route map configuration view \[parameters] parameter description route map route map name seq num sequence number, the range is from 1 to 65535 \[view] global configuration view \[notes] run command no route map route map { permit | deny } seq num to delete the route map \[use cases] sonic(config)# route map test permit 100 sonic(config route map)# description description description \[command] description description \[purpose] specify the description for the route map \[parameters] parameter description description in string form \[view] route map configuration view \[notes] run command no description description to delete description \[use cases] sonic# configure terminal sonic(config)# route map test permit 1000 sonic(config)# description test match as path match as path as path filter name \[command] match as path as path filter name \[purpose] match as path list \[parameters] parameter description as path filter name as path list \[view] route map configuration view \[notes] run command no match as path as path filter name to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# match as path test match community { match community { community list number|community list name } \[exact match] \[command] match community {community list number|community list name} \[ exact match ] \[purpose] match bgp community list \[parameters] parameter description community list number community list number, range from 1 to 500 1 99 as standard and 100 500 as expanded community list name community name exact match exact match \[view] route map configuration view \[notes] run command no match community { community list number | community list name } \[ exact match ] to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# match community test match extcommunity { match extcommunity { extcommunity list number | extcommunity list name } \[command] match ext community { extcommunity list number | extcommunity list name } \[purpose] match bgp/vpn extended community list \[parameters] parameter description extcommunity list number community list number, range from 1 to 500 1 99 as standard and 100 500 as expanded extcommunity list name specify extcommunity list \[view] route map configuration view \[notes] run command nomatch extcommunity { extcommunity list number | extcommunity list name } to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# match extcommunity 100 match {ip|ipv6} address {prefix len match {ip|ipv6} address {prefix len length |prefix list list name } \[command] match { ip | ipv6 } address { prefix len length | prefix list list name } \[purpose] match address of route \[parameters] parameter description length ip address length list name specify the name of ip prefix list \[view] route map configuration view \[notes] run command no match { ip | ipv6 } address { prefix len length | prefix list list name } to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# match ip address prefix list test match {ip|ipv6} next hop {prefix len match {ip|ipv6} next hop {prefix len length |prefix list list name |address{ a b c d | x\ x x\ x }|type blackhole} \[command] match { ip | ipv6 } next hop { prefix len length | prefix list list name | address { a b c d | x\ x x\ x }| type blackhole } \[purpose] match next hop address of route \[parameters] parameter description length ip address length list name specify the name of ip prefix list a b c d ipv4 address x\ x x\ x ipv6 address \[view] route map configuration view \[notes] run command no match { ip | ipv6 } next hop { prefix len length | prefix list list name | address { a b c d | x\ x x\ x }| typeblackhole } to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# match ip next hop type blackhole match local preference match local preference preference value \[command] match local preference preference value \[purpose] match local preference of route \[parameters] parameter description preference value route preference, range from 0 to 4294967295 \[view] route map configuration view \[notes] run command nomatch local preference preference value to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# match local preference 12 match metric match metric metric value \[command] match metric metric value \[purpose] match metric of route \[parameters] parameter description metric value route metric, range from 0 to 4294967295 \[view] route map configuration view \[notes] run command no match metric metric value to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# match metric 12 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 |interface name} \[purpose] match peer address \[parameters] parameter description a b c d ipv4 address x\ x x\ x ipv6 address interface name interface name \[view] route map configuration view \[notes] run command no match peer { a b c d | x\ x x\ x | interface name } to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# match peer 1 1 1 1 set as path prepend { set as path prepend { as path |last as number } \[command] set as path prepend { as path | last as number } \[purpose] prepend to the as path \[parameters] parameter description as path as number, range from 1 to 4294967295 specify multiple as numbers separated by spaces last as number use the last as number in the as path the number range is 1 10 \[view] route map configuration view \[notes] set as path prepend { as path | last as number } to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set as path prepend 100 200 set as path exclude set as path exclude as number \[command] set as path exclude as number \[purpose] exclude from the as path \[parameters] parameter description as number as number, range from 1 to 4294967295 specify multiple as numbers separated by spaces \[view] route map configuration view \[notes] run command no set as path exclude as number to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set as path exclude 12 set community set community aa\ nn \[command] set community aa\ nn \[purpose] set bgp community \[parameters] parameter description aa\ nn community number in aa\ nn format (where aa and nn are (0 65535)) or local as|no advertise|no export|internet|graceful shutdown|accept own nexthop|accept own|route filter translated v4|route filter v4|route filter translated v6|route filter v6|llgr stale|no llgr|blackhole|no peer or additive \[view] route map configuration view \[notes] run command no set community aa\ nn to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set community 12 set community none set community none \[command] set communitynone \[purpose] set no bgp community \[view] route map configuration view \[notes] run command no set community to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set community none set distance set distance distance \[command] set distance distance \[purpose] set bgp administrative distance to use \[parameters] parameter description distance range from 0 to 255 \[view] route map configuration view \[notes] run command no set distance distance to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set distance 12 set extcommunity none set extcommunity none \[command] set extcommunitynone \[purpose] set no extended community attribute \[view] route map configuration view \[notes] run command no set extcommunity to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set extcommunity none set extcommunity rt set extcommunity rt asn\ nn or ip address\ nn \[command] set extcommunity rt asn\ nn or ip address\ nn \[purpose] set route target extended community \[parameters] parameter description asn\ nn or ip address\ nn vpn extended community when specifying more than one, separate them with a space \[view] route map configuration view \[notes] run command no set extcommunity rt asn\ nn or ip address\ nn to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set extcommunity rt 100 1 2 set extcommunity soo set extcommunity soo asn\ nn or ip address\ nn \[command] set extcommunity soo asn\ nn or ip address\ nn \[purpose] set site of origin extended community \[parameters] parameter description asn\ nn or ip address\ nn vpn extended community when specifying more than one, separate them with a space \[view] route map configuration view \[notes] run command no set extcommunity soo asn\ nn or ip address\ nn to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set extcommunity soo 100 1 2 set ip next hop { set ip next hop { a b c d | peer address } \[command] set ip next hop { a b c d | peer address } \[purpose] set next hop ip address \[parameters] parameter description a b c d ipv4 address peer address use peer address (for bgp only) \[view] route map configuration view \[notes] run command no set ip next hop a b c d to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set ip next hop 1 1 1 1 set ipv6 next hop {local set ipv6 next hop {local x\ x x\ x |global x\ x x\ x |peer address} \[command] set ipv6 next hop { local x\ x x\ x | global x\ x x\ x | peer address } \[purpose] set next hop ipv6 address \[parameters] parameter description local x\ x x\ x ipv6 local address global x\ x x\ x ipv6 global address peer address use peer address (for bgp only) \[view] route map configuration view \[notes] run command no set ipv6 next hop local x\ x x\ x to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set ipv6 next hop local 100 1 set local preference set local preference preference value \[command] set local preference preference value \[purpose] set local preference of route \[parameters] parameter description preference value preference value (0 4294967295) \[view] route map configuration view \[notes] run command no set local preference preference value to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set local preference 12 set metric { set metric { metric value |rtt|+rtt| rtt} \[command] set metric { metric value | rtt | +rtt | rtt } \[purpose] set metric value \[parameters] parameter description metric value metric value (use +/ for additions or subtractions) ( 4294967295 4294967295) rtt assign round trip time +rtt add round trip time rtt subtract round trip time \[view] route map configuration view \[notes] run command no set metric { metric value | rtt | +rtt | rtt } to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set metric 12 set weight set weight weight \[command] set weight weight \[purpose] set bgp weight for routing table \[parameters] parameter description weight weight value, range from 0 to 4294967295 \[view] route map configuration view \[notes] run command no set weight weight to delete the configuration \[use cases] sonic(config)# route map test permit 1000 sonic(config route map)# set weight 12
