Command Line Reference
Layer 3 Configuration
BGP
63 min
bgp view bgp view table 1 bgp view table 1 bgp view command purpose show ip bgp neighbors \[ a b c d | x\ x x\ x \[options]] display information of bgp neighbors show ip bgp \[ a b c d/m | a b c d | x\ x x\ x/m | x\ x x\ x ] display network information of bgp neighbors show ip bgp summary \[ established | failed | json ] display summary of bgp neighbor status show ip bgp community list { community list number | community name } display information of bgp community list show ip bgp \[ vrf all | vrf name ] display information of bgp show bgp peer group display detailed information on bgp peer groups show ip bgp statistics display bgp rib advertisement statistics show ip bgp neighbors \[ show ip bgp neighbors \[ a b c d|x\ x x\ x \[ options ]] \[command] show ip bgp neighbors \[ a b c d|x\ x x\ x \[ options ]] \[purpose] display information of bgp neighbors \[parameters] parameter description a b c d ipv4 neighbor to display information about x\ x x\ x ipv6 neighbor to display information about \[options] option description routes display routes learned from neighbor advertised routes display the routes advertised to a bgp neighbor received routes display the received routes from neighbor prefix counts display detailed prefix count information filtered routes display the filtered routes received from neighbor bestpath routes display the routes selected by best path received display information received from a bgp neighbor flap statistics display flap statistics of the routes learned from neighbor dampened routes display the dampened routes received from neighbor json javascript object notation \[view] privileged user view \[use cases] sonic# show ip bgp neighbors 10 0 0 1 bgp neighbor is 10 0 0 1, remote as 65100, local as 65100, internal link hostname leaf 103 bgp version 4, remote router id 10 1 0 103, local router id 10 1 0 221 bgp state = established, up for 00 11 35 last read 00 00 35, last write 00 00 35 hold time is 180, keepalive interval is 60 seconds neighbor capabilities 4 byte as advertised and received addpath ipv4 unicast rx advertised ipv4 unicast and received route refresh advertised and received(old & new) address family ipv4 unicast advertised and received hostname capability advertised (name sonic,domain name n/a) received (name leaf 103,domain name n/a) graceful restart capability advertised and received remote restart timer is 120 seconds address families by peer none graceful restart information end of rib send ipv4 unicast end of rib received ipv4 unicast local gr mode helper remote gr mode helper r bit false timers configured restart time(sec) 120 received restart time(sec) 120 ipv4 unicast f bit false end of rib sent yes end of rib sent after update yes end of rib received yes timers configured stale path time(sec) 360 message statistics inq depth is 0 outq depth is 0 sent rcvd opens 8 7 notifications 2 10 updates 2 14 keepalives 34 30 route refresh 0 0 capability 0 0 total 46 61 minimum time between advertisement runs is 0 seconds for address family ipv4 unicast update group 7, subgroup 4 packet queue length 0 community attribute sent to this neighbor(all) 7 accepted prefixes connections established 2; dropped 1 last reset 00 11 37, no afi/safi activated for peer local host 10 0 0 2, local port 179 foreign host 10 0 0 1, foreign port 37052 nexthop 10 0 0 2 nexthop global fe80 1a17 25ff\ fe37 6736 nexthop local fe80 1a17 25ff\ fe37 6736 bgp connection shared network bgp connect retry timer in seconds 120 estimated round trip time 1 ms read thread on write thread on fd used 24 show ip bgp \[ show ip bgp \[ a b c d/m | a b c d | x\ x x\ x/m | x\ x x\ x ] \[command] show ipbgp \[ a b c d/m | a b c d | x\ x x\ x/m | x\ x x\ x ] \[purpose] display network information of bgp neighbors \[parameters] parameter description a b c d/m ipv4 prefix a b c d ipv4 network in the bgp routing table to display x\ x x\ x/m ipv6 prefix x\ x x\ x ipv6 network in the bgp routing table to display \[view] privileged user view \[use cases] sonic# show ip bgp bgp table version is 1282, local router id is 10 1 0 32, vrf id 0 default local pref 100, local as 65100 status codes s suppressed, d damped, h history, valid, > best, = multipath, i internal, r rib failure, s stale, r removed nexthop codes @nnn nexthop's vrf id, < announce nh self origin codes i igp, e egp, ? incomplete network next hop metric locprf weight path = 192 177 0 0/25 10 0 0 59 0 64600 65534 64618 65100 ? > 10 0 0 57 0 64600 65534 64618 65100 ? = 192 177 0 128/25 10 0 0 59 0 64600 65534 64618 65100 ? > 10 0 0 57 0 64600 65534 64618 65100 ? display ed 2 routes and 1282 total paths show ip bgp summary \[established|failed|json] show ip bgp summary \[established|failed|json] \[command] show ip bgp summary \[ established | failed | json ] \[purpose] display summary of bgp neighbor status \[view] privileged user view \[use cases] sonic# show ip bgp summary ipv4 unicast summary bgp router identifier 10 1 0 32, local as number 65100 vrf id 0 bgp table version 14084 rib entries 1287, using 231 kib of memory peers 2, using 41 kib of memory peer groups 6, using 384 bytes of memory neighbor v as msgrcvd msgsent tblver inq outq up/down state/pfxrcd neighborname 10 0 0 57 4 64600 5593 7340 0 0 0 02 57 22 640 arista01t1 10 0 0 59 4 64600 5599 7118 0 0 0 02 57 17 640 arista02t1 total number of neighbors 2 show ip bgp community list { show ip bgp community list { community list number | community name } \[command] show ip bgp community list { community list number | community name } \[purpose] display information of bgp community list \[parameters] parameter description community list number community list number, range from 1 to 500 community name community name \[view] privileged user view \[use cases] sonic# show ip bgp community list show ip bgp \[vrf all| show ip bgp \[vrf all| vrf name ] \[command] show ip bgp \[ vrf all | vrf name ] \[purpose] display information of bgp \[parameters] parameter description all all views/vrfs vrf name specify the vrf name, the default vrf is default \[view] privileged user view \[use cases] sonic# show ip bgp vrf all instance default bgp table version is 2375, local router id is 30 11 0 84, vrf id 0 default local pref 100, local as 65100 status codes s suppressed, d damped, h history, valid, > best, = multipath, i internal, r rib failure, s stale, r removed nexthop codes @nnn nexthop's vrf id, < announce nh self origin codes i igp, e egp, ? incomplete network next hop metric locprf weight path > 0 0 0 0/0 30 11 13 9 0 65101 4200000001 i show bgp peer group show bgp peer group \[command] show bgp peer group \[purpose] display detailed information on bgp peer groups \[view] privileged user view \[use cases] sonic# show bgp peer group bgp peer group peer v4 ebgp peer group type is external configured address families ipv4 unicast; l2vpn evpn; peer group members 30 11 122 1 active 30 11 122 137 active bgp peer group peer v6 ebgp peer group type is external configured address families ipv6 unicast; l2vpn evpn; peer group members 2022 2222 active 2022 2224 active show ip bgp statistics show ip bgp statistics \[command] show ip bgp statistics \[purpose] display bgp rib advertisement statistics \[view] privileged user view \[use cases] sonic# show ip bgp statistics bgp ipv4 unicast rib statistics (vrf default) total advertisements 25 total prefixes 25 average prefix length 19 20 unaggregateable prefixes 25 maximum aggregateable prefixes 0 bgp aggregate advertisements 0 address space advertised 985600 % announced 0 02 /8 equivalent 0 06 /24 equivalent 3850 00 advertisements with paths 25 longest as path (hops) 1 average as path length (hops) 1 00 largest as path (bytes) 6 average as path size (bytes) 6 00 highest public asn 0 bgp config bgp config table 2 bgp config table 2 bgp config command purpose bgp as path access list list name { permit | deny } line add a bgp autonomous system path filter bgp community list community list number \[ standard | expanded ] \[ seq seq num ] { permit | deny } aa\ nn add a community list entry bgp extcommunity list excommunity list number \[ standard | expanded ] \[ seq seq num ] { permit | deny } line add an extended community list entry router bgp as number \[ vrf vrf name ] enter bgp configuration view address family { ipv4 | ipv6 | l2vpn } unicast enter address family command mode aggregate address { a b c d a b c d | a b c d/m } \[ as set | summary only | route map route map ] configure bgp aggregate entries bgp always compare med allow comparing med from different neighbors bgp bestpath \[ as path { confed | ignore | multipath relax }| compare routerid ] change the default bestpath selection bgp ebgp requires policy require in and out policy for ebgp peers (rfc8212) bgp graceful restart global graceful restart command bgp router id a b c d override configured router identifier bgp route reflector allow outbound policy allow modifications made by out route map and enable rr(route reflector) bgp network import check check bgp network route exists in igp bgp shutdown \[ message string ] administrative shutdown of the bgp instance distance { bgp external distance internal distance local distance | administrative distance a b c d/m } define an administrative distance neighbor { a b c d | x\ x x\ x | string } advertisement interval internal set the minimum interval between sending bgp routing updates neighbor { a b c d | x\ x x\ x | string } bfd enable bfd support neighbor { a b c d | x\ x x\ x | string } description description allow ebgp neighbors not on directly connected networks neighbor { a b c d | x\ x x\ x | string } ebgp multihop count allow ebgp neighbors not on directly connected networks neighbor { a b c d | x\ x x\ x | string } password password set a password for bgp neighbor neighbor { a b c d | x\ x x\ x | string } peer group peer group set to be the member of a peer group neighbor { a b c d | x\ x x\ x | string } remote as as number specify a bgp neighbor neighbor { a b c d | x\ x x\ x | string } shutdown administratively shut down this neighbor neighbor { a b c d | x\ x x\ x | string } update source { a b c d | x\ x x \ x| string } specify the source of routing updates neighbor peer group peer group add a peer group update delay max delay force initial delay for best path and updates network { a b c d/m|a b c d \[mask a b c d ]} \[ route map route map ] specify a network to announce via bgp neighbor { a b c d | x\ x x \ x| string } activate enable the address family for this neighbor neighbor { a b c d | x\ x x \ x| string } allowas in \[ number | origin ] accept as path with my as present in it neighbor { a b c d | x\ x x \ x| string } as override override asns in outbound updates if as path equals remote as neighbor { a b c d | x\ x x \ x| string } default originate \[ route map route map ] originate default route to this neighbor neighbor { a b c d | x\ x x \ x| string } next hop self \[force] disable the next hop calculation for this neighbor neighbor { a b c d | x\ x x \ x| string } prefix list list name {in|out} filter updates to/from this neighbor neighbor { peer group | a b c d | x\ x x \ x| string } route map route map { in|out } apply route map to neighbor redistribute src protocol \[ metric metric value | route map route map ] redistribute information from another routing protocol bgp as path access list bgp as path access list list name {permit|deny} line \[command] bgp as path access list list name { permit | deny } line \[purpose] add a bgp autonomous system path filter \[parameters] parameter description list name regular expression access list name line a regular expression (1234567890 ^|\[, {}() ]$ + ? \\) to match the bgp as paths \[view] global configuration view \[notes] run command no bgp as path access list list name { permit | deny } line to delete as path filter \[use cases] sonic# configure terminal sonic(config)# bgp as path access list test permit 66 bgp community list bgp community list community list number \[standard|expanded] \[seq seq num ] {permit|deny} aa\ nn \[command] bgp community list community list number \[ standard | expanded ] \[ seq seq num ] { permit | deny } aa\ nn \[purpose] add a community list entry \[parameters] parameter description community list number community list number, range from 1 to 500 1 99 as standard and 100 500 as expanded standard add a standard community list entry expanded add an expanded community list entry seq num sequence number of an entry, range from 1 to 4294967295 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] global configuration view \[notes] run command no bgp community list community list number \[ standard | expanded ] \[ seq seq num ] { permit | deny } aa\ nn to delete bgp community list when seq is not specified, it is started from 5, and the increment interval is 5 \[use cases] sonic# configure terminal sonic(config)# bgp community list standard 10 permit 12 13 bgp extcommunity list bgp extcommunity list excommunity list number \[standard|expanded] \[seq seq num ] {permit|deny} line \[command] bgp extcommunity list excommunity list number \[ standard | expanded ] \[ seq seq num ] { permit | deny } line \[purpose] add an extended community list entry \[parameters] parameter description excommunity list number excommunity list number, range from 1 to 500 1 99 as standard and 100 500 as expanded standard specify standard extcommunity list expanded specify expanded extcommunity list seq num sequence number of an entry, range from 1 to 4294967295 line extended community attribute in 'rt aa\ nn or ipaddr\ nn' or 'soo aa\ nn or ipaddr\ nn' format \[view] global configuration view \[notes] run command no bgp extcommunity list excommunity list number \[ standard | expanded ] \[ seq seq num ] { permit | deny } line to delete extended community list \[use cases] sonic# configure terminal sonic(config)# bgp extcommunity list standard test permit aa router bgp router bgp as number \[vrf vrf name ] \[command] router bgp as number \[ vrf vrf name ] \[purpose] global configuration view \[parameters] parameter description as number range from 1 to 4294967295, the default as is 65100 vrf name vrf name, default vrf if not specified \[view] bgp configuration view \[notes] bgp views use the core instance (i e , the default vrf) to communicate with peers run command no router bgp as number to delete configured bgp local as number \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family {ipv4|ipv6|l2vpn} unicast address family {ipv4|ipv6|l2vpn} unicast \[command] address family { ipv4 | ipv6|l2vpn } unicast \[purpose] enter address family command mode \[view] bgp configuration view \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# aggregate address { aggregate address { a b c d a b c d | a b c d/m } \[as set|summary only|route map route map ] \[command] aggregate address { a b c d a b c d|a b c d/m } \[ as set | summary only | route map route map ] \[purpose] configure bgp aggregate entries \[parameters] parameter description a b c d aggregate address a b c d aggregate mask a b c d/m aggregate prefix as set generate as set path information summary only filter more specific routes from updates route map apply route map to aggregate network \[view] bgp configuration view/bgp ipv4 unicast address family view \[notes] run command no aggregate address { a b c d a b c d|a b c d/m } \[ as set | summary only | route map route map ] to delete bgp aggregate configuration \[use cases] sonic# configure terminal sonic(config)# router bgp 65200 sonic(config router)# aggregate address 100 1 1 0/24 as set sonic(config router)# aggregate address 110 1 1 0/19 summary only bgp always compare med bgp always compare med \[command] bgp always compare med \[purpose] allow comparing med from different neighbors \[view] bgp configuration view \[notes] this command is mainly applied to control the med attribute to change the routing policy of bgp it allows bgp to compare the med attribute values of routes from different as if there are multiple valid routes to reach the same destination address, the route with smaller med parameter can be selected as the final route actually in use run command no bgp always compare med to disable bgp always compare med \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# bgp always compare med bgp bestpath \[as path {confed|ignore|multipath relax}|compare routerid] bgp bestpath \[as path {confed|ignore|multipath relax}|compare routerid] \[command] bgp bestpath \[ as path { confed | ignore | multipath relax }| compare routerid ] \[purpose] change the default bestpath selection \[parameters] parameter description confed compare path lengths including confederation sets & sequences in selecting a route ignore ignore as path length in selecting a route multipath relax allow load sharing across routes that have different as paths (but same length) compare routerid compare router id for identical ebgp paths \[view] bgp configuration view \[notes] as path relax is a routing level switch that determines how the same route from different as domains is handled when is enabled, the next hop of the same route from different as domains will be an ecmp group when this is disabled, only one of the routes will be selected for forwarding run command no bgp bestpath \[ as path { confed | ignore | multipath relax }| compare routerid ] to delete bgp bestpath selection \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# bgp bestpath as path ignore bgp ebgp requires policy bgp ebgp requires policy \[command] bgp ebgp requires policy \[purpose] require in and out policy for ebgp peers (rfc8212) \[view] bgp configuration view \[notes] this command requires that there must be a routing policy applied to the ebgp session, if there is not, no routes will be accepted or announced, and is on by default in practice, we usually use no bgp ebgp requires policy command to disable the feature above \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# no bgp ebgp requires policy bgp graceful restart bgp graceful restart \[command] bgp graceful restart \[ preserve fw state | restart time restart time | rib stale time rib stale time | select defer time select defer time | stalepath time stalepath time ] \[purpose] global graceful restart command \[parameters] parameter description preserve fw state sets f bit indication that fib is preserved while doing graceful restart restart time set the time to wait to delete stale routes before a bgp open message is received in seconds range from 1 to 4095 rib stale time specify the stale route removal timer in rib in seconds range from 1 to 3600 select defer time set the time to defer the bgp route selection after restart in seconds range from 0 to 3600 statlepath time set the max time to hold onto restarting peer's stale paths in seconds range from 1 to 4095 \[view] bgp configuration view \[notes] run command no bgp graceful restart \[ preserve fw state | restart time delay | rib stale time delay | select defer time delay | stalepath time delay ] to disable graceful restart \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# bgp graceful restart restart time 200 bgp router id bgp router id a b c d \[command] bgp router id a b c d \[purpose] override configured router identifier \[parameters] parameter description a b c d bgp route id \[view] bgp configuration view \[notes] this command is optional use loopback0 ip as the router id by default run command no bgp router id a b c d to delete bgp route id \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# bgp router id 1 1 1 1 bgp route reflector allow outbound policy bgp route reflector allow outbound policy \[command] bgp route reflector allow outbound policy \[purpose] allow modifications made by out route map and enable rr(route reflector) \[view] bgp configuration view \[notes] run command no bgp route reflector allow outbound policy to disable rr \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# bgp route reflector allow outbound policy bgp network import check bgp network import check \[command] bgp network import check \[purpose] check bgp network route exists in igp \[view] bgp configuration view \[notes] run command no bgp network import check to disable check \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# bgp network import check bgp shutdown \[message bgp shutdown \[message string ] \[command] bgp shutdown \[ message string ] \[purpose] administrative shutdown of the bgp instance \[parameters] parameter description string add a shutdown message (rfc 8203) \[view] bgp configuration view \[notes] run command no bgp shutdown \[ message string ] startup all bgp sessions \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# bgp shutdown distance {bgp distance {bgp external distance internal distance local distance | administrative distance a b c d/m } \[command] distance { bgp external distance internal distance local distance | administrative distance a b c d/m } \[purpose] define an administrative distance \[parameters] parameter description external distance distance for routes external to the as, range from 1 to 255 internal distance distance for routes internal to the as, range from 1 to 255 local distance distance for local routes, range from 1 to 255 administrative distance a b c d/m administrative distance, range from 1 to 255 \[view] bgp configuration view \[notes] run command no distance to delete distance configuration \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# distance 123 1 1 1 1/32 neighbor { neighbor { a b c d | x\ x x\ x | string } advertisement interval internal \[command] neighbor { a b c d | x\ x x\ x | string } advertisement interval internal \[purpose] set the minimum interval between sending bgp routing updates \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag internal time in seconds, range from 0 to 600 \[view] bgp configuration view \[notes] run command no neighbor { a b c d | x\ x x \ x| string } advertisement interval internal to delete configuration \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 1 1 1 1 advertisement interval 2 neighbor { neighbor { a b c d | x\ x x\ x | string } bfd \[command] neighbor { a b c d | x\ x x\ x | string } bfd \[purpose] enable bfd support \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag \[view] bgp configuration view \[notes] run command no neighbor { a b c d | x\ x x\ x | string } bfd to disable bfd support \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 10 0 0 1 bfd neighbor { neighbor { a b c d | x\ x x\ x | string } description description \[command] neighbor { a b c d | x\ x x\ x | string } description description \[purpose] set neighbor specific description \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag description specify the description for the bgp neighbor in string form \[view] bgp configuration view \[notes] run command no neighbor { a b c d | x\ x x \ x| string } description description to delete description \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 1 1 1 1 description test neighbor { neighbor { a b c d | x\ x x\ x | string } ebgp multihop count \[command] neighbor { a b c d | x\ x x\ x | string } ebgp multihop count \[purpose] allow ebgp neighbors not on directly connected networks \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag count maximum hop count, the range is \[1,255] \[view] bgp configuration view \[notes] this feature must be enabled when using a loopback interface to configure bgp neighbors the normal maximum hop count is configured as 255 run command no neighbor { a b c d | x\ x x\ x | string } ebgp multihop count to disable this feature \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 1 1 1 1 ebgp multihop 2 neighbor { neighbor { a b c d | x\ x x\ x | string } password password \[command] neighbor { a b c d | x\ x x\ x | string } password password \[purpose] set a password for bgp neighbor \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag password the password \[view] bgp configuration view \[notes] this command sets an md5 password for the bgp neighbor to connect to the remote peer's tcp socket run command no neighbor { a b c d | x\ x x\ x | string } password password to delete the password \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 1 1 1 1 password test1234 neighbor { neighbor { a b c d | x\ x x\ x | string } peer group peer group \[command] neighbor { a b c d | x\ x x\ x | string } peer group peer group \[purpose] set to be the member of a peer group \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag peer group peer group name \[view] bgp configuration view \[notes] run command no neighbor { a b c d | x\ x x\ x | string } peer group peer group to unbind \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 1 1 1 1 peer group peer v4 ebgp neighbor { neighbor { a b c d | x\ x x\ x | string } remote as as number \[command] \[command] neighbor { a b c d | x\ x x\ x | string } remote as as number \[purpose] specify a bgp neighbor \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag as number range from 1 to 4294967295 \[view] bgp configuration view \[notes] run command no neighbor { a b c d | x\ x x\ x | string } remote as as number to delete the neighbor \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 10 0 0 1 remote as 65200 neighbor { neighbor { a b c d | x\ x x\ x | string } shutdown \[command] neighbor { a b c d | x\ x x\ x | string } shutdown \[purpose] administratively shut down this neighbor \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag \[view] bgp configuration view \[notes] run command no neighbor { a b c d | x\ x x\ x | string } shutdown to administratively startup this neighbor \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 1 1 1 1 shutdown neighbor { neighbor { a b c d | x\ x x\ x | string } update source { a b c d | x\ x x\ x | string } \[command] neighbor { a b c d | x\ x x\ x | string } update source { a b c d | x\ x x\ x | string } \[purpose] specify the source of routing updates \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag \[view] bgp configuration view \[notes] when using a loopback interface to configure a bgp neighbor you must set the source to the loopback interface run command no neighbor { a b c d | x\ x x\ x | string } update source { a b c d | x\ x x\ x | string } to delete the source of routing updates \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor 1 1 1 1 update source ethernet49 neighbor neighbor peer group peer group \[command] neighbor peer group peer group \[purpose] add a peer group \[parameters] parameter description peer group peer group name \[view] bgp configuration view \[notes] run command no neighbor peer group peer group to delete this peer group \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# neighbor peer v4 ebgp peer group update delay update delay max delay \[command] update delay max delay \[purpose] force initial delay for best path and updates \[parameters] parameter description max delay max delay in seconds, range from 0 to 3600 \[view] bgp configuration view \[notes] run command no bgp update delay max delay to delete this configuration \[use cases] sonic# configure terminal sonic(config)# bgp update delay 2 network { network { a b c d/m|a b c d \[mask a b c d ]} \[route map route map ] \[command] network { a b c d/m|a b c d \[ mask a b c d ]} \[ route map route map ] \[purpose] specify a network to announce via bgp \[parameters] parameter description a b c d/m ipv4 prefix a b c d network number a b c d network mask route map route map to modify the attributes \[view] bgp configuration view/bgp ipv4 unicast address family view \[notes] run command no network { a b c d/m|a b c d \[ mask a b c d ]} \[ route map route map ] to delete the network \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# network 1 1 1 0/24 neighbor { neighbor { a b c d | x\ x x\ x | string } activate \[command] neighbor { a b c d | x\ x x\ x | string } activate \[purpose] enable the address family for this neighbor \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag \[view] bgp address family view \[notes] by default, the switch will advertise ipv4 unicast address family to all neighbors using "no bgp default ipv4 unicast" will override this default, so all address families need to be explicitly enabled run command no neighbor { a b c d | x\ x x\ x | string } activate to disable the address family for this neighbor \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# network 1 1 1 1 activate sonic(config router af)# exit sonic(config router)# address family l2vpn evpn sonic(config router af)# network 1 1 1 1 activate neighbor { neighbor { a b c d | x\ x x\ x | string } allowas in \[ number |origin] \[command] neighbor { a b c d | x\ x x \ x| string } allowas in \[ number | origin ] \[purpose] accept as path with my as present in it \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag number number of occurrences of as number, the range is \[1,10] origin only accept my as in the as path if the route was originated in my as \[view] bgp ipv4 unicast address family view \[notes] run command no neighbor { a b c d | x\ x x\ x | string } allowas in \[ number | origin ] to disable this feature \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# neighbor 1 1 1 1 allowas in 2 neighbor { neighbor { a b c d | x\ x x\ x | string } as override \[command] neighbor { a b c d | x\ x x\ x | string } as override \[purpose] override asns in outbound updates if as path equals remote as \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag \[view] bgp ipv4 unicast address family view \[notes] run command no neighbor { a b c d | x\ x x\ x | string } as override to delete this configuration \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# neighbor 1 0 0 1 as override neighbor { neighbor { a b c d | x\ x x\ x | string } default originate \[route map route map ] \[command] neighbor { a b c d | x\ x x\ x | string } default originate \[ route map route map ] \[purpose] originate default route to this neighbor \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag route map route map to modify the attributes \[view] bgp address family view \[notes] bgp does not advertise the default route (0 0 0 0/0) by default, even if it is in the routing table use this command when you want to advertise the default route to the peer run command no neighbor { a b c d | x\ x x\ x | string } default originate \[ route map route map ] to disable this feature \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# neighbor 1 1 1 1 default originate route map test neighbor { neighbor { a b c d | x\ x x\ x | string } next hop self \[force] \[command] neighbor { a b c d | x\ x x\ x | string } next hop self \[ force ] \[purpose] disable the next hop calculation for this neighbor \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag force set the next hop to self for reflected routes \[view] bgp address family view \[notes] run command no neighbor { a b c d | x\ x x\ x | string } next hop self \[ force ] to disable this feature \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# neighbor 1 1 1 1 next hop self neighbor { neighbor { a b c d | x\ x x\ x | string } prefix list list name {in|out} \[command] neighbor { a b c d | x\ x x\ x | string } prefix list list name { in | out } \[purpose] filter updates to/from this neighbor \[parameters] parameter description a b c d ipv4 neighbor address x\ x x\ x ipv6 neighbor address string interface name or neighbor tag list name specify the name of ip prefix list \[view] bgp ipv4 unicast address family view \[notes] run command no neighbor { a b c d | x\ x x\ x | string } prefix list name \[ in | out ] to disable this configuration \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# neighbor 1 1 1 1 prefix list test in neighbor { neighbor { peer group | a b c d | x\ x x\ x | string } route map route map {in|out} \[command] neighbor { peer group | a b c d | x\ x x \ x| string } route map route map { in | out } \[purpose] apply route map to neighbor \[parameters] parameter description peer group peer group name a b c d ipv4 neighbor address x\ x x \ x ipv6 neighbor address string interface name or neighbor tag route map route map name \[view] bgp ipv4 unicast address family view \[notes] the route map needs to be pre created before it can be bound to a neighbor a neighbor can only bind to one route map in in/out directions multiple configurations will override run command no neighbor { peer group | a b c d | x\ x x \ x| string } route map route map in | out to delete this configuration \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# neighbor 1 1 1 1 route map test in redistribute redistribute src protocol \[metric metric value |route map route map ] \[command] redistribute src protocol \[ metric metric value | route map route map ] \[purpose] redistribute information from another routing protocol \[parameters] parameter description src protocol set source protocol (babel|connected|eigrp|isis|kernel|openfabric|ospf|rip|static|table|vnc|vnc direct) metric value metric for redistributed routes, range from 0 to 4294967295 route map route map reference \[view] bgp ipv4 unicast address family view \[notes] the redistribution for the same protocol is an overriding configuration run command no redistribute src protocol \[ metric metric value | route map route map ] to cancel route redistribution \[use cases] sonic# configure terminal sonic(config)# router bgp 65100 sonic(config router)# address family ipv4 unicast sonic(config router af)# redistribute ospf metric 200
