BGP
Border Gateway Protocol (BGP) is an inter-domain routing protocol designed to provide loop-free routing links between organizations. BGP is designed to run over a reliable transport protocol using Port 179. BGP is used to connect a local network to an external network in order to access the Internet or to connect to other organizations.
EBGP
External Border Gateway Protocol (EBGP) runs between two BGP routers in different autonomous systems. EBGP routes received from an EBGP peer can be advertised to EBGP and IBGP peers. EBGP is used between organizations or between an organization and its Internet Service provider. When connecting to an external organization, external BGP peering sessions are created. In EBGP peers, attributes like local preference are not sent. When the route is advertised to an EBGP peer, the next hop is changed to a local router.
IBGP
Internal Border Gateway Protocol (IBGP) runs between two BGP routers in the same autonomous system. IBGP routes received from an IBGP peer cannot be advertised to another IBGP peer but can be advertised to an EBGP peer. IBGP is used within the same organization. BGP peers within the same organization exchange routing information through internal BGP peering sessions. In IBGP peers, attributes like local preference are sent. When the route is advertised to an IBGP peer, the next hop remains unchanged.
Router ID
BGP uses router ID to identify BGP-speaking peers. The BGP router ID is represented by an IPv4 address. The BGP router ID must be unique to the BGP peers in a network.
Speaker and Peer
A peer device is a BGP-speaking router that has an active TCP connection to another BGP-speaking device. BGP devices do not necessarily need to be directly connected. A BGP speaker is the local router and a peer is any other BGP-speaking network device.
When a TCP connection is established between peers, each BGP peer initially exchanges all its routes; the complete BGP routing table with the other peer. After this, only incremental updates are sent after a change in network topology or routing policy. Peers exchange special messages called keep alive messages.
Autonomous System (AS)
An autonomous system is a network controlled by a single technical administration entity. In BGP, autonomous systems are used in individual routing domains with local routing policies. Each routing domain can support multiple routing protocols. However, each routing protocol is administered separately. Other routing protocols can dynamically exchange routing information with BGP through redistribution.
Attributes
BGP has a number of complex attributes used to determine a path to a remote network. These attributes allow greater flexibility and enable a complex routing decision to ensure that the path to a remote network is the best possible path. BGP always propagates the best path to any peers. BGP attributes are carried in update packets.
Local Preference Attribute
If there are multiple exit points from the AS, the local preference attribute is used to select the exit point for a specific route. A higher local preference is always preferred.
Next-Hop Attribute
The EBGP next-hop attribute is the IP address that is used to reach the advertising router. For EBGP peers, the next-hop address is the IP address of the connection between the peers. For IBGP, the EBGP next-hop address is carried into the local AS.
Filters
A number of different filter methods control the sending and receiving of BGP updates. BGP updates can be filtered with route information as a basis, or with communities as a basis. Packets that do not match the configured filters are dropped.
Synchronization
When a BGP router receives information about a network from an IBGP neighbor, it does not use that information until a matching route is learned via an IGP or static route. This is called synchronization. It also does not advertise that route to an EBGP neighbor unless a matching route is in the routing table. It is recommended to turn off synchronization when all routers in the autonomous system use BGP.
BGP Path Selection
When a BGP speaker receives updates from multiple autonomous systems that describe different paths to the same destination, the speaker must choose the single best path for reaching that destination. When chosen, the selected path is entered into the BGP routing table and propagated to its neighbors. The decision is based on the value of attributes that the update contains and other BGP-configurable factors.
-
If the next hop address is reachable, consider it.
-
Prefer the largest local preference attribute.
-
If the local preference is the same, prefer the route this local router originated.
-
Prefer the route with the shortest AS path.
-
If this is equal, prefer the route with the origin set to originated (through BGP); IGP is preferred to EGP, followed by incomplete.
-
If the origin codes are the same, prefer the route with the lowest MED.
-
If the MED is the same, prefer EBGP over IBGP.
-
Prefer the closest path.
-
Finally, if all paths are equal, prefer the path with lowest BGP router ID.
Timers
BGP implementation maintains different timers for Peers and Route updates.
-
The keep alive interval is the time within which keep alive messages are sent to peers.
-
The hold time is the interval following which a peer is declared inactive after not receiving a keep alive message from it.
-
The route advertisement interval is the interval between sending BGP routing updates.
-
The Connection Retry timer is the amount of time to wait before reopening a TCP connection.
-
The AS Originate Interval is the interval between two subsequent update messages for internal peers.
BGP Route Reflector
To avoid loops, an IBGP router doesn’t advertise the prefix it learned from one IBGP neighbor to another IBGP neighbor. Therefore, all the IBGP neighbors must be fully meshed with each other to learn the complete network. However, this is not practical in a large IBGP network. If there are X number of IBGP routers, then there will be X * [X-1]/2 IBGP sessions that must be established, which would be a huge administrative overhead. In this case, route reflectors are used.
Route reflectors are a way to avoid full meshing between IBGP neighbors, but still get the benefits of a full mesh. In the route reflector method, a IBGP router is selected to act as a route reflector. Other IBGP routers in the network act as route reflector clients. When a route reflector learns a prefix from one of its IBGP neighbors, the route reflector advertises the prefix to all its route reflector clients. For redundancy purposes, more than one router can be configured to act as a route reflector.
A route reflector must adhere to the rules below in advertising the routes while advertising the prefixes.
-
A route reflector can re-advertise the prefixes it learned from non-RR IBGP neighbors, RR IBGP neighbors, and EBGP neighbors to its RR client.
-
A route reflector should not re-advertise the prefixes it learned from a non-RR IBGP neighbor to other non-RR IBGP neighbors.
-
A route reflector can re-advertise the prefixes it learned from RR IBGP neighbors to its non-RR IBGP neighbors.
BGP Configuration
This section explains basic BGP configuration commands. For details on FRRouting, an IP routing suite which implements BGP protocols, refer to FRRouting documentation at https://frrouting.org/.
BGP Default Configuration
|
Parameter |
Default Value |
|---|---|
|
BGP Status |
Active |
|
Synchronization |
Disabled |
|
Preference |
None |
|
Peer |
None |
|
Connection retry time |
120 seconds |
|
Hold time |
180 seconds |
|
Keep alive |
60 seconds |
|
Route Advertisement Interval |
30 seconds |
|
EBGP Multihop |
Disable |
|
AS Number |
65100 |
|
Router ID |
None |
Save the BGP Configuration
This section explains the steps to save the BGP configuration. The BGP routing is handled via FRR module and the configuration must be saved in two steps.
-
Edit the /etc/config_db.json and in the DEVICE_METADATA section, delete the bgp_asn line and add the docker_routing_config_mode line as shown below. This step is needed only once.
"DEVICE_METADATA": {
"localhost": {
"buffer_model": "traditional",
"default_bgp_status": "up",
"default_pfcwd_status": "disable",
"hostname": "sonic",
"hwsku": "sse_g3748",
"mac": "0C:C4:7A:2E:1D:6D",
"platform": "arm64-supermicro_sse_g3748-r0",
"bgp_asn": "65100","docker_routing_config_mode": "split",
"type": "not-provisioned"
}
},
-
Reboot the switch for the above change to take effect.
-
The vtysh command invokes FRRouting mode. After configuring the BGP, the configuration must be saved in FRRouting mode and again in SONiC mode.
Example Config:
admin@sonic:~$ sudo -i
root@sonic:~# vtysh
Hello, this is FRRouting (version 7.5.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# no bgp ebgp-requires-policy
sonic(config-router)# neighbor 10.0.0.2 remote-as 65100
sonic(config-router)# end
sonic# write
sonic# exit
root@sonic:~# config save -y
Note: If the command no bgp ebgp-requires-policy is not used, then the routes may be exchanged with a BGP peer without proper policies.
Enable BGP
BGP is disabled by default. Follow the steps below to enable BGP.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure terminal |
Enter configuration mode. |
|
3 |
router bgp <AS no (1-65535)> |
Enable BGP and configure the AS number of the BGP Speaker. |
|
4 |
End |
Exit configuration mode. |
Note: The no router bgp command disables BGP in the switch.
BGP Peer
Follow the steps below to configure BGP Peer.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure terminal |
Enter configuration mode. |
|
3 |
router bgp <AS no (1-65535)> |
Enable BGP and configure the AS number of the BGP Speaker. |
|
4 |
bgp router-id <bgp router id (ip-address)> |
Configure the BGP Identifier of the BGP Speaker. |
|
5 |
neighbor <ip-address> remote-as <AS no (1-65535)> |
Create a peer and initiate the connection to the peer. |
|
6 |
neighbor <ip-address> {advertisement-interval <0-600 seconds>} |
Optional: Configure the neighbor interval. |
|
7 |
neighbor <ip-address> timers {keepalive <seconds> | holdtime <seconds>} |
Optional: Configure the neighbor KeepAlive Time and Hold Time intervals. |
|
8 |
Exit |
Exit BGP Router mode. |
|
9 |
End |
Exit configuration mode. |
To delete the configured values, use the no form of the respective commands:
-
no neighbor <ip-address>
-
no neighbor <ip-address> {advertisement-interval}
-
no neighbor <ip-address> timers {keepalive | holdtime}
Attributes
Follow the steps below to configure BGP Attributes.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure terminal |
Enter configuration mode. |
|
3 |
router bgp <AS no (1-4294967295)> |
Enable BGP and configure the AS number of the BGP Speaker. |
|
4 |
bgp router-id <bgp router id (ip-address)> |
Configure the BGP Identifier of the BGP Speaker. |
|
5 |
neighbor <ip-address> remote-as <AS no (1-4294967295)> |
Create a Peer and initiate the optional connection to the peer. |
|
6 |
bgp default local-preference <local Pref Value 0-4294967295> |
Optional: Configure the Default Local Preference value. |
|
7 |
neighbor <ip-address> ebgp-multihop |
Optional: Enable BGP to establish a connection with external peers that are not directly connected. |
|
8 |
Exit |
Exit BGP Router mode. |
|
9 |
End |
Exit configuration mode. |
To delete the configured values, use the no form of the respective commands:
-
no bgp default local-preference
-
no neighbor <ip-address> ebgp-multihop
Network
Follow the steps below to configure the network through BGP.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure terminal |
Enter configuration mode. |
|
3 |
router bgp <AS no (1-65535)> |
Enable BGP and configure the AS number of the BGP Speaker. |
|
4 |
no bgp ebgp-requires-policy |
Disable the Require policy on EBGP. |
|
5 |
address-family ipv4 unicast |
Declare the neighbors with whom normal "IPv4 unicast" routes must be exchanged. |
|
6 |
network <A.B.C.D> <A.B.C.D/M> |
Configure the network.
|
|
7 |
exit-address-family |
Exit address-family mode. |
|
8 |
Exit |
Exit BGP Router mode. |
|
9 |
End |
Exit configuration mode. |
-
The command no network <A.B.C.D> <A.B.C.D/M> removes the configured network.
-
If the command no bgp ebgp-requires-policy is not used, then the routes may be exchanged with BGP peer without proper policies.
Redistribute Connected
Follow the steps below to redistribute connect through BGP.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure terminal |
Enter configuration mode. |
|
3 |
router bgp <AS no (1-65535)> |
Enable BGP and configure the AS number of the BGP Speaker. |
|
4 |
no bgp ebgp-requires-policy |
Disable the Require policy on EBGP. |
|
5 |
address-family ipv4 unicast |
Declare the neighbors with whom normal "IPv4 unicast" routes must be exchanged. |
|
6 |
redistribute connected |
Redistribute connected routes to internal and external BGP peers. |
|
7 |
exit-address-family |
Exit address-family mode. |
|
8 |
Exit |
Exit BGP Router mode. |
|
9 |
End |
Exit configuration mode. |
Note: The command no redistribute connected stops the routes connected to internal and external BGP peers.
Redistribute Static
Follow the steps below to redistribute connect through BGP.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure terminal |
Enter configuration mode. |
|
3 |
router bgp <AS no (1-65535)> |
Enable BGP and configure the AS number of the BGP Speaker. |
|
4 |
no bgp ebgp-requires-policy |
Disable the Require policy on EBGP. |
|
5 |
address-family ipv4 unicast |
Declare the neighbors with whom normal "IPv4 unicast" routes must be exchanged. |
|
6 |
redistribute static |
Redistribute static routes to internal and external BGP peers. |
|
7 |
exit-address-family |
Exit address-family mode. |
|
8 |
Exit |
Exit BGP Router mode. |
|
9 |
End |
Exit configuration mode. |
Note: The command no redistribute static stops the static routes to internal and external BGP peers.
BGP Configuration Example
This section shows a sample BGP configuration.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure terminal |
Enter configuration mode. |
|
3 |
no route bgp < (1-4294967295) AS number> |
Remove the default router (65100). |
|
4 |
router bgp < (1-4294967295) AS number> |
Add a new router. |
|
5 |
bgp router-id <A.B.C.D> |
Manually configure the router identifier. Specify router-id as a valid IPv4 or IPv6 address. |
|
6 |
neighbor <A.B.C.D Neighbor address> remote-as < (1-4294967295) AS number> |
Manually configure the neighbor address and remote-as value. |
|
7 |
bgp default local-preference (0-4294967295) |
Configure the default local preference value. |
|
8 |
neighbor <A.B.C.D Neighbor address> ebgp-multihop (1-255) |
Configure the ebgp-multihop value. Specify ebgp-multihop as a maximum hop count. |
|
9 |
neighbor <A.B.C.D Neighbor address> timers (0-65535) connect |
Configure timers.
|
|
10 |
neighbor <A.B.C.D Neighbor address> advertisement-interval (0-600) |
Configure the advertisement interval.
|
|
11 |
End |
Exit configuration mode in FRRouting. |
|
12 |
show ip bgp neighbors |
Display the configured BGP neighbor. |
|
13 |
show ip bgp summary |
Display the configured BGP details. |
|
14 |
exit |
Exit FRRouting. |
|
15 |
sudo config save –y |
Optional: Save the current configuration to be part of the startup configuration. |
The following example shows commands used to configure and display BGP.
-
Switch A (SONiC) input:
admin@sonic: ~$ sudo vtysh
Hello, this is FRRouting (version 7.5.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# configure terminal
sonic(config)# no router bgp 65100
sonic(config)# router bgp 200
sonic(config-router) # bgp router-id 192.168.100.1
sonic(config-router) # no bgp ebgp-requires-policy
sonic(config-router) # neighbor 192.168.100.2 remote-as 300
sonic(config-router) # bgp default local-preference 50
sonic(config-router) # neighbor 192.168.100.2 ebgp-multihop
sonic(config-router) # neighbor 192.168.100.2 timers 10 10
sonic(config-router) # neighbor 192.168.100.2 advertisement-interval 5
sonic(config-router) # end
sonic# exit
admin@sonic: ~$
-
Switch B input:
admin@sonic: ~$ sudo vtysh
Hello, this is FRRouting (version 7.5.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# configure terminal
sonic(config)# no router bgp 65100
sonic(config)# router bgp 300
sonic(config-router) # bgp router-id 192.168.100.2
sonic(config-router) # no bgp ebgp-requires-policy
sonic(config-router) # neighbor 192.168.100.1 remote-as 200
sonic(config-router) # bgp default local-preference 50
sonic(config-router) # neighbor 192.168.100.1 ebgp-multihop
sonic(config-router) # neighbor 192.168.100.1 timers 10 10
sonic(config-router) # neighbor 192.168.100.1 advertisement-interval 5
sonic(config-router) # end
sonic# exit
admin@sonic: ~$
-
Switch A output:
admin@sonic: ~$ show ip bgp neighbors
BGP neighbor is 192.168.100.2, remote AS 300, local AS 200, external link
BGP version 4, remote router ID 192.168.100.2, local router ID 192.168.100.1
BGP state = Established, up for 00:02:51
Last read 00:00:05, Last write 00:00:21
Hold time is 10, keepalive interval is 3 seconds
Configured hold time is 10, keepalive interval is 3 seconds
Neighbor capabilities:
4 Byte AS: advertised and received
AddPath:
IPv4 Unicast: RX advertised IPv4 Unicast
Route refresh: advertised and received(new)
Address Family IPv4 Unicast: advertised and received
Hostname Capability: advertised (name: sonic, domain name: n/a) not received
Graceful Restart Capability: advertised and received
Remote Restart timer is 120 seconds
Address families by peer:
IPv4 Unicast(preserved)
Graceful restart information:
End-of-RIB send: IPv4 Unicast
End-of-RIB received: IPv4 Unicast
Local GR Mode: Helper*
Remote GR Mode: Restart
R bit: False
Timers:
Configured Restart Time(sec): 120
Received Restart Time(sec): 120
IPv4 Unicast:
F bit: True
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:
3
3
Notifications:
6
0
Updates
2
2
Keepalives:
7
17
Route Refresh:
1
0
Capability:
0
0
Total:
19
22
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
Update group 3, subgroup 2
Packet Queue length 0
Community attribute sent to this neighbor(all)
Inbound updates discarded due to missing policy
Outbound updates discarded due to missing policy
0 accepted prefixes
Connections established 2; dropped 1
Last reset 00:02:55, No AFI/SAFI activated for peer
Message received that caused BGP to send a NOTIFICATION:
FFFFFFFF
FFFFFFFF
FFFFFFFF
FFFFFFFF
00350104
012C005A
C0A86402
18021601
04000100
01020040
06005A00
01018041
04000001
2C
External BGP neighbor may be up to 255 hops away.
Local host: 192.168.100.1, Local port: 179
Foreign host: 192.168.100.2, Foreign port: 38373
Nexthop: 192.168.100.1
Nexthop global: fe80::ec4:7aff:fe2e:1635
Nexthop local: fe80::ec4:7aff:fe2e:1635
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 120
Estimated round trip time: 2 ms
Read thread: on Write thread: on FD used: 25
admin@sonic: ~$
admin@sonic: ~$ sudo vtysh
Hello, this is FRRouting (version 7.5.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# show bgp summary
IPv4 Unicast Summary:
BGP router identifier 192.168.100.1, local AS number 200 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 21 KiB of memory
Neighbor
V
AS
MsgRcvd
MsgSent
TblVer
InQ
OutQ
Up/Down
State/PfxRcd
PfxSnt
192.168.100.2
4
300
69
36
0
0
0
00:11:24
(Policy)
(Policy)
Total number of neighbors 1
sonic#
-
Switch B output:
admin@sonic: ~$ show ip bgp neighbors
BGP neighbor is 192.168.100.1, remote AS 200, local AS 300, external link
BGP version 4, remote router ID 192.168.100.1, local router ID 192.168.100.2
BGP state = Established, up for 00:03:51
Last read 00:00:05, Last write 00:00:21
Hold time is 10, keepalive interval is 3 seconds
Configured hold time is 10, keepalive interval is 3 seconds
Neighbor capabilities:
4 Byte AS: advertised and received
AddPath:
IPv4 Unicast: RX advertised IPv4 Unicast
Route refresh: advertised and received(new)
Address Family IPv4 Unicast: advertised and received
Hostname Capability: advertised (name: sonic, domain name: n/a) not received
Graceful Restart Capability: advertised and received
Remote Restart timer is 120 seconds
Address families by peer:
IPv4 Unicast(preserved)
Graceful restart information:
End-of-RIB send: IPv4 Unicast
End-of-RIB received: IPv4 Unicast
Local GR Mode: Helper*
Remote GR Mode: Restart
R bit: False
Timers:
Configured Restart Time(sec): 120
Received Restart Time(sec): 120
IPv4 Unicast:
F bit: True
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:
5
5
Notifications:
5
6
Updates
2
2
Keepalives:
17
15
Route Refresh:
1
0
Capability:
0
0
Total:
30
28
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
Update group 3, subgroup 2
Packet Queue length 0
Community attribute sent to this neighbor(all)
Inbound updates discarded due to missing policy
Outbound updates discarded due to missing policy
0 accepted prefixes
Connections established 2; dropped 1
Last reset 00:02:55, No AFI/SAFI activated for peer
Message received that caused BGP to send a NOTIFICATION:
FFFFFFFF
FFFFFFFF
FFFFFFFF
FFFFFFFF
00350104
012C005A
C0A86402
18021601
04000100
01020040
06005A00
01018041
04000001
2C
External BGP neighbor may be up to 255 hops away.
Local host: 192.168.100.2, Local port: 179
Foreign host: 192.168.100.1, Foreign port: 38373
Nexthop: 192.168.100.2
Nexthop global: fe80::ec4:7ade:fe2f:8675
Nexthop local: fe80::ec4:7ade:fe2f:8675
BGP connection: shared network
BGP Connect Retry Timer in Seconds: 120
Estimated round trip time: 2 ms
Read thread: on Write thread: on FD used: 25
admin@sonic: ~$
admin@sonic: ~$ sudo vtysh
Hello, this is FRRouting (version 7.5.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# show bgp summary
IPv4 Unicast Summary:
BGP router identifier 192.168.100.3, local AS number 300 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 21 KiB of memory
Neighbor
V
AS
MsgRcvd
MsgSent
TblVer
InQ
OutQ
Up/Down
State/PfxRcd
PfxSnt
192.168.100.1
4
200
36
69
0
0
0
00:15:24
(Policy)
(Policy)
Total number of neighbors 1
sonic#
Route Reflector Configuration
This section shows a sample BGP configuration for route reflector.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure |
Enter configuration mode. |
|
3 |
router bgp < (1-4294967295) AS number> |
Add a new router. |
|
4 |
neighbor <A.B.C.D Neighbor address> remote-as < (1-4294967295) AS number> |
Configure neighbor address and remote-as. |
|
5 |
neighbor <A.B.C.D Neighbor address> route-reflector-client |
Configure a neighbor as route-reflector-client. |
|
6 |
End |
Exit configuration mode in FRRouting. |
|
7 |
write |
Optional: Save this configuration to be part of bgpd.conf. |
|
8 |
exit |
Exit FRRouting. |
|
9 |
sudo config save –y |
Optional: Save the current configuration to be part of the startup configuration. |
The following example shows the commands used to configure route-reflector-client.
|
admin@sonic:~$ sudo -i |
|
root@sonic:~# vtysh |
|
Hello, this is FRRouting (version 7.5.1-sonic). |
|
Copyright 1996-2005 Kunihiro Ishiguro, et al. |
|
sonic# configure terminal |
|
sonic(config)# router bgp 65100 |
|
sonic(config-router)# neighbor 10.0.0.2 remote-as 65100 |
|
sonic(config-router)# neighbor 10.0.0.2 route-reflector-client |
|
sonic(config-router)# end |
|
sonic# write |
|
sonic# exit |
|
root@sonic:~# config save -y |
BGP IPv6 Configuration
This section shows a sample IPv6 BGP configuration.
|
Step |
Command |
Description |
|---|---|---|
|
1 |
sudo vtysh |
Enter FRRouting. |
|
2 |
configure |
Enter configuration mode. |
|
3 |
router bgp < (1-4294967295) AS number> |
Add a new router. |
|
4 |
neighbor <A.B.C.D Neighbor address> remote-as < (1-4294967295) AS number> |
Configure a neighbor's IPv6 address and remote-as. |
|
5 |
neighbor <A.B.C.D Neighbor address> route-reflector-client |
Configure a neighbor as route-reflector-client. |
|
6 |
End |
Exit configuration mode in FRRouting. |
|
7 |
write |
Optional: Save this configuration to be part of bgpd.conf. |
|
8 |
exit |
Exit FRRouting. |
|
9 |
sudo config save –y |
Optional: Save the current configuration to be part of the startup configuration. |