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 true 388,273#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type 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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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 true 441,220#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type 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] true 156,505#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[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 true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type show route map \[ show route map \[ route map |json] \[command] show route map \[ route map | json ] \[purpose] display route map \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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 true 432,229 true#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type 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] true 261,400#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 283,378#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[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] true 276,385#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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] true 239,422#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 247,414#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[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] true 154,507#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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] true 253,408#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 147,514#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 313,348#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 299,362#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[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] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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] true 227,434#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[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] true 255,406#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[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
