• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

Experience case of BGP and OSPF routing validity issues at a certain point

2020-06-15 Published
  • 0关注
  • 0收藏 1279浏览
周天 五段
粉丝:0人 关注:0人

Network Topology

125x Introduce Routing

Problem Description

The routes learned by ebgp on site suppress the routes introduced by OSPF, resulting in the traffic not being implemented as expected:

Preference 20 is configured on site, which leads to the better routing of ebgp than OSPF. On site, it indicates that if preference is configured first, BGP routing takes effect; if route introduction is configured first, OSPF routing takes effect.

Process Analysis

This problem does exist in laboratory reproduction:

1) Configure preference before import OSPF:  

[H3C]display ip routing-table vpn-instance 11

 

Destinations : 26       Routes : 26

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0

6.1.1.0/24         O_ASE2  150 1           60.1.1.10       Vlan60

7.7.7.7/32         O_ASE2  150 1           60.1.1.10       Vlan60

12.12.12.12/32     Direct  0   0           127.0.0.1       InLoop0

20.1.1.0/24        O_ASE2  150 1           60.1.1.10       Vlan60

20.20.20.0/24      BGP     20  0           30.1.1.30       Vlan30

[H3C]address-family  ipv4

[H3C]import-route ospf 10

[H3C]qu

[H3C]dis th

#

#

ip vpn-instance 11

  peer 20.1.1.2 as-number 200

  peer 30.1.1.30 as-number 200

  #

  address-family ipv4 unicast

   preference 20 150 130

   import-route ospf 10

   peer 20.1.1.2 enable

   peer 30.1.1.30 enable

#

return

[H3C]display ip routing-table vpn-instance 11

 

Destinations : 26       Routes : 26

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0

6.1.1.0/24         O_ASE2  150 1           60.1.1.10       Vlan60

7.7.7.7/32         O_ASE2  150 1           60.1.1.10       Vlan60

12.12.12.12/32     Direct  0   0           127.0.0.1       InLoop0

20.1.1.0/24        O_ASE2  150 1           60.1.1.10       Vlan60

20.20.20.0/24      BGP     20  0           30.1.1.30       Vlan30

 

2) Configure import OSPF before preference:

#

ip vpn-instance 11

  peer 20.1.1.2 as-number 200

  peer 30.1.1.30 as-number 200

  #

  address-family ipv4 unicast

   import-route ospf 10

   peer 20.1.1.2 enable

   peer 30.1.1.30 enable

#

return

[H3C]display ip routing-table vpn-instance 11

 

Destinations : 26       Routes : 26

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0

6.1.1.0/24         O_ASE2  150 1           60.1.1.10       Vlan60

7.7.7.7/32         O_ASE2  150 1           60.1.1.10       Vlan60

12.12.12.12/32     Direct  0   0           127.0.0.1       InLoop0

20.1.1.0/24        O_ASE2  150 1           60.1.1.10       Vlan60

20.20.20.0/24      O_ASE2  150 1           60.1.1.10       Vlan60

 

[H3C]address-family ipv4 unicast

[H3C]preference 20 200 130

[H3C]dis th

#

ip vpn-instance 11

  peer 20.1.1.2 as-number 200

  peer 30.1.1.30 as-number 200

  #

  address-family ipv4 unicast

   preference 20 200 130

   import-route ospf 10

   peer 20.1.1.2 enable

   peer 30.1.1.30 enable

#

return

 

[H3C]qu

[H3C]display ip routing-table vpn-instance 11

 

Destinations : 26       Routes : 26

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0

6.1.1.0/24         O_ASE2  150 1           60.1.1.10       Vlan60

7.7.7.7/32         O_ASE2  150 1           60.1.1.10       Vlan60

12.12.12.12/32     Direct  0   0           127.0.0.1       InLoop0

20.1.1.0/24        O_ASE2  150 1           60.1.1.10       Vlan60

20.20.20.0/24      O_ASE2  150 1           60.1.1.10       Vlan60  

[H3C]display bgp routing-table ipv4 vpn-instance 11 20.20.20.0

 

BGP local router ID: 2.2.2.2

Local AS number: 100

 

Paths:   2 available, 1 best

 

BGP routing table information of 20.20.20.0/24:

Imported route.

 Original nexthop: 60.1.1.10

OutLabel        : NULL

Ext-Community   : <OSPF Domain Id: 0.0.0.0:0>, <OSPF Router Id: 12.12.12.12:0:

                   0>, <OSPF AreaNum: 0.0.0.0 RouteType: 5 Option: 1>, <RT: 111

                   :1>

RxPathID        : 0x0 

 TxPathID        : 0x0 

 AS-path         : (null)

Origin          : incomplete

Attribute value : MED 2, pref-val 32768

State           : valid, local, best

 IP precedence   : N/A

QoS local ID    : N/A

Traffic index   : N/A

 

From            : 30.1.1.30 (1.1.1.1)

Rely nexthop    : 30.1.1.30

Original nexthop: 30.1.1.30

OutLabel        : NULL

Ext-Community   : <RT: 111:1>

RxPathID        : 0x0 

 TxPathID        : 0xffffffff 

 AS-path         : 200

Origin          : igp

Attribute value : MED 0, pref-val 0

State           : valid, external

 IP precedence   : N/A

QoS local ID    : N/A

Traffic index   : N/A

 


 

Solution

After analyzing the logic:

1) If you configure preference first, the route learned by ebgp is 20, and the route learned by OSPF is 150. At this time, BGP route is in effect in the routing table, and then import OSPF is configured in BGP (Note: BGP can only import routes in effect in the routing table), so it cannot be imported. At this time, BGP routing is in effect;

2) When preference is not configured, ebgp learns 20 routes, while OSPF learns 150 routes. At this time, the effective route in the routing table is OSPF route type. At this time, import OSPF can be configured in BGP to introduce the OSPF route into BGP routing table (pref Val 32768); then configure preference. At this time, there are two routes in BGP routing table, while the one introduced by itself Pref Val is large, so OSPF is preferred for BGP routing table.

该案例对您是否有帮助:

您的评价:1

若您有关于案例的建议,请反馈:

1 comments
hobo 七段
粉丝:3人 关注:1人

回赞一个哈哈哈

Add Comments:

举报

×

侵犯我的权益 >
对根叔知了社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔知了社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作