Got it

Bidirectional import

Created: Jul 14, 2020 13:04:36Latest reply: Jul 15, 2020 02:12:34 697 3 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

What is the correct method of carrying out BGP-OSPF bidirectional import?

Featured Answers

Recommended answer

Popeye_Wang
Admin Created Jul 15, 2020 02:12:34

Hello,

If BGP-OSPF bidirectional import is performed on a single device, there is no risk. 

However, if the bidirectional import is performed on two device, for example, CE1 and CE2 in the following figure, pay attention to the following points:

  1.  OSPF has a lower route preference than BGP. To prevent routing loops, The BGP route imported to  OSPF from one device should not be imported to BGP from another device. This function can be implemented through tags.

  2.  After OSPF routes are imported to BGP, the MED value of the BGP route inherits the original OSPF cost value. BGP route selection may be affected. If necessary, change the MED value to 0 when import.

  3. The preference of OSPF ASE  is lower than the BGP.  A device in the OSPF area accessing the external network may detour within this AS, resulting in sub-optimal routing. For example, when CE1 accesses CE3, the next hop of the shortest path should be PE1, but CE1 will preferentially select CE2. To solve this problem, change the preference of BGP routes to a value smaller than 150.

ospf


The following is a configuration example.

 

CE1:

#

ospf 1

  import-route bgp tag 100

#

route-policy import-bgp deny node 10

  if-match tag 200

#

route-policy import-bgp permit node 20

#

bgp 100

  import-route ospf 1 med 0 route-policy import-bgp

  preference 120 255 255         //Assume that the EBGP peer relationship is established between the CE and PE.

#

CE2:

#

ospf 1

  import-route bgp tag 200

#

route-policy import-bgp deny node 10

  if-match tag 100

#

route-policy import-bgp permit node 20

#

bgp 100

  import-route ospf 1 med 0 route-policy import-bgp

  preference 120 255 255    


Any further questions, please let us know.

View more
  • x
  • convention:

All Answers

Hello,

When a new device is deployed in the network or a device is restarted, network traffic may be lost during BGP convergence. This is because IGP convergence is faster than BGP convergence.

This problem can be solved through the synchronization between OSPF and BGP. For more details, please refer to https://support.huawei.com/hedex/hdx.do?docid=EDOC1100069307&id=dc_feature_ospf_0015&lang=en

Hope to help you!


View more
  • x
  • convention:

Its better to use Tag and Deny method to avoid loop on ASBR.
View more
  • x
  • convention:

Hello,

If BGP-OSPF bidirectional import is performed on a single device, there is no risk. 

However, if the bidirectional import is performed on two device, for example, CE1 and CE2 in the following figure, pay attention to the following points:

  1.  OSPF has a lower route preference than BGP. To prevent routing loops, The BGP route imported to  OSPF from one device should not be imported to BGP from another device. This function can be implemented through tags.

  2.  After OSPF routes are imported to BGP, the MED value of the BGP route inherits the original OSPF cost value. BGP route selection may be affected. If necessary, change the MED value to 0 when import.

  3. The preference of OSPF ASE  is lower than the BGP.  A device in the OSPF area accessing the external network may detour within this AS, resulting in sub-optimal routing. For example, when CE1 accesses CE3, the next hop of the shortest path should be PE1, but CE1 will preferentially select CE2. To solve this problem, change the preference of BGP routes to a value smaller than 150.

ospf


The following is a configuration example.

 

CE1:

#

ospf 1

  import-route bgp tag 100

#

route-policy import-bgp deny node 10

  if-match tag 200

#

route-policy import-bgp permit node 20

#

bgp 100

  import-route ospf 1 med 0 route-policy import-bgp

  preference 120 255 255         //Assume that the EBGP peer relationship is established between the CE and PE.

#

CE2:

#

ospf 1

  import-route bgp tag 200

#

route-policy import-bgp deny node 10

  if-match tag 100

#

route-policy import-bgp permit node 20

#

bgp 100

  import-route ospf 1 med 0 route-policy import-bgp

  preference 120 255 255    


Any further questions, please let us know.

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.