---
title: BGP Configuration
slug: enterprise-v6p1/bgp-configuration
createdAt: 2026-03-18T11:58:39.930Z
---

### <font color="#1d50a2">show bgp peer-group</font>

**\[Command]**
**show bgp peer-group**

**\[Purpose]**
This command displays configured BGP peer-groups

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show bgp peer-group
BGP peer-group PEER_V4_EBGP
 Peer-group type is external
 Configured address-families: IPv4 Unicast;
 Peer-group members:
  30.11.13.9 Established
  30.11.13.137 Active
BGP peer-group PEER_V4_IBGP
 Peer-group type is external
 Configured address-families: IPv4 Unicast;
BGP peer-group PEER_V4_INT
 Peer-group type is external
 Configured address-families: IPv4 Unicast;
BGP peer-group PEER_V6_EBGP
 Peer-group type is external
 Configured address-families: IPv4 Unicast;
 Peer-group members:
  2022::9300 Active
  2022::9310 Established
BGP peer-group PEER_V6_IBGP
 Peer-group type is external
 Configured address-families: IPv4 Unicast;
BGP peer-group PEER_V6_INT
 Peer-group type is external
 Configured address-families: IPv4 Unicast;
```

### <font color="#1d50a2">show ip bgp</font>

**\[Command]**
**show ip bgp** \{**view**\[**all|** *view\_name* ] | \[**vrf** \[**all**| *vrf\_name* ]]}

**\[Purpose]**
Display the routing table of BGP view or VRF

**\[Parameter]**

| **Parameter** | **Description**  |
| ------------- | ---------------- |
| **view**      | specify view     |
| *view\_name*  | the name of view |
| *vrf*         | specify VRF      |
| *vrf\_name*   | the name of VRF  |

**\[View]**
System view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">show ip bgp neighbors</font>

**\[Command]**
**show ip bgp neighbors**

**\[Purpose]**
Display the details of BGP neighbors

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show ip bgp neighbors
BGP neighbor is 1.1.1.2, remote AS 65100, local AS 65200, external link
 BGP version 4, remote router ID 2.1.1.2, local router ID 192.168.15.48
 BGP state = Established, up for 02:34:12
 Last read 00:00:09, Last write 00:00:12
 Hold time is 90, keepalive interval is 30 seconds
 Neighbor capabilities:
  4 Byte AS: advertised
  AddPath:
   IPv4 Unicast: RX advertised IPv4 Unicast
  Route refresh: advertised
  Address Family IPv4 Unicast: advertised and received
  Hostname Capability: advertised (name: sonic,domain name: n/a) not received
  Graceful Restart Capability: advertised
 Graceful restart information:
  Local GR Mode: Helper*
  Remote GR Mode: Disable
  R bit: False
  Timers:
   Configured Restart Time(sec): 120
   Received Restart Time(sec): 0
 Message statistics:
  Inq depth is 0
  Outq depth is 0
                     Sent    Rcvd
  Opens:             3         3
  Notifications:     0         4
  Updates:           2         6
  Keepalives:      338        337
  Route Refresh:     0         0
  Capability:        0         0
  Total:           343        350
 Minimum time between advertisement runs is 0 seconds
 For address family: IPv4 Unicast
 Update group 3, subgroup 3
 Packet Queue length 0
 Community attribute sent to this neighbor(all)
 25 accepted prefixes
 Connections established 3; dropped 2
 Last reset 02:34:17, No AFI/SAFI activated for peer
Local host: 1.1.1.1, Local port: 179
Foreign host: 1.1.1.2, Foreign port: 1051
Nexthop: 1.1.1.1
Nexthop global: fe80::211:24ff:fe1a:1b61
Nexthop local: fe80::211:24ff:fe1a:1b61
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: 27
```

### <font color="#1d50a2">show ip bgp</font>

**\[Command]**
**show ip bgp**

**\[Purpose]**
Display all route information received from BGP neighbors

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show ip bgp
Instance default:
BGP table version is 3, local router ID is 10.1.1.138, vrf id 0
Default local pref 100, local AS 65001
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
RPKI validation codes: V valid, I invalid, N Not found
  Network     Next Hop      Metric LocPrf Weight Path
*> 10.1.1.138/32  0.0.0.0       0            32768 i
*> 10.1.1.139/32  10.1.1.2      0      0     65002 i
*> 10.1.1.216/32  10.1.1.2      0     65002  65003 i
```

### <font color="#1d50a2">show ip bgp statistics</font>

**\[Command]**
**show ip bgp statistics**

**\[Purpose]**
Display BGP routing-related statistics

**\[View]**
System view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">router bgp</font>

**\[Command]**
**router bgp** *AS* \[**view** *view\_name* **|vrf** *vrf\_name* **]**&#x20;
**no router bgp** *AS* \[**view** *view\_name* **|vrf** *vrf\_name* **]**

**\[Purpose]**
Enable a BGP protocol process with the specified AS number

**\[Parameter]**

| **Parameter** | **Description**                                                             |
| ------------- | --------------------------------------------------------------------------- |
| *AS*          | AS number(1\~4294967295) or ASN format as dot notation(0..65535).(0..65535) |
| *view\_name*  | specify the view name                                                       |
| *vrf\_name*   | specify the VRF name                                                        |

**\[View]**
System configuration view

**\[Notes]**
When VRF\_name is not specified, the BGP protocol process belongs to the default VRF.
When expressing ASN in dot notation, the decimal ASN 65538 is equivalent to the dot notation 1.2.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)#
```

### <font color="#1d50a2">bgp router-id *A.B.C.D*</font>

**\[Command]**
**bgp router-id** *A.B.C.D*
**no bgp router-id** *A.B.C.D*

**\[Purpose]**
This command specifies the router-ID

**\[Parameter]**

| **Parameter** | **Description**              |
| ------------- | ---------------------------- |
| *A.B.C.D*     | configured router identifier |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp router-id 1.1.1.1
```

### <font color="#1d50a2">bgp cluster-id *A.B.C.D*</font>

**\[Command]**
**bgp cluster-id** *A.B.C.D*
**no bgp cluster-id** *A.B.C.D*

**\[Purpose]**
Configure the cluster ID for the route reflector

**\[View]**
BGP configuration view

**\[Usage Scenario]**
When multiple route reflectors exist within a cluster, it is necessary to configure the same cluster ID to identify that these reflectors belong to the same cluster

**\[Use Cases]**

```plaintext
sonic(config)# router bgp 65100
sonic(config-router)# bgp cluster-id 10.1.1.10
```

### <font color="#1d50a2">bgp bestpath</font>

**\[Command]**
**bgp bestpath \[as-path \{confed | ignore | multipath-relax}]**
**no bgp bestpath \[as-path \{confed | ignore | multipath-relax}]**

**\[Purpose]**
Specify the bestpath decision method for BGP

**\[Parameter]**

| **Parameter**     | **Description**                                                                                                                                                                                                                                                                                      |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *confed*          | Specifies that BGP considers AS path length and content when selecting the best route                                                                                                                                                                                                                |
| *ignore*          | Ignore the attributes when specifying bgp bestpath decision method multipath-relax. This command specifies that BGP decision process should consider paths of equal AS\_PATH length candidates for multipath computation. Without the knob, the entire AS\_PATH must match for multipath computation |
| *multipath-relax* | Ensure that when comparing routes where both are equal on most metrics, including local-pref, AS\_PATH length, IGP cost, MED, that the tie is broken based on router-ID                                                                                                                              |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp bestpath as-path ignore
```

### <font color="#1d50a2">bgp bestpath compare-routerid</font>

**\[Command]**
**bgp bestpath compare-routerid**
**no bgp bestpath compare-routerid**

**\[Purpose]**
Configure BGP to ignore Router ID when selecting the best route

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp bestpath as-path compare-routerid
```

### <font color="#1d50a2">bgp ebgp-requires-policy</font>

**\[Command]**
**bgp ebgp-requires-policy**
**no bgp ebgp-requires-policy**

**\[Purpose]**
This command requires incoming and outgoing filters to be applied for EBGP sessions

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp ebgp-requires-policy
```

### <font color="#1d50a2">bgp graceful-restart restart-time</font>

**\[Command]**
**bgp graceful-restart restart-time** *delay*
**no bgp graceful-restart restart-time** *delay*

**\[Purpose]**
Set the maximum waiting time for the remote end to wait for the successful reconstruction of the local BGP neighbor

**\[Parameter]**

| **Parameter** | **Description**              |
| ------------- | ---------------------------- |
| *delay*       | Range value: 1-4094, unit: s |

**\[View]**
BGP configuration view

**\[Usage Scenario]**
After executing this command, when the remote device detects that the BGP peer established with the local device is in a Down state, it triggers the BGP session to enter Graceful Restart mode. During this time, the device can continue to use previously learned routing information without waiting for the BGP session to be reestablished. If the maximum waiting time is exceeded without a successful reconnection, the device exits the Graceful Restart process and withdraws routes.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp graceful-restart restart-time 200
```

### <font color="#1d50a2">bgp shutdown</font>

**\[Command]**
**bgp shutdown** \[**message** *String* **]**
**no bgp shutdown** \[**message** *String* **]**

**\[Purpose]**
Administrative shutdown of all peers of a BGP instance

**\[Parameter]**

| **Parameter** | **Description**                                    |
| ------------- | -------------------------------------------------- |
| *string*      | An optional shutdown message MSG can be specified. |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp shutdown message testing
```

### <font color="#1d50a2">bgp network import-check</font>

**\[Command]**
**bgp network import-check**
**no bgp network import-check**

**\[Purpose]**
Check for the networks existence in RIB

**\[View]**
BGP configuration view

**\[Usage Scenario]**
This configuration modifies the behavior of the network statement. If you have this configured the underlying network must exist in the rib. If you have the \[no] form configured then BGP will not check for the networks existence in the rib. For versions 7.3 and before frr defaults for datacenter were the network must exist, traditional did not check for existence. For versions 7.4 and beyond both traditional and datacenter the network must exist.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp network import-check
```

### <font color="#1d50a2">distance</font>

**\[Command]**
**distance** *ebpg\_distance  ibgp\_distance  local\_distance*
**distance** *distance  A.B.C.D/M \[ip-prefix-name]*
**no distance** *ebpg\_distance  ibgp\_distance  local\_distance*
**no distance** *distance  A.B.C.D/M  \[ip-prefix-name]*

**\[Purpose]**
Modify the administrative distance for the route

**\[Parameter]**

| **Parameter**     | **Description**                                                                 |
| ----------------- | ------------------------------------------------------------------------------- |
| *ebpg\_distance*  | Modify the administrative distance of EBGP routes, the value range: 1-255       |
| *ibgp\_distance*  | Modify the administrative distance of IBGP routes, the value range is 1-255     |
| *local\_distance* | Change the administrative distance of the local route, the value range is 1-255 |
| *distance*        | Sets the administrative distance for a particular route                         |
| *A.B.C.D/M*       | IP-prefix                                                                       |
| *ip-prefix-name*  | The name of ip-prefix list                                                      |

**\[View]**
BGP configuration view

**\[Usage Scenario]**
If the system has a static route configured from the kernel, it has a distance of 0. In some cases, it might be useful to override the route. E.g.: Kernel has a statically configured default route, and you received another default route from the BGP and want to install it to be preferred over the static route. In such a case, user can set a higher distance from the kernel.
By default, the administrative distance for EBGP routes is 200, the administrative distance for IBGP routes is 20, and the administrative distance for local routes is 1.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# distance 20 0.0.0.0/0
```

### <font color="#1d50a2">redistribute</font>

**\[Command]**
**redistribute** \[**babel|connected|eigrp|isis|kernel|openfabric|ospf|ospf6|rip|ripng|sharp|static|table|vnc|vnc-direct**] \[**metric** *metric\_id* ] \[**route-map** *String* **]**
**no redistribute** \[**babel|connected|eigrp|isis|kernel|openfabric|ospf|ospf6|rip|ripng|sharp|static|table|vnc|vnc-direct**] \[**metric** *metric\_id* ] \[**route-map** *String* **]**

**\[Purpose]**
Redistribute routes from other protocols into BGP

**\[Parameter]**

| **Parameter**          | **Description**          |
| ---------------------- | ------------------------ |
| *metric\_id*           | Set the metric for route |
| **route-map** *String* | Apply a route-map        |

**\[View]**
Address-family view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# redistribute ospf metric 200
```

### <font color="#1d50a2">bgp listen range</font>

**\[Command]**
**bgp listen range \{** *A.B.C.D/M* **|** *X\:X\::X*:&#x58;*/M* **} peer-group** *name*
**no bgp listen range \{** *A.B.C.D/M* **|** *X\:X\::X*:&#x58;*/M* **} peer-group** *name*

**\[Purpose]**
Allow establishing BGP neighbor relationships with all IP addresses within the specified address range

**\[Parameter]**

| **Parameter**                   | **Description** |
| ------------------------------- | --------------- |
| *A.B.C.D/M X\:X\::X*:&#x58;*/M* | IP range        |
| *name*                          | Peer group name |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic(config)# router bgp 65100
sonic(config-router)# neighbor TEST peer-group
sonic(config-router)# neighbor TEST remote-as external
sonic(config-router)# bgp listen range 10.111.1.0/24 peer-group TEST
```

### <font color="#1d50a2">bgp listen limit</font>

**\[Command]**
**bgp listen limit** *neighor\_number*
**no bgp listen limit** *neighor\_number*

**\[Purpose]**
Define the maximum number of peers accepted for one BGP instance

**\[Parameter]**

| **Parameter**      | **Description**                                          |
| ------------------ | -------------------------------------------------------- |
| *neighbor\_number* | Configure Dynamic Neighbors listen limit value (1..5000) |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp listen limit 20
```

### <font color="#1d50a2">bgp default ipv4-unicast</font>

**\[Command]**
**bgp default ipv4-unicast**
**no bgp default ipv4-unicast**

**\[Purpose]**
IPv4 unicast address families for all neighbors are enabled by default

**\[View]**
BGP configuration view

**\[Notes]**
By default, all neighbors do not enable the IPv4 unicast address family and require manual configuration to set their state to Active. After configuring the **bgp default ipv4-unicast** command, the created BGP peer automatically enables the IPv4 unicast address family by default.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp default ipv4-unicast
```

### <font color="#1d50a2">bgp default local-preference</font>

**\[Command]**
**bgp default local-preference** *value*
**no bgp default local-preference** *value*

**\[Purpose]**
configuring the default local preference for BGP

**\[View]**
BGP configuration view

**\[Notes]**
By default, the default local priority is 100.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp default local-preference 100
```

### <font color="#1d50a2">bgp default shutdown</font>

**\[Command]**
**bgp default shutdown**
**no bgp default shutdown**

**\[Purpose]**
Set the default state of the newly configured peer to shutdown

**\[View]**
BGP configuration view

**\[Notes]**
After configuring this command, all newly added BGP peers will require manual configuration of the **no shutdown** command to be used properly.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp default shutdown
```

### <font color="#1d50a2">bgp fast-external-failover</font>

**\[Command]**
**bgp route-reflector allow-outbound-policy**
**no bgp route-reflector allow-outbound-policy**

**\[Purpose]**
Enable BGP to immediately close the EBGP peer when there is link instability.

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# bgp fast-external-failover
```

### <font color="#1d50a2">aggregate-address</font>

**\[Command]**
**aggregate-address** *ip-address* **\{** *mask-length* **|** *mask* } \[**as-set|summary-only|route-map** *String* **|origin\{incomplete|igp|egp}]**
**no aggregate-address** *ip-address* **\{** *mask-length* **|** *mask* } \[**as-set|summary-only|route-map** *String* **|origin\{incomplete|igp|egp}]**

**\[Purpose]**
This command specifies an aggregate address

**\[Parameter]**

| **Parameter**                     | **Description**                                                                           |
| --------------------------------- | ----------------------------------------------------------------------------------------- |
| *ip-address*                      | Specifies an IP address of the summarized route. Theaddress is in dotted decimal notation |
| *mask*                            | IP address mask, the address is in dotted decimal natation                                |
| *mask-length*                     | Length of the IP address mask                                                             |
| **as-set**                        | Include AS-set in the generated routes                                                    |
| **summary-only**                  | Announce only the aggregated route                                                        |
| **route-map** *String*            | Apply a route-map for an aggregated prefix                                                |
| **origin\{incomplete\|igp\|egp}** | Specify ORIGIN for an aggregated prefix                                                   |

**\[View]**
IP Address-family View

**\[Usage Scenario]**
This command can be used to aggregate and advertise routes from the local routing table. To ensure that the aggregated routes have loop prevention, you can use the "as-set" keyword to create an aggregate route that inherits the Origin, AS\_Path, Community, and large-community attributes from the specific routes. By configuring "summary-only," you can suppress all the detailed routes included in the aggregate route, only announcing the aggregate route. This helps reduce the routing load on BGP peers.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# address-family ipv6 unicast
sonic(config-router-af)# aggregate-address 100::1/64
```

### <font color="#1d50a2">network</font>

**\[Command]**
**network** *ip-address* **\{** *mask-length* **|** *mask* } \[ *route-map* *string* ]
**no network** \*ip-address **\{** *mask-length* **|** *mask* } \[ *route-map* *string* ]

**\[Purpose]**
This command adds the announcement network.

**\[Parameter]**

| **Parameter**      | **Description**                                            |
| ------------------ | ---------------------------------------------------------- |
| *A.B.C.D*          | IP address, the address is in dotted decimal natation      |
| *mask*             | IP address mask, the address is in dotted decimal natation |
| *mask-length*      | Length of the IP address mask                              |
| *route-map string* | Apply a route-map for an aggregated prefix                 |

**\[View]**
IP address-family view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">neighbor graceful-restart</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} \{graceful-restart|graceful-restart-disable|graceful-restart-helper}**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} \{graceful-restart|graceful-restart-disable|graceful-restart-helper}**

**\[Purpose]**
This command will enable BGP graceful restart functionality.

**\[Parameter]**

| **Parameter**                 | **Description**                                 |
| ----------------------------- | ----------------------------------------------- |
| *A.B.C.D*                     | Neighbor address                                |
| *X\:X\::X*:X                  | Neighbor IPv6 address                           |
| *String*                      | Peer-group name                                 |
| **gracefule-restart**         | Graceful Restart command for a neighbor         |
| **gracefule-restart-disable** | Graceful Restart Disable command for a neighbor |
| **gracefule-restart-helper**  | Graceful Restart Helper command for a neighbor  |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 graceful-restart
```

### <font color="#1d50a2">neighbor advertisement-interval</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} advertisement-interval** *internal*
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} advertisement-interval** *internal*

**\[Purpose]**
Configure the time interval for a peer to send route prefix update messages

**\[Parameter]**

| **Parameter** | **Description**                                |
| ------------- | ---------------------------------------------- |
| *A.B.C.D*     | Neighbor address                               |
| *X\:X\::X*:X  | Neighbor IPv6 address                          |
| *String*      | Peer-group name                                |
| *internal*    | The range of value: 0-600, default value is: 0 |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 advertisement-interval 2
```

### <font color="#1d50a2">neighbor bfd</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} bfd \[date-plane]**

**\[Purpose]**
Enable BFD functionality for a specific peer

**\[Parameter]**

| **Parameter**  | **Description**                                                          |
| -------------- | ------------------------------------------------------------------------ |
| **date-plane** | Specify that locally generated BFD packets are processed by the hardware |

**\[View]**
BGP configuration view

**\[Usage Scenario]**
By default, when BFD functionality is enabled, both the reception and transmission of BFD packets on the device are processed by the CPU. If the device is running multiple network protocols and the CPU is relatively busy, it may lead to inaccurate BFD detection results due to CPU processing delays.
Enabling this feature ensures that BFD packets generated locally by the device are processed by the hardware, reducing the performance load on the CPU

**\[Use Cases]**

```plaintext
sonic(config) router bgp 65100
sonic(config-router)# neighbor 44.1.3.1 remote-as external
sonic(config-router)# neighbor 44.1.3.1 bfd data-plane
```

### <font color="#1d50a2">neighbor capability extended-nexthop</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} capability extended-nexthop**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} capability extended-nexthop**

**\[Purpose]**
Allow BGP to negotiate extended next-hop capability with its peers

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | Peer-group name       |

**\[View]**
BGP configuration view

**\[Notes]**
Allow bgp to negotiate the extended-nexthop capability with it’s peer. If user is peering over a IPv6 LL address then this capability is turned on automatically.
If user is peering over a IPv6 Global Address then turning on this command will allow BGP to install IPv4 routes with IPv6 nexthops if you do not have IPv4 configured on interfaces.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 capability extended-nexthop
```

### <font color="#1d50a2">neighbor capability dynamic</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **}  capability dynamic**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **}  capability dynamic**

**\[Purpose]**
Allow bgp to negotiate the extended-nexthop capability with it’s peer.

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | Peer-group name       |

**\[View]**
BGP configuration view

**\[Notes]**
Dynamic Capability defines a new BGP message (CAPABILITY) that can be used to set/unset BGP capabilities without bringing down a BGP session.
This includes changing graceful-restart (LLGR also) timers, enabling/disabling add-path, and other supported capabilities.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 capability dynamic
```

### <font color="#1d50a2">neighbor description</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} description** *String*&#x20;
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} description** *String*

**\[Purpose]**
Set description of the peer.

**\[Parameter]**

| **Parameter** | **Description**          |
| ------------- | ------------------------ |
| *A.B.C.D*     | Neighbor address         |
| *X\:X\::X*:X  | Neighbor IPv6 address    |
| *String*      | Peer-group name          |
| *String*      | Describing this neighbor |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 description test
```

### <font color="#1d50a2">neighbor disable-connected-check</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} disable-connected-check**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} disable-connected-check**

**\[Purpose]**
Allow peerings between directly connected EBGP peers using loopback addresses.

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | Peer-group name       |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 disable-connected-check
```

### <font color="#1d50a2">neighbor ebgp-multihop</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} ebgp-multihop** *count*
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} ebgp- multihop** *count*

**\[Purpose]**
Specifying ebgp-multihop allows sessions with eBGP neighbors to establish when they are multiple hops away

**\[Parameter]**

| **Parameter** | **Description**            |
| ------------- | -------------------------- |
| *A.B.C.D*     | Neighbor address           |
| *X\:X\::X*:X  | Neighbor IPv6 address      |
| *String*      | Peer-group name            |
| *count*       | Maximum hop count (1..255) |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 ebgp-multihop 2
```

### <font color="#1d50a2">neighbor interface</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} interface** *interface\_name*
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} interface** *interface\_name*

**\[Purpose]**
When you connect to a BGP peer over an IPv6 link-local address, you have to specify the IFNAME of the interface used for the connection.

**\[Parameter]**

| **Parameter**     | **Description**                |
| ----------------- | ------------------------------ |
| *A.B.C.D*         | Neighbor address               |
| *X\:X\::X*:X      | Neighbor IPv6 address          |
| *String*          | Interface name or neighbor tag |
| *interface\_name* | Interface name                 |

**\[View]**
BGP configuration view

**\[Usage Scenario]**
When you connect to a BGP peer over an IPv6 link-local address, you have to specify the IFNAME of the interface used for the connection. To specify IPv4 session addresses, see the **neighbor PEER update-source** command below

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 interface Ethernet49
```

### <font color="#1d50a2">neighbor local-as</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} local-as** *ASN* **\[no-prepend] \[replace-as]**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} local-as** *ASN* **\[no-prepend] \[replace-as]**

**\[Purpose]**
Specify an alternate AS for this BGP process when interacting with the specified peer

**\[Parameter]**

| **Parameter** | **Description**                |
| ------------- | ------------------------------ |
| *A.B.C.D*     | Neighbor address               |
| *X\:X\::X*:X  | Neighbor IPv6 address          |
| *String*      | Interface name or neighbor tag |
| *ASN*         | AS number                      |

**\[View]**
BGP configuration view

**\[Usage Scenario]**
Specify an alternate AS for this BGP process when interacting with the specified peer. With no modifiers, the specified local-as is prepended to the received AS\_PATH when receiving routing updates from the peer, and prepended to the outgoing AS\_PATH (after the process local AS) when transmitting local routes to the peer.
If the no-prepend attribute is specified, then the supplied local-as is not prepended to the received AS\_PATH.
If the replace-as attribute is specified, then only the supplied local-as is prepended to the AS\_PATH when transmitting local-route updates to this peer.

**\[Notes]**
Note that replace-as can only be specified if no-prepend is.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 local-as 123 no-prepend replace-as
```

### <font color="#1d50a2">neighbor  password</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} password** *PASSWORD*
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} password** *PASSOWRD*

**\[Purpose]**
Set a MD5 password to be used with the tcp socket that is being used to connect to the remote peer

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | IPeer-group name      |
| *PASSWORD*    | The password          |

**\[View]**
BGP configuration view

**\[Usage Scenario]**
To enhance the security of BGP connections, MD5 authentication can be used during the establishment of TCP connections. When the passwords at both ends of the BGP neighbors do not match, the BGP neighbor establishment will fail.

**\[Notes]**
It is important to note that the key will be displayed in ciphertext, meaning that the password will not be visible in plain text.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 password test1234
```

### <font color="#1d50a2">neighbor port</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} port** *PORT*
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} port** *PORT*

**\[Purpose]**
Specify the L4-port to use for the BGP session to this neighbor

**\[Parameter]**

| **Parameter** | **Description**            |
| ------------- | -------------------------- |
| *A.B.C.D*     | Neighbor address           |
| *X\:X\::X*:X  | Neighbor IPv6 address      |
| *String*      | Peer-group name            |
| *PORT*        | TCP port number (0..65535) |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 port 234
```

### <font color="#1d50a2">neighbor remote-as</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} remote-as \[** *ASN* **|internal|external]**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} remote-as \[** *ASN* **|internal|external]**

**\[Purpose]**
Create a new neighbor whose remote-as is ASN

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | Peer-group name       |
| *ASN*         | AS number             |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 remote-as 65101
sonic(config-router)# neighbor 1.1.1.1 remote-as external
```

### <font color="#1d50a2">neighbor peer-group</font>

**\[Command]**
**neighbor** *peer-group-name* **peer-group**
**no neighbor** *peer-group-name* **peer-group**

**\[Purpose]**
Create a peer group

**\[View]**
BGP configuration view

**\[Usage Scenario]**
In large-scale BGP networks, the number of peers can be substantial, and many of these peers share similar policies. Configuring these peers can be repetitive, but using peer groups can simplify the configuration process. When a user wants to apply the same configuration to several peers, they can create a peer group, configure it accordingly, and then add the peers to that group. This way, all peers within the group inherit the group's configuration.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor PEER_V4_EBGP peer-group
```

### <font color="#1d50a2">neighbor peer-group</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} peer-group** *NAME*&#x20;
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} peer-group** *NAME*&#x20;

**\[Purpose]**
This command bind specific peer to peer group

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *NAME*        | peer-group name       |

**\[View]**
BGP configuration view

**\[Usage Scenario]**
A peer group is a collection of peers with similar policies or attributes. When a peer joins a peer group, the configuration settings for that peer group apply to all members within the group.
In situations where there are a significant number of peers with identical configurations in the network, configuring peer groups can streamline the setup process.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 peer-group PEER_V4_EBGP
```

### <font color="#1d50a2">neighbor update-source</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} update-source \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **}**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} update-source \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **}**

**\[Purpose]**
Specify the IPv4 source address to use for the BGP session to this neighbor

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | Peer-group name       |

**\[View]**
BGP configuration view

**\[Usage Scenario]**
Specify the IPv4 source address to use for the BGP session to this neighbor, may be specified as either an IPv4 address directly or as an interface name.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 update-source Ethernet49
```

### <font color="#1d50a2">neighbor activate</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} activate**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} activate**

**\[Purpose]**
Enable a specific BGP peer

**\[Parameter]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| *A.B.C.D*     | IPv4 address    |
| *X\:X\::X*:X  | IPv6 address    |

**\[View]**
IP Address-family view

**\[Notes]**
By default, only the IPv4 unicast address family is announced to all neighbors. Using the **no bgp default ipv4-unicast** configuration overrides this default so that all address families need to be enabled explicitly

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">neighbor allowas-in</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* } **allowas-in** \[ *number* **|origin]**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* } **allowas-in** \[ *number* **|origin]**

**\[Purpose]**
This command accepts incoming routes with AS paths that have the same value as the current system's AS

**\[Parameter]**

| **Parameter** | **Description**                            |
| ------------- | ------------------------------------------ |
| *A.B.C.D*     | Neighbor address                           |
| *X\:X\::X*:X  | Neighbor IPv6 address                      |
| *String*      | Interface name or neighbor tag             |
| *number*      | Number of occurrences of AS number (1..10) |

**\[View]**
IP address-family view

**\[Usage Scenario]**
Normally, BGP determines the presence of loops by checking for the presence of the same AS number in the AS\_PATH attribute. This command allows you to configure the maximum number of times the local AS number is allowed to repeat, meeting the requirements of special scenarios。

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">neighbor as-override</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} as-override**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} as-override**

**\[Purpose]**
Override AS number of the originating router with the local AS number

**\[Parameter]**

| **Parameter** | **Description**                |
| ------------- | ------------------------------ |
| *A.B.C.D*     | Neighbor address               |
| *X\:X\::X*:X  | Neighbor IPv6 address          |
| *String*      | Interface name or neighbor tag |

**\[View]**
IP address-family view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# neighbor 1.1.1.1 as-override
```

### <font color="#1d50a2">neighbor attribute-unchanged</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* }**attribute-unchanged** \[\{**as-path**|**next-hop**|**med**}]****&#xA;**&#xD;no neighbor** \{ *A.B.C.D **|** X\:X\::X*:X ***|** String* } **attribute-unchanged** \[\{**as-path**|**next-hop|med**}]

**\[Purpose]**
Preserve the next hop when advertising routes to a specified EBGP peer

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | Peer group name       |

**\[View]**
IP address-family view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# neighbor 1.1.1.1 attribute-unchanged as-path
```

### <font color="#1d50a2">neighbor default-originate</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X | *String* } **default-originate** \[**route-map** *WORD* **]**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X | *String* } **default-originate** \[**route- map** *WORD* **]**

**\[Purpose]**
Advertise a default route to a specified peer

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | Peer-group name       |
| *WORD*        | Route-map name        |

**\[View]**
IP address-family view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">neighbor next-hop-self</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} next-hop-self \[force]**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} next-hop-self \[force]**

**\[Purpose]**
When announcing routes to IBGP peers or peer groups, set the next hop attribute to the local IP address

**\[Parameter]**

| **Parameter** | **Description**                                                                                       |
| ------------- | ----------------------------------------------------------------------------------------------------- |
| *A.B.C.D*     | Neighbor address                                                                                      |
| *X\:X\::X*:X  | Neighbor IPv6 address                                                                                 |
| *String*      | Interface name or neighbor tag                                                                        |
| *Force*       | If the optional keyword force is specified, the modification is done also for routes learned via IBGP |

**\[View]**
IP address-family view

**\[Usage Scenario]**
By default, when a device learns routes from its EBGP neighbors and forwards them to its IBGP neighbors, it does not modify the next-hop IP address of the routes. As a result, the next hop of the route remains the Neighbor address of the EBGP neighbor. When IBGP neighbors receive these routes, they become unusable because the next hop is unreachable. To avoid this situation, you can resolve it by configuring the "next-hop-self" command.

**\[Use Cases]**

```plaintext
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 force
```

### <font color="#1d50a2">neighbor prefix-list</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} prefix-list** *NAME* **\[in|out]**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} prefix-list** *NAME* **\[in|out]**

**\[Purpose]**
Apply a prefix-list on the neighbor

**\[Parameter]**

| **Parameter** | **Description**                |
| ------------- | ------------------------------ |
| *A.B.C.D*     | Neighbor address               |
| *X\:X\::X*:X  | Neighbor IPv6 address          |
| *String*      | Interface name or neighbor tag |
| *NAME*        | prefix-list name               |

**\[View]**
IP address-family view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">neighbor route-reflector-client</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} route-reflector-client**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} route-reflector-client**

**\[Purpose]**
Configure the current device as a route reflector when establishing a BGP connection with the specified neighbor

**\[View]**
IP address-family view

**\[Usage Scenario]**
To ensure connectivity between IBGP peers, it's necessary to establish full mesh connections between IBGP peers. However, when there are many IBGP peers, this consumes significant network and CPU resources. Utilizing route reflectors can address this issue by allowing BGP routers to establish connections only with a few route reflectors instead of all other routers.

**\[Use Cases]**

```plaintext
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-reflector-client
```

### <font color="#1d50a2">neighbor route-map</font>

**\[Command]**
**neighbor \{** *A.B.C.D*|*X\:X\::X*:X | *String* **} route-map** *NAME* **\[in|out]**
**no neighbor \{** *A.B.C.D* | *X\:X\::X*:X | *String* **} route-map** *NAME* **\[in|out]**

**\[Purpose]**
Apply a route-map on the neighbor

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *A.B.C.D*     | Neighbor address      |
| *X\:X\::X*:X  | Neighbor IPv6 address |
| *String*      | Peer-group name       |
| *NAME*        | route-map name        |

**\[View]**
IP address-family view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">neighbor send-community</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} send-community \[both|all|extended|standard|large]**
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} send- community \[both|all|extended|standard|large]**

**\[Purpose]**
Set the route’community for the neighbor.

**\[Parameter]**

| **Parameter** | **Description**                                             |
| ------------- | ----------------------------------------------------------- |
| *A.B.C.D*     | Neighbor address                                            |
| *X\:X\::X*:X  | Neighbor IPv6 address                                       |
| *String*      | Peer-group name                                             |
| *both*        | Send both standard and extended community attributes        |
| *all*         | Send both standard, extended and large community attributes |
| *extended*    | Send extended community attributes                          |
| *standard*    | Send standard community attributes                          |
| *large*       | Send large community attributes                             |

**\[View]**
IP address-family view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# neighbor 1.1.1.1 send-community extended
```

### <font color="#1d50a2">neighbor shutdown</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* } **shutdown** \[\[**message** *MSG* ] |\[**rtt** *rtt* \[**count** *count* ]]]
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* } **shutdown** \[\[**message** *MSG* ] ||\[**rtt** *rtt* \[**count** *count* ]]]

**\[Purpose]**
Shutdown the peer.

**\[Parameter]**

| **Parameter** | **Description**                                  |
| ------------- | ------------------------------------------------ |
| *A.B.C.D*     | Neighbor address                                 |
| *X\:X\::X*:X  | Neighbor IPv6 address                            |
| *String*      | Interface name or neighbor tag                   |
| *MSG*         | Shutdown message                                 |
| *rtt*         | Round-trip-time in milliseconds (1..65535)       |
| *count*       | Specify the number of keepalives before shutdown |

**\[View]**
BGP configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 1.1.1.1 shutdown message testing
```

### <font color="#1d50a2">neighbor weight</font>

**\[Command]**
**neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} weight** *WEIGHT*
**no neighbor \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *String* **} weight** *WEIGHT*

**\[Purpose]**
This command specifies a default weight value for the neighbor’s routes.

**\[Parameter]**

| **Parameter** | **Description**                |
| ------------- | ------------------------------ |
| *A.B.C.D*     | Neighbor address               |
| *X\:X\::X*:X  | Neighbor IPv6 address          |
| *String*      | Interface name or neighbor tag |
| *WEIGHT*      | Weight (0..65535)              |

**\[View]**
IP address-family view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# neighbor 1.1.1.1 weight 2
```

###

