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

某局点S6850设备多VPN实例路由学习不到故障案例

  • 0关注
  • 3收藏 1248浏览
单畅 六段
粉丝:1人 关注:0人

组网及说明

现场SWB上接口绑定三个不同的VPN实例,SWA和SWB建立BGP邻居,需要实现SWA和SWC可以互通,SWA和SWD也可以互通。



问题描述

VRF3引入了vrf1和vrf2的路由,bgp-vrf3里引入直连或network,SWA都收不到SWC和SWD的路由(192.168.1.0和192.168.2.0网段)。

SWB主要配置:

#

ip vpn-instance vrf1

 route-distinguisher 100:100

#

ip vpn-instance vrf2

 route-distinguisher 200:200

#

ip vpn-instance vrf3

 route-distinguisher 300:300

 #

 address-family ipv4

  route-replicate from vpn-instance vrf1 protocol direct

  route-replicate from vpn-instance vrf2 protocol direct

#

#

bgp 100

 #

 ip vpn-instance vrf3

  peer 192.168.3.1 as-number 100

  #

  address-family ipv4 unicast

   import-route direct

   network 192.168.1.0 255.255.255.0

   peer 192.168.3.1 enable

#

#

interface GigabitEthernet1/0/1

 port link-mode route

 ip binding vpn-instance vrf3

 ip address 192.168.3.254 255.255.255.0

#

interface GigabitEthernet1/0/2

 port link-mode route

 ip binding vpn-instance vrf1

 ip address 192.168.1.254 255.255.255.0

#

interface GigabitEthernet1/0/3

 port link-mode route

 ip binding vpn-instance vrf2

 ip address 192.168.2.254 255.255.255.0

#

SWA主要配置:

#
bgp 100
peer 192.168.3.254 as-number 100
#
address-family ipv4 unicast
  peer 192.168.3.254 enable
#

SWA上学习不到192.168.1.0和192.168.2.0网段的路由:

<SWA>dis ip routing-table

Destinations : 13       Routes : 13

Destination/Mask   Proto   Pre Cost        NextHop         Interface

192.168.3.0/24     Direct  0   0           192.168.3.1     GE1/0/1

192.168.3.0/32     Direct  0   0           192.168.3.1     GE1/0/1

192.168.3.1/32     Direct  0   0           127.0.0.1       InLoop0

192.168.3.255/32   Direct  0   0           192.168.3.1     GE1/0/1

<SWA>dis bgp routing-table ipv4

Total number of routes: 1

BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
               s - suppressed, S - stale, i - internal, e - external
               a - additional-path
      Origin: i - IGP, e - EGP, ? - incomplete

    Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >i 192.168.3.0        192.168.3.254   0          100        0       ?


过程分析

1、用route-replicate命令引入的路由无法在BGP里面传递,所以需要用RT、RD值的方式引入路由,在BGP中传播;不同VPN实例需要互访,必须保证访问实例的出方向RT值和被访问实例的入方向RT值相同;否则路由是不会加入对应VPN路由表的。

2、修改后发现依然SWA依然无法学习到SWC和SWD的路由。

此时,再次查看SWA的路由:发现SWA的路由表里面没有SWC和SWD的路由,但是在BGP路由表中,SWC和SWD的地址是学习到的,但是状态为未生效状态。

dis ip routing-table

Destinations : 13       Routes : 13

Destination/Mask   Proto   Pre Cost        NextHop         Interface

192.168.3.0/24     Direct  0   0           192.168.3.1     GE1/0/1

192.168.3.0/32     Direct  0   0           192.168.3.1     GE1/0/1

192.168.3.1/32     Direct  0   0           127.0.0.1       InLoop0

192.168.3.255/32   Direct  0   0           192.168.3.1     GE1/0/1


dis bgp routing-table ipv4

Total number of routes: 3

BGP local router ID is 2.2.2.2

Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e - external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

   i 192.168.1.0        192.168.1.254   0          100        0       ?

   i 192.168.2.0        192.168.2.254   0          100        0       ? //没有*说明没有生效

* >i 192.168.3.0        192.168.3.254   0          100        0       ?

这时候发现BGP路由中,192.168.1.0的下一跳地址是 192.168.1.254,和SWA不是直连网段的,而是SWB和SWC互联的路由。此时,需要用 peer 192.168.3.1 next-hop-local修改路由下一跳,使得路由变成直连下一跳地址。

#

ip vpn-instance vrf3

  peer 192.168.3.1 as-number 100

  #

  address-family ipv4 unicast

   import-route direct

   peer 192.168.3.1 enable

   peer 192.168.3.1 next-hop-local


此时查看SWA上的BGP路由表发现路由生效,也可以正常学习到192.168.1.0和192.16.2.0网段luy。

dis bgp routing-table ipv4

Total number of routes: 3

BGP local router ID is 2.2.2.2

Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e - external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >i 192.168.1.0        192.168.3.254   0          100        0       ?

* >i 192.168.2.0        192.168.3.254   0          100        0       ?

* >i 192.168.3.0        192.168.3.254   0          100        0       ?

 dis ip routing-table 

Destinations : 15       Routes : 15

Destination/Mask   Proto   Pre Cost        NextHop         Interface

192.168.1.0/24     BGP     255 0           192.168.3.254   GE1/0/1

192.168.2.0/24     BGP     255 0           192.168.3.254   GE1/0/1

192.168.3.0/24     Direct  0   0           192.168.3.1     GE1/0/1

192.168.3.0/32     Direct  0   0           192.168.3.1     GE1/0/1

192.168.3.1/32     Direct  0   0           127.0.0.1       InLoop0

192.168.3.255/32   Direct  0   0           192.168.3.1     GE1/0/1




解决方法

1、需要RT、RD值的方式引入路由,才能在BGP中传递,不能使用route-replicate方式。

2、用 peer 192.168.3.1 next-hop-local修改下一跳地址,修改后需要reset BGP进程,让BGP重新建立学习路由。

【附】

SWB上主要配置:

#

ip vpn-instance vrf1

 route-distinguisher 100:100

 vpn-target 100:100 300:300 import-extcommunity

 vpn-target 100:100 export-extcommunity

#

ip vpn-instance vrf2

 route-distinguisher 200:200

 vpn-target 200:200 import-extcommunity

 vpn-target 200:200 export-extcommunity

#

ip vpn-instance vrf3

 route-distinguisher 300:300

 vpn-target 100:100 200:200 300:300 import-extcommunity

 vpn-target 300:300 export-extcommunity

#

#

bgp 100

 #

 ip vpn-instance vrf1

  #

  address-family ipv4 unicast

   import-route direct

 #

 ip vpn-instance vrf2

  #

  address-family ipv4 unicast

   import-route direct

 #

 ip vpn-instance vrf3

  peer 192.168.3.1 as-number 100

  #

  address-family ipv4 unicast

   import-route direct

   peer 192.168.3.1 enable

   peer 192.168.3.1 next-hop-local

#

SWA上主要配置:

#

bgp 100

 peer 192.168.3.254 as-number 100

 #

 address-family ipv4 unicast

  peer 192.168.3.254 enable

#



该案例对您是否有帮助:

您的评价:1

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

作者在2021-09-24对此案例进行了修订
0 个评论

该案例暂时没有网友评论

编辑评论

举报

×

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

侵犯我的权益

×

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

泄露了我的隐私

×

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

侵犯了我企业的权益

×

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

抄袭了我的内容

×

原文链接或出处

诽谤我

×

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

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

×

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

不规范转载

×

举报说明

提出建议

    +

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

确定

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

注册后可访问此模块

跳转hclhub

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