Starting a BGP Process
Procedure
- Run system-view
The system view is displayed.
- Run bgp { as-number-plain | as-number-dot }
BGP is started, the local AS number is specified, and the BGP view is displayed.
After BGP peers are configured, changing the router ID of a BGP peer resets BGP peer relationships.
- Run router-id ipv4-address
A router ID is set.
By default, BGP automatically selects the router ID in the system view. If the IP address of a physical interface is used as the router ID, route flapping occurs when the IP address of the physical interface changes. To enhance network stability, configuring the address of a loopback interface as the router ID is recommended. For router ID selection rules in the system view, see descriptions in Command Reference about the router-id command.
By default, the Cluster_List attribute takes precedence over the router ID during BGP route selection. To enable the router ID to take precedence over the Cluster_List attribute during BGP route selection, run the bestroute routerid-prior-clusterlist command.
If the device does not have an IPv4 interface, it needs to be configured with a router ID.
- (Optional) Run shutdown
All sessions between the device and its BGP peers are terminated.
During the system upgrade or maintenance, you can run the shutdown command to terminate all sessions between a device and its BGP peers to prevent possible BGP route flapping from affecting the network.
After the upgrade or maintenance, run the undo shutdown command to restore the BGP peer sessions; otherwise, BGP functions will be affected.
- (Optional) Run prefix memory-limit
BGP memory protection is configured.
When the memory usage reaches the overload threshold, if a BGP peer continues sending BGP routes, the device restarts and performs an active/standby switchover. In this case, the system becomes unstable. After BGP memory protection is configured, the device does not receive routes and reports alarms when the memory usage reaches the overload threshold.
- (Optional) Run advertise lowest-priority on-startup
BGP is configured to minimize the priorities of the BGP routes to be advertised.
If the BGP routes advertised by a device when the device is delivering ARP entries after a restart are selected as optimal routes, traffic loss may occur. To prevent this problem, run the advertise lowest-priority on-startup command before the device is restarted to configure BGP to minimize the priorities of the BGP routes to be advertised. After the command is run, the MED and Local_Pref of the BGP routes to be advertised are 4294967295 (maximum value) and 0 (minimum value), respectively. The configuration prevents the BGP routes from being preferentially selected. To restore the priorities of these BGP routes after ARP entries are delivered, run the reset bgp advertise lowest-priority on-startup command.
If the advertise lowest-priority on-startup command is run after BGP configurations are committed, the configuration of this command takes effect only after the reboot command is run. If the advertise lowest-priority on-startup command and BGP configurations are committed as a whole, the configuration of this command takes effect immediately.
- (Optional) Run advertise lowest-priority all-address-family peer-up [ delay delay ]
BGP is configured to minimize the priorities of the routes to be advertised to BGP peers when the peers go Up from Down.
If the advertise lowest-priority all-address-family peer-up command is not run, BGP routes with unchanged priorities are advertised to peers when the peers go Up from Down. After the peers receive the routes, traffic may be switched back to the original paths. Consequently, lengthy packet loss may occur. To address this problem, run the advertise lowest-priority all-address-family peer-up command. After the command is run, routes advertised to the peers carry the lowest priorities (largest MED value and smallest Local_Pref value) until delay expires.
To restore the priorities of the routes to be advertised to BGP peers when the peers go Up from Down, run the reset bgp advertise lowest-priority all-address-family peer-up command.
- Run commit
The configuration is committed.