Hello, everyone. I'd like to share with you two small problems I encountered in BGP basic experiments.
The experiment topology and configuration are as follows.
IBGP peer relationship is established between AR1 and AR2, and EBGP peer relationship is established between AR2 and AR3.

Problem 1
After the configuration is complete, the EBGP routes that AR1 learned are inactive.

Cause
By default, when an ASBR forwards a route learned from an EBGP peer to its IBGP peers, the ASBR does not change the next hop of the route. The next hop address of a route advertised by an EBGP peer is the address of the EBGP peer. After being forwarded to the IBGP peers, the route cannot become an active route because of the unreachable next hop.
Solution
Using the peer next-hop-local command to configure the ASBR to change the next hop of the route to its IP address when the ASBR advertises the route to an IBGP peer. Therefore, after being forwarded to the IBGP peer, the route can become an active route because the next hop is reachable.
In the experiment, the command is: peer 1.1.1.1 next-hop local
Problem 2
AR3 does not learn route 1.1.1.1 but learns 1.1.1.2 and 1.1.1.3. In the BGP routing table of AR2, It can be found that 1.1.1.1 is not preferred.

Cause
By default, BGP supernet unicast routes are considered invalid and cannot be advertised to BGP peers or delivered to the IP routing table.
The definition of the supernet route is as follows:
A BGP supernet route has the same destination address and next hop address or has a more detailed destination address than the next hop address. Any route that meets one of the following conditions is a BGP supernet route.
· If you perform bitwise AND operations on the destination address mask with the destination address and next hop address, respectively, the calculated network addresses are the same, and the destination address mask is greater than or equal to the next hop address mask.
· If you perform bitwise AND operations on the destination address mask with the destination address and next hop address, respectively, the calculated network addresses are different. However, if you perform bitwise AND operations on the next hop address mask with the destination address and next hop address, respectively, the calculated network addresses are the same.
Solution
On the real machine, we can use the supernet unicast advertise enable command to configure a BGP device to advertise BGP supernet unicast routes to its peers.
But in the eNSP, the ARs don’t support this command.
According to suggestion from the forum friend, change the next-hop of the supernet route 1.1.1.1, so the AR3 can correctly receive this route.
https://forum.huawei.com/enterprise/en/bgp-route/thread/578080-863

