BGP路由反射器

由于水平分割,单个AS中除了实现IBGP全互联,否则无法使所有IBGP路由器学习到完整的BGP路由

两种角色  RR 路由反射器  Client  RR客户端

RR会将学习到的路由反射出去,从而使得IBGP路由在AS内传播无需简历IBGP全互联

指定RR的同时需要指定其Client

路由反射规则

从自己非Client对等体学到的IBGP路由,会反射给所有客户

从自己Client对等体学到的IBGP路由转发给所有人

反射时只将自己使用的最优BGP路由进行反射

RR防环

RR设定使得IBGP水平分割原则失败,导致环路产生,所以RR会为BGP路由添加两个特殊的路劲的属性来避免出现环路

Originator_ID

Cluster_List

可选非过度类型

Originator_ID

RR将一条BGP路由进行反射时,会在反射出去的路由中增加Originator_ID,其值为本地AS中通告该路由的BGP的路由器Router ID

有多个RR时,Originator_ID为第一个RR创建,因为只有一个RR会对该路由信息进行处理,当BGP路由器收到带有自己Router ID的路由时,会忽略关于该路由的更新

Cluster_List

路由反射簇包括反射器RR及其Client,一个AS允许存在多个路由反射簇

每一个簇有唯一的簇ID 缺省为Router ID

每当RR反射路由时就会将自己的簇ID添加进去

R1为R2的client R2为R3client R3为R4的client

[R2]bgp 64511

[R2-bgp] peer 10.0.12.1 reflect-client

[R3]bgp 64511

[R3-bgp] peer 10.0.23.2 reflect-client

[R4]bgp 64511

[R4-bgp] peer 10.0.34.3 reflect-client

验证  Orginator_ID  防环

缺省情况下,R2 发布 BGP 路由后,该路由将被 R2 直接通告给 R4,另一方面也会通过 R3 反 射给 R4,此时 R4 将优选 R2 直接通告过来的路由,从而不会再将 R3 反射过来的路由再反射回给 R2。因此,我们需要在 R2 上部署路由策略,使 R2 不直接向 R4 通告 10.2.2.0/24 路由。

[R2]acl number 2000

[R2-acl-basic-2000] rule 5 permit

[R2-acl-basic-2000] quit

[R2]route-policy bgp deny node 10

[R2-route-policy] if-match acl 2000

[R2]bgp 64511

[R2-bgp] peer 10.0.24.4 route-policy bgp export

通告网络

[R2]bgp 64511

[R2-bgp]network 10.2.2.0 24

[R2]display bgp routing-table 10.2.2.0


 BGP local router ID : 10.0.2.2

 Local AS number : 64511

 Paths:   1 available, 1 best, 1 select

 BGP routing table entry information of 10.2.2.0/24:

 Network route.

 From: 0.0.0.0 (0.0.0.0)

 Route Duration: 00h00m32s 

 Direct Out-interface: LoopBack1

 Original nexthop: 10.2.2.2

 Qos information : 0x0

 AS-path Nil, origin igp, MED 0, pref-val 0, valid, local, best, select, pre 0

 Advertised to such 2 peers:   只通告给了R3 R1

    10.0.23.3

    10.0.12.1



[R3]display bgp  routing-table 10.2.2.0


 BGP local router ID : 10.0.3.3

 Local AS number : 64511

 Paths:   1 available, 1 best, 1 select

 BGP routing table entry information of 10.2.2.0/24:

 RR-client route.

 From: 10.0.23.2 (10.0.2.2)

 Route Duration: 00h02m00s 

 Relay IP Nexthop: 0.0.0.0

 Relay IP Out-Interface: GigabitEthernet0/0/0

 Original nexthop: 10.0.23.2

 Qos information : 0x0

 AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, bes

t, select, active, pre 255

 Advertised to such 1 peers:   反射器 转发出去

    10.0.34.4



[R4]display bgp routing-table 10.2.2.0


 BGP local router ID : 10.0.4.4

 Local AS number : 64511

 Paths:   1 available, 1 best, 1 select

 BGP routing table entry information of 10.2.2.0/24:

 RR-client route.

 From: 10.0.34.3 (10.0.3.3)

 Route Duration: 00h02m43s 

 Relay IP Nexthop: 10.0.24.2

 Relay IP Out-Interface: GigabitEthernet0/0/1

 Original nexthop: 10.0.23.2

 Qos information : 0x0

 AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, bes

t, select, active, pre 255, IGP cost 2

 Originator:  10.0.2.2

 Cluster list: 10.0.3.3

 Advertised to such 1 peers:   反射器往外转发

    10.0.24.2

但是R2并没有响应 Orginator_ID 属性值与本地的 Router ID 一致,R2 忽略了该路由通告

[R2]display bgp peer 10.0.24.4 verbose

BGP Peer is 10.0.24.4,  remote AS 64511 

Type: IBGP link

BGP version 4, Remote router ID 10.0.4.4

Update-group ID: 2 

BGP current state: Established, Up for 00h17m04s

BGP current event: RecvKeepalive

BGP last state: OpenConfirm

BGP Peer Up count: 1


 Received: Total 20 messages

 Update messages                 1

 Open messages                         1

 KeepAlive messages                 18

 Notification messages          0

 Refresh messages                 0

 Sent: Total 21 messages

 Update messages                 0

 Open messages                         3

 KeepAlive messages                 18

 Notification messages          0

 Refresh messages                 0

验证 Cluster_List 防环

取消 R2的路由发布 通过R1进行路由发布

[R1]bgp 64511

[R1-bgp]network 10.1.1.0 24

[R1]display bgp routing-table 10.1.1.0 24


 BGP local router ID : 10.0.1.1

 Local AS number : 64511

 Paths:   1 available, 1 best, 1 select

 BGP routing table entry information of 10.1.1.0/24:

 Network route.

 From: 0.0.0.0 (0.0.0.0)

 Route Duration: 00h00m39s 

 Direct Out-interface: LoopBack1

 Original nexthop: 10.1.1.1

 Qos information : 0x0

 AS-path Nil, origin igp, MED 0, pref-val 0, valid, local, best, select, pre 0

 Advertised to such 1 peers:

    10.0.12.2



[R2]display bgp routing-table 10.1.1.0


 BGP local router ID : 10.0.2.2

 Local AS number : 64511

 Paths:   1 available, 1 best, 1 select

 BGP routing table entry information of 10.1.1.0/24:

 RR-client route.

 From: 10.0.12.1 (10.0.1.1)

 Route Duration: 00h01m26s 

 Relay IP Nexthop: 0.0.0.0

 Relay IP Out-Interface: GigabitEthernet0/0/0

 Original nexthop: 10.0.12.1

 Qos information : 0x0

 AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, bes

t, select, active, pre 255

 Advertised to such 1 peers:   开始反射

    10.0.23.3



[R3]display bgp routing-table 10.1.1.0


 BGP local router ID : 10.0.3.3

 Local AS number : 64511

 Paths:   1 available, 1 best, 1 select

 BGP routing table entry information of 10.1.1.0/24:

 RR-client route.

 From: 10.0.23.2 (10.0.2.2)

 Route Duration: 00h02m13s 

 Relay IP Nexthop: 10.0.23.2

 Relay IP Out-Interface: GigabitEthernet0/0/0

 Original nexthop: 10.0.12.1

 Qos information : 0x0

 AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, bes

t, select, active, pre 255, IGP cost 2

 Originator:  10.0.1.1

 Cluster list: 10.0.2.2

 Advertised to such 1 peers:

    10.0.34.4



[R4]display bgp routing-table 10.1.1.0


 BGP local router ID : 10.0.4.4

 Local AS number : 64511

 Paths:   1 available, 1 best, 1 select

 BGP routing table entry information of 10.1.1.0/24:

 RR-client route.

 From: 10.0.34.3 (10.0.3.3)

 Route Duration: 00h02m43s 

 Relay IP Nexthop: 10.0.24.2

 Relay IP Out-Interface: GigabitEthernet0/0/1

 Original nexthop: 10.0.12.1

 Qos information : 0x0

 AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, bes

t, select, active, pre 255, IGP cost 2

 Originator:  10.0.1.1

 Cluster list: 10.0.3.3, 10.0.2.2

 Advertised to such 1 peers:

    10.0.24.2   但是R2并没有响应

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值