Configuring Basic BGP4+ Functions
Basic BGP4+ functions must be configured before you configure subsequent BGP4 functions on a BGP4+ network.
Usage Scenario
Basic BGP4+ functions must be configured first when you configure BGP4+ for inter-AS communication.
- Starting a BGP4+ Process
A BGP process must be started before configuring BGP4+ functions. When starting a BGP4+ process, specify the number of the AS to which the device belongs. - Configuring IPv6 Peers
Devices can exchange BGP4+ routing information only after the IPv6 peer relationship is established among them. - (Optional) Configuring the Local Interface for a BGP4+ Connection
When loopback interfaces are used to establish a BGP4+ connection between two peers, the local interface used for the BGP4+ connection needs to be configured on the devices. - Verifying the Basic BGP4+ Configuration
After configuring basic BGP4+ functions, verify BGP4+ peer information.
Starting a BGP4+ Process
A BGP process must be started before configuring BGP4+ functions. When starting a BGP4+ process, specify the number of the AS to which the device belongs.
Context
Changing router IDs on BGP4+ peers will cause the reestablishment of the BGP4+ connection between ME devices.
Procedure
- Run system-view
The system view is displayed.
- Run bgp as-number
BGP4+ is enabled (the local AS number is specified), and the BGP4+ view is displayed.
- (Optional) Run router-id ipv4-address
The router ID is set.
NOTE:
If the router ID of the ME device is the IP address of a physical interface, the change in the IP address will cause route flapping on the network. To enhance network stability, configuring the address of a loopback interface as the router ID is recommended.
- (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. - Run commit
The configuration is committed.
Configuring IPv6 Peers
Devices can exchange BGP4+ routing information only after the IPv6 peer relationship is established among them.
Context
Because BGP4+ uses TCP connections, the IPv6 addresses for peers must be specified when you configure BGP4+. A BGP4+ peer may not be a neighboring ME device, and a BGP4+ peer relationship can be created by using a logical link. Using the addresses of loopback interfaces to set up BGP4+ peer relationships can improve the stability of BGP4+ connections and is recommended.
The devices in the same AS establish IBGP peer relationships, and the devices of different ASs establish EBGP peer relationships.
(Optional) Configuring the Local Interface for a BGP4+ Connection
When loopback interfaces are used to establish a BGP4+ connection between two peers, the local interface used for the BGP4+ connection needs to be configured on the devices.
Context
To improve the reliability and stability of a BGP4+ connection, the local interfaces used for the BGP4+ connection should be configured as loopback interfaces. When redundant links are available on the network, the BGP4+ connection will not be torn down if an interface or a link fails.
Procedure
- Run system-view
The system view is displayed.
- Run bgp as-number
The BGP view is displayed.
- Run peer { ipv6-address | group-name } connect-interface interface-type interface-number [ ipv6-source-address ]
The source interface and source address used to set up a TCP connection are specified.
BGP4+ uses the physical interface that is directly connected to the peer as the local interface of a TCP connection.
NOTE:
When multiple peer relationships between two ME devices are established through various links, running the peer connect-interface command to specify the local interface for a BGP4+ connection is recommended.
- Run commit
The configuration is committed.
Verifying the Basic BGP4+ Configuration
After configuring basic BGP4+ functions, verify BGP4+ peer information.
Procedure
- Run the display bgp ipv6 peer ipv6-address verbose command to check detailed information about BGP4+ peers.
- Run the display bgp ipv6 peer ipv6-address log-info command to check the log information of BGP4+ peers.
- Run the display bgp ipv6 routing-table command to check the information about BGP4+ routes.
Example
# Run the display bgp ipv6 peer command to view information about BGP4+ peers.
<HUAWEI> display bgp ipv6 peer
BGP Local router ID : 20.0.0.1
local AS number : 100
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2001:db8:20::21 4 200 17 19 0 00:09:59 Established 3