Border Gateway Protocol (BGP) is an exterior gateway protocol that exchanges routing and reachability information among Autonomous Systems (AS). An AS is a group of networks under one administrative control. External BGP (eBGP) exchanges routes between different ASs, and internal BGP (iBGP) exchanges routes within the same AS. In SonicOS 8.2.3 and later, you can configure BGP in the management interface at NETWORK | System > Dynamic Routing > BGP.
Advanced Routing Mode is turned on. For more information, refer to Settings.
The participating interfaces have valid IP addressing.
SonicOS supports BGP Equal-Cost Multi-Path (ECMP) routing for IPv4 and IPv6 unicast routes. To turn on ECMP, turn on Allow learning ECMP routes from advanced routing protocols in the Settings tab. The change takes effect after the firewall restarts. When ECMP is turned on, SonicOS installs up to 16 equal-attribute paths to a single destination prefix and distributes outbound traffic per flow across all valid next hops.
For multiple BGP paths to qualify as ECMP routes, the following BGP attributes must be equal across all candidate paths:
| BGP Attribute | Requirement |
|---|---|
| WEIGHT | Must be equal. |
| LOCAL_PREF | Must be equal. |
| AS_PATH Length | Must be equal. The AS_PATH content can differ if Multipath Relax is enabled. |
| ORIGIN Type | Must be equal. The origin code is Interior Gateway Protocol (IGP), Exterior Gateway Protocol (EGP), or Incomplete. |
| MED | Must be equal. MED is the Multi-Exit Discriminator value. |
| Route Type | All candidate paths must be the same type (eBGP or iBGP). |
To configure BGP Global Settings
Navigate to NETWORK | System > Dynamic Routing.
Click the Settings tab. From the BGP drop-down menu, select Enabled.
The BGP tab displays.
Click the BGP tab.
Click BGP Global Settings.
In the BGP Global Settings dialog box, set the options described in the following table.
| Field | Description |
|---|---|
| AS Number (1 - 4294967295) | Specifies the Autonomous System Number (ASN) of the local firewall. Enter a value from 1 to 4,294,967,295. Values above 65,535 are 4-byte ASNs. |
| Extended ASN | Enables support for 4-byte ASNs. |
| Redistribute Connected Networks | Redistributes directly connected interface networks into BGP. |
| Redistribute Static Routes | Redistributes static routes into BGP. |
| Redistribute OSPF Routes | Redistributes routes learned through OSPF into BGP. |
| Redistribute RIP Routes | Redistributes routes learned through RIP into BGP. |
| eBGP Max Paths (1 - 4) | Specifies the maximum number of equal-cost external BGP paths allowed. |
| iBGP Max Paths (1 - 4) | Specifies the maximum number of equal-cost internal BGP paths allowed. |
| Router ID | Specifies the unique IPv4 address that identifies the firewall within the AS. If this field is blank, SonicOS automatically selects the highest active IPv4 address. |
Click Save.
After you save the global settings, add BGP neighbors and advertised networks in the Neighbors and Advertised Networks sections of the BGP tab. To check for failed peering, refer to the logs under DEVICE | Log > Settings > Network > Advanced Routing.