en-US
search-icon

Knowledge Base

How to configure BGP (Border Gateway Protocol) with single ISP and advertise your public network

Description

This article shows you how to configure BGP with single ISP and advertise your public network

Resolution

In this scenario, we configure basic BGP between SonicWall and ISP's router using CLI(Command Line Interface) to advertise our network (with public IP address) to the ISP. It is necessary to have the AS(Autonomous System) numbers and public IP address of both devices. This information should be provided by ISP

Image

By default, BGP is disabled on SonicWall. To configure BGP follow the steps:

Step 1: Enable Advanced Routing

Network | Routing | Routing Mode : Advanced Routing


Step 2: Enable BGP(Configure with CLI)

Network | Routing | BGP : Enable(Configure with CLI)

Image

Note: If you don't see BGP option, you might need a license. Please refer to the following link for more information regarding BGP licensing:

 

Step 3: Connect to SonicWall using port 22(SSH)

 

Image

 

Step 4: Configure BGP using CLI

User:admin

Password:

admin@C0EAE45C0360> configure  / Enter to the configure mode
admin at GUI from 10.60.2.102 is editing.
Do you wish to preempt them (yes/no)?
[no]: yes / Confirm preemption from GUI user who has logged in to SonicWall
config(C0EAE45C0360)#  routing  / Enter to Routing Module
(config-routing)#  bgp / Enter to BGP module
ZebOS version 7.7.0 IPIRouter 7/2009
ARS BGP>
ARS BGP> configure terminal / Enter configure mode
ARS BGP(config)> router bgp 6501 / Set up AS number on SonicWall
ARS BGP(config-router)> neighbor 2.2.2.1 remote-as 6500 / Configure neighbor connection
ARS BGP(config-router)> network 20.20.20.0 mask 255.255.255.0  / Advertise your network
ARS BGP(config-router)> Ctrl+Z / press in Keyboard
ARS BGP> Write / To write the changes into memory
ARS BGP> Exit

config(C0EAE45C0360)# commit / To save the configuration

 

Step 5: Check BGP neighbor status

ARS BGP> show ip bgp summary
If the output of the command shows any number under State/PfcRcd, it indicates that the neighbors can communicate with each other.


Image


Step 6: Check the network advertised to the neighbor

ARS BGP> show ip bgp neighbors advertised-routes

Image

 


Resolution for SonicOS 6.5 and Later

SonicOS 6.5 was released September 2017. This release includes significant user interface changes and many new features that are different from the SonicOS 6.2 and earlier firmware. The below resolution is for customers using SonicOS 6.5 and later firmware.

In this scenario, we configure basic BGP between SonicWall and ISP's router using CLI(Command Line Interface) to advertise our network (with public IP address) to the ISP. It is necessary to have the AS(Autonomous System) numbers and public IP address of both devices. This information should be provided by ISP

Image

By default, BGP is disabled on SonicWall. To configure BGP follow the steps:

Step 1: Enable Advanced Routing

Login to your Sonicwall management page and click on Manage tab on top of the page.

  • Navigate to Network -> Routing page, on right side go to Settings tab.
  • Under Routing Mode: select Advanced Routing as below

Image

  • Click OK button in the pop-up window as below. Click Accept button to save settings

Image


Step 2: Enable BGP in SonicWALL Management (Configure with CLI)

Login to your Sonicwall management page and click on Manage tab on top of the page.

  • Navigate to Network -> Routing page, on right side go to Settings tab.
  • Under Routing Mode: select Advanced Routing
  • BGP: Enabled (Configure with CLI) (Select this option from Drop-down box).
  • Click Accept button to save settings as below

Image

Note: If you don't see BGP option, you might need a license. Please refer to the following link for more information regarding BGP licensing:

 

Step 3: Connect to SonicWall using port 22(SSH)

 

Image

 

Step 4: Configure BGP using CLI

User:admin

Password:

admin@C0EAE45C0360> configure  / Enter to the configure mode
admin at GUI from 10.60.2.102 is editing.
Do you wish to preempt them (yes/no)?
[no]: yes / Confirm preemption from GUI user who has logged in to SonicWall
config(C0EAE45C0360)#  routing  / Enter to Routing Module
(config-routing)#  bgp / Enter to BGP module
ZebOS version 7.7.0 IPIRouter 7/2009
ARS BGP>
ARS BGP> configure terminal / Enter configure mode
ARS BGP(config)> router bgp 6501 / Set up AS number on SonicWall
ARS BGP(config-router)> neighbor 2.2.2.1 remote-as 6500 / Configure neighbor connection
ARS BGP(config-router)> network 20.20.20.0 mask 255.255.255.0  / Advertise your network
ARS BGP(config-router)> Ctrl+Z / press in Keyboard
ARS BGP> Write / To write the changes into memory
ARS BGP> Exit

config(C0EAE45C0360)# commit / To save the configuration

 

Step 5: Check BGP neighbor status

ARS BGP> show ip bgp summary
If the output of the command shows any number under State/PfcRcd, it indicates that the neighbors can communicate with each other.


Image


Step 6: Check the network advertised to the neighbor

ARS BGP> show ip bgp neighbors advertised-routes

Image