Got it

BGP route

Created: Oct 29, 2019 08:55:48Latest reply: Feb 3, 2022 14:07:57 985 6 1 0 0
  Rewarded HiCoins: 0 (problem resolved)

As shown in the figure, ibgp peer relationship is established between AR1 and AR2, and ebgp peer relationship is established between AR2 and AR3.

The problem is that 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. why is this?  How can I enable AR3 to learn 1.1.1.1 correctly?

BGP3

BGP1

BGP2


Featured Answers
Popeye_Wang
Admin Created Oct 29, 2019 09:08:00

 Hi Sprout,

This is a rule for BGP route selection. If the prefix and next hop of the received BGP route are the same, the route is not preferentially selected as the optimal route.


In Huawei documents, such a route is called a supernet route.

 The description 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.

By default, when a BGP device receives a BGP supernet unicast route, the BGP device sets the route invalid and does not advertise it to other BGP peers. If a Huawei device is connected to a non-Huawei device and you want the Huawei device to advertise BGP supernet unicast routes that it receives from the non-Huawei device to other BGP peers, configure the Huawei device to advertise BGP supernet unicast routes to BGP peers.

 

You can use the supernet unicast advertise enable command to configure a BGP device to advertise BGP supernet unicast routes to its peers.

Refer to https://support.huawei.com/hedex/hdx.do?docid=EDOC1100069307&id=supernet_unicast_advertise&text=null&lang=en 


In the eNSP, the ARs don’t support this command,you can replace the routers with NE series


View more
  • x
  • convention:

Recommended answer

ViktorG
Created Oct 30, 2019 12:33:40

Hello @Sprout !

In your situation the all the routes should be present as OSPF routes as it is announced into OSPF and the Next-hop to be the directly connected interface address 10.0.12.1. OSPF routes are more preferable than BGP.

Could you check in your lab if you receive OSPF routes on R2 ?

Also, on R2 you can create the import policy to change the Next-hop for the route.

ip ip-prefix Loopbacks index 10 permit 1.1.1.1 32

route-policy FROM-AR1 permit node 100
if-match ip-prefix Loopbacks
apply ip-address next-hop 10.0.12.1

route-policy FROM-AR1 permit node 200

bgp 100
peer 1.1.1.1 route-policy FROM-AR1 import

Then towards BGP AR routes you need apply Nexh-hop local feature.


Please, let us know if it is Ok for your solution.
Viktor
View more
  • x
  • convention:

All Answers

 Hi Sprout,

This is a rule for BGP route selection. If the prefix and next hop of the received BGP route are the same, the route is not preferentially selected as the optimal route.


In Huawei documents, such a route is called a supernet route.

 The description 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.

By default, when a BGP device receives a BGP supernet unicast route, the BGP device sets the route invalid and does not advertise it to other BGP peers. If a Huawei device is connected to a non-Huawei device and you want the Huawei device to advertise BGP supernet unicast routes that it receives from the non-Huawei device to other BGP peers, configure the Huawei device to advertise BGP supernet unicast routes to BGP peers.

 

You can use the supernet unicast advertise enable command to configure a BGP device to advertise BGP supernet unicast routes to its peers.

Refer to https://support.huawei.com/hedex/hdx.do?docid=EDOC1100069307&id=supernet_unicast_advertise&text=null&lang=en 


In the eNSP, the ARs don’t support this command,you can replace the routers with NE series


View more
  • x
  • convention:

Got it
View more
  • x
  • convention:

Hello @Sprout !

In your situation the all the routes should be present as OSPF routes as it is announced into OSPF and the Next-hop to be the directly connected interface address 10.0.12.1. OSPF routes are more preferable than BGP.

Could you check in your lab if you receive OSPF routes on R2 ?

Also, on R2 you can create the import policy to change the Next-hop for the route.

ip ip-prefix Loopbacks index 10 permit 1.1.1.1 32

route-policy FROM-AR1 permit node 100
if-match ip-prefix Loopbacks
apply ip-address next-hop 10.0.12.1

route-policy FROM-AR1 permit node 200

bgp 100
peer 1.1.1.1 route-policy FROM-AR1 import

Then towards BGP AR routes you need apply Nexh-hop local feature.


Please, let us know if it is Ok for your solution.
Viktor
View more
  • x
  • convention:

Posted by ViktorG at 2019-10-30 12:33Hello @Sprout !In your situation the all the routes should be present as OSPF routes as it is announ ...

Thank you for your reply. I think this is not a route preference issue. However, as you suggested, changing the next hop is indeed an effective method. When the next-hop of 1.1.1.1 is changed on R2, R3 can correctly receive this route.

View more
  • x
  • convention:

You are very Welcome @Sprout !
View more
  • x
  • convention:

NICE
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.