The
BGP is maintained and configured via the CLI only. The BGP on
This document only covers activating and accessing the BGP process. It is not meant as a full reference for the configuration and operation of BGP. The
Complete the following steps to enable, connect, and configure the BGP daemon:
- Activate the BGP process. At the command prompt (#), enter the following command:
config_routing --bgp --enable
The
2. To start configuring BGP, access the BGP process. At the command prompt (#), complete the following steps:
1. Enter the following command:
config_routing --bgp --connect
You are prompted for the BGP password.
2. Enter the default password: bgp
The BGP console (BGP>) is displayed.
3. At the BGP console (BGP>), enter the following command:
enable
The BGP privileged mode console (BGP#) is displayed. At this point, BGP can be configured using commands similar to other routers that run BGP.
4. At the BGP privileged mode console (BGP#), enter the following command:
config terminal
The BGP daemon is now in BGP terminal configuration mode. The BGP terminal configuration mode console (BGP(config)#) is displayed.
5. At the BGP terminal configuration mode console (BGP(config)#), add an Autonomous System (AS):
router bgp <AS>
The AS number is typically given by the network service provider.
The BGP daemon is now in router configuration mode. The router configuration console (BGP(config-router)#) is displayed.
6. From here, the BGP routing configuration can be constructed using commands typical to other industry routers. Following is a basic example:
BGP(config-router)# bgp router-id <WAN-IP> neighbor <peer-IP> remote-as <peer-AS> neighbor <peer-IP> activate network <LAN network> mask <LAN network mask> neighbor <peer-IP> remote-as <peer-AS>
7. When finished configuring BGP, the configuration is saved with two steps. First issue the command:
wr mem
This writes the configuration to the
8. Next exit the BGP process by typing the command exit until you are returned to the
cfg_commit
This saves the contents of /etc/config/bgpd.conf to flash on the
By default, the BGP process checks the Linux table at startup time for routes to advertise. This may create an undesired condition where the advertise routes are out of sync with the local routes if the local routing table changes for reasons such as LAN failure or a change in received routes from a local routing process such as OSPF. To avoid this situation, the below command should be added to the BGP routing configuration.
bgp network import-check
Further, if LAN VLAN interfaces are in use, then execute the following command from the
enable_monitor_vlan on
This enables the