In the original BGP configuration, it needs to specify a peer IPv4 address to establish peer connections.
For CLOS deployment in the data center, the IP interfaces grow dramatically due to the full connection between spines and LEAFs.
(each peer connection needs IPv4 addresses on it). To eliminate this situation, we need the unnumbered interface to establish peer connections.
- "BGP unnumbered" support for Layer 3 interfaces that bind IP on a port or port-channel interface.
- (202006.x, 202012.x) "BGP unnumbered" support VLAN interface, but it must configure IPv4 address to VLAN interface to activate IPv6 link-local IP address, please make sure there's only one Interface added to the VLAN since BGP session is point to point.
- The reason why VLAN interface needs extra IP address to be configured is IPv6 link-local address is created automatically on Linux netdevice. If user create 4k VLAN, it will create the 4k corresponding router interface even it doesn't configure any IP address. This will exhaust ASIC resources in this scenario, so we limit IPv6 link-local address to create router interface automatically. In order to make BGP unnumbered work, it indeed needs a router interface on it, so we let user to configure extra IP on it as a workaround
- The version 202006 and 202012, the Ethernet interface didn't require the additional setting for BGP unnumbered.
- After version 202111 or later, the Ethernet interface requires the additional setting for BGP unnumbered, "link-local-only" must be enabled first before using BGP unnumbered.
For example, enable "link-local-only" on Ethernet0.
admin@sonic:~$ sudo config interface ipv6 enable use-link-local-only Ethernet0
admin@sonic:~$ show ipv6 link-local-mode
| Interface Name | Mode |
| Ethernet0 | Enabled |
| Ethernet1 | Disabled |
Tested model & firmware version:
- Switch model name:
- Edgecore SONiC version:
202012.0 ~ 202012.4
Establish BGP unnumbered session
Step 1. Initialize FRR configuration. Please refer to FRRouting and config initialization tutorial.
Step 2. Enter Vty shell.
"vtysh" provides a combined frontend to all FRR daemons in a single combined session.
Step 3. Configuring BGP Neighbor Session with unnumbered. Replaces the IP configuration of the original neighbor with the locally connected interface. (refer to Establish BGP session)
The AS number of neighbors, you could assign the AS number of neighbors. The "external" is to eBGP and the "internal" is to iBGP.
sonic(config-router)# neighbor Ethernet8 interface remote-as external
sonic(config-router)# neighbor Ethernet8 interface remote-as internal
Step 4. Checking the BGP connection and neighbor status.
On the AS7726-32X (Switch1)
On the AS5835-54X (Switch2)
Step 5. Save the routing setting.