BGP路由策略与选路控制

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

BGP路由策略与选路控制

一、实验目标:

根据BGP路由选择原则,用BGP属性控制BGP路由

二、网络拓扑图:

三、配置:

IP地址如图所示

用OSPF实现IGP路由可达

BGP配置如下:no synchronization

No auto-summary

Update-source lo0

Next-hop-self

R3和R4为同簇路由反射器,R1,R2分别为R3和R4的客户端

R3,R4建立普通IBGP邻居

R3,R4都发布10.0.0.0/16,10.2.0.0/16,10.4.0.0/16,10.3.0.0/16到BGP

R5,R6发布10.5.0.0/16,10.6.0.0/16到BGP

R1与R5,R2与R6建立EBGP

现分析下面路由

RT1#show ip bgp

Network Next Hop Metric LocPrf Weight Path

* i10.5.0.0/16 10.0.0.2 0 100 0 65001 i

*> 10.0.15.2 0 0 65001 i

* i10.6.0.0/16 10.0.0.2 0 100 0 65001 i

*> 10.0.15.2 0 0 65001 i 根据EBGP路由优先于IBGP路由

RT1#show ip bgp 10.5.0.0

BGP routing table entry for 10.5.0.0/16, version 11

Paths: (2 available, best #2, table Default-IP-Routing-Table)

Advertised to update-groups:

2

65001

10.0.0.2 (metric 101) from 10.0.0.4 (10.0.0.4)

Origin IGP, metric 0, localpref 100, valid, internal

Originator: 10.0.0.2, Cluster list: 10.0.0.4 来自IBGP10.0.0.4反射的路由65001

10.0.15.2 from 10.0.15.2 (10.5.0.1) 来自EBGP10.0.15.2的路由

Origin IGP, metric 0, localpref 100, valid, external, best

RT2#show ip bgp R2同R1

Network Next Hop Metric LocPrf Weight Path

*> 10.5.0.0/16 10.0.26.2 0 0 65001 i

* i 10.0.0.1 0 100 0 65001 i

*> 10.6.0.0/16 10.0.26.2 0 0 65001 i

* i 10.0.0.1 0 100 0 65001 i

RT2#show ip bgp 10.5.0.0

BGP routing table entry for 10.5.0.0/16, version 10

Paths: (2 available, best #1, table Default-IP-Routing-Table)

Advertised to update-groups:

2

65001

10.0.26.2 from 10.0.26.2 (10.6.0.1)

Origin IGP, metric 0, localpref 100, valid, external, best

65001

10.0.0.1 (metric 101) from 10.0.0.3 (10.0.0.3)

Origin IGP, metric 0, localpref 100, valid, internal

Originator: 10.0.0.1, Cluster list: 10.0.0.3

RT3#show ip bgp

Network Next Hop Metric LocPrf Weight Path

* i10.5.0.0/16 10.0.0.2 0 100 0 65001 i

* i 10.0.0.2 0 100 0 65001 i

*>i 10.0.0.1 0 100 0 65001 i

* i10.6.0.0/16 10.0.0.2 0 100 0 65001 i

* i 10.0.0.2 0 100 0 65001 i

*>i 10.0.0.1 0 100 0 65001 i

根据到达下一跳IGP开销小的

RT3#show ip bgp 10.5.0.0

BGP routing table entry for 10.5.0.0/16, version 18

Paths: (3 available, best #3, table Default-IP-Routing-Table)

Advertised to update-groups:

1 2

65001, (Received from a RR-client)

10.0.0.2 (metric 201) from 10.0.0.2 (10.0.0.2) 来自IBGP10.0.0.2

Origin IGP, metric 0, localpref 100, valid, internal

65001

10.0.0.2 (metric 201) from 10.0.0.4 (10.0.0.4)

Origin IGP, metric 0, localpref 100, valid, internal

Originator: 10.0.0.2, Cluster list: 10.0.0.4 10.0.0.4反射得来,只反射最佳路由65001, (Received from a RR-client)

10.0.0.1 (metric 101) from 10.0.0.1 (10.0.0.1) 来自IBGP10.0.0.1

Origin IGP, metric 0, localpref 100, valid, internal, best

注:R3上该路由的最佳路由来自RT1,所以不会反射回给RT1

同理,RT4不会反射给RT2

RT4#show ip bgp R4同R3

Network Next Hop Metric LocPrf Weight Path

*>i10.5.0.0/16 10.0.0.2 0 100 0 65001 i

* i 10.0.0.1 0 100 0 65001 i

* i 10.0.0.1 0 100 0 65001 i

*>i10.6.0.0/16 10.0.0.2 0 100 0 65001 i

* i 10.0.0.1 0 100 0 65001 i

* i 10.0.0.1 0 100 0 65001 i

RT4#show ip bgp 10.5.0.0

BGP routing table entry for 10.5.0.0/16, version 8

Paths: (3 available, best #1, table Default-IP-Routing-Table)

Advertised to update-groups:

1 2

65001, (Received from a RR-client)

10.0.0.2 (metric 101) from 10.0.0.2 (10.0.0.2)

Origin IGP, metric 0, localpref 100, valid, internal, best

相关文档
最新文档