Figure 1. Network topology
Example model & SONiC version:
This configuration will announce network 192.168.10.0/24 to all neighbors.
Aurora 610-1
admin@nba610-1:~$ vtysh
Hello, this is FRRouting (version 7.5.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
nba610-1# co
nba610-1(config)# no router bgp 65100
nba610-1(config)# router bgp 65101
nba610-1(config-router)# bgp router-id 10.10.10.1
nba610-1(config-router)# neighbor 10.0.1.0 remote-as 65200
nba610-1(config-router)# neighbor 10.0.1.0 description nba610-2
nba610-1(config-router)# address-family ipv4 unicast
nba610-1(config-router-af)# network 192.168.10.0
nba610-1(config-router-af)# end
nba610-1# write
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Configuration saved to /etc/frr/zebra.conf
Configuration saved to /etc/frr/bgpd.conf
Configuration saved to /etc/frr/staticd.conf
Aurora 610-2
admin@nba610-2:~$ vtysh
Hello, this is FRRouting (version 7.5.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
nba610-2# co
nba610-2(config)# no router bgp 65100
nba610-2(config)# router bgp 65200
nba610-2(config-router)# bgp router-id 10.10.10.100
nba610-2(config-router)# neighbor 10.0.1.1 remote-as 65101
nba610-2(config-router)# neighbor 10.0.1.1 description nba610-1
nba610-2(config-router)# no bgp ebgp-requires-policy
nba610-2(config-router)# end
nba610-2# write
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Configuration saved to /etc/frr/zebra.conf
Configuration saved to /etc/frr/bgpd.conf
Configuration saved to /etc/frr/staticd.conf
nba610-1# show bgp ipv4
BGP table version is 12, local router ID is 10.10.10.1, vrf id 0
Default local pref 100, local AS 65101
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.168.10.0/24 0.0.0.0 0 32768 i
Displayed 1 routes and 1 total paths
nba610-2# show ip bgp neighbors 10.0.1.1 routes
BGP table version is 13, local router ID is 10.10.10.100, vrf id 0
Default local pref 100, local AS 65200
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.168.10.0/24 10.0.1.1 0 0 65101 i
Displayed 1 routes and 1 total paths
Route redistribution allows a network that uses one routing protocol to route traffic dynamically based on information learned from a different routing protocol.
Redistribution configuration works under the target address-family section.
nba610-2(config-router)# address-family
ipv4 ipv6 l2vpn
Enter Vty shell and configure your BGP ASN.
nba610-2# co
nba610-2(config)# router bgp 65200
nba610-2(config-router)# address-family ipv4 unicast
nba610-2(config-router-af)# redistribute connected
nba610-2(config-router-af)# redistribute kernel
nba610-2(config-router-af)# redistribute static
SONiC FRRouting supports only connected, kernel, and static route redistribution. |
connected Connected routes (directly attached subnet or host)
kernel Kernel routes (not installed via the zebra RIB)
static Statically configured routes