交换路由CCIE之路――BGP路由策略及选路控制_第1页
交换路由CCIE之路――BGP路由策略及选路控制_第2页
交换路由CCIE之路――BGP路由策略及选路控制_第3页
交换路由CCIE之路――BGP路由策略及选路控制_第4页
交换路由CCIE之路――BGP路由策略及选路控制_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、实验 BGP路由策略及选路控制一实验拓扑图二实验选路需求(1) (2) (3) (4) 三分析要满足上面的需求可以通过改变BGP路由的属性值进行路径的选择,因此可以通过三种方法,一改变权重,二改变本地优先级,三改MED。下面用具体实验说明四实验IGP路由配置r1(config#router ospf 1r1(config-router#passive-interface lo 0r1(config-router#redistribute connected subnets metric 1000 metric-type 1 /直连重发布r2(config#router ospf 1r2(con

2、fig-router#passive-interface lo 0r2(config-router#redistribute connected subnets metric 1000 metric-type 1r2(config-router#exitr3(config#router ospf 1r3(config-router#passive-interface lo 0r3(config-router#passive-interface e3/0r3(config-router#exitr4(config#router ospf 1r4(config-router#passive-int

3、erface lo 0r4(config-router#passive-interface e3/0r4(config-router#passive-interface e3/1r4(config-router#exitr5(config#router ospf 1 r5(config-router#passive-interface s0/0 /network+passive发布边界网段r5(config-router#passive-interface lo 0r5(config-router#exitr6(config#router ospf 1r6(config-router#pass

4、ive-interface lo 0r6(config-router#passive-interface s0/0r6(config-router#passive-interface e3/0r6(config-router#endBGP邻居配置r1(config#router bgp 65000r1(config-router#no synchronization r1(config-router#no aur1(config-router#endr2(config#router bgp 65000r2(config-router#no sr2(config-router#no au r2(

5、config-router#endr3(config#router bgp 65000r3(config-router#nei fuckjiuge peer-group r3(config-router#nei fuckjiuge remote-as 65000 r3(config-router#nei fuckjiuge update-source lo 0 r3(config-router#nei fuckjiuge next-hop-sr3(config-router#nei fuckjiuge route-reflector-client r3(config-router#no syn

6、chronization r3(config-router#no aur3(config-router#endr4(config#router bgp 65000r4(config-router#no synchronization r4(config-router#no aur4(config-router#nei fuckjiuge peer-group r4(config-router#nei fuckjiuge remote-as 65000r4(config-router#nei fuckjiuge update-source lo 0r4(config-router#nei fuc

7、kjiuge next-hop-self r4(config-router#nei fuckjiuge route-reflector-client r5(config#router bgp 65001r5(config-router#no synchronization r5(config-router#no aur5(config-router#endr6(config#router bgp 65001r6(config-router#no synchronization r6(config-router#no aur6(config-router#end路由注入r3(config#rou

8、ter bgp 65000r3(config-router#endr4(config#router bgp 65000r4(config-router#endr5(config#router bgp 65001r5(config-router#endr6(config#router bgp 65001选路要求的满足如下:r6(config#route-map fuckjiuge permit 10r6(config-route-map#match ip ad 1r6(config-route-map#set weight 100 /设置权重为100,默认为0r6(config-route-ma

9、p#exitr6(config#route-map fuckjiuge permit 20 /由于有默认拒绝所以必须加这一条r6(config#router bgp 65001r6(config-router#查路由表100 100 65000 I Paths: (2 available, best #1, table Default-IP-Routing-TableFlag: 0x940Advertised to update-groups:1 65000Origin IGP, metric 0, localpref 100, weight 100, valid, internal, bes

10、t /由选择原则第一条选出最佳路由65000Origin IGP, localpref 100, valid, externalr5(config#route-map fuckjiuge permit 10r5(config-route-map#match ip ad prefix-list 1r5(config-route-map#set local-preference 200 /设置本地优先级为200,默认为100r5(config-route-map#exitr5(config#route-map fuckjiuge permit 20r5(config-route-map#exitr

11、5(config#router bgp 65001r5#show ip bgp Network Next Hop Metric LocPrf Weight Path*200 0 65000 I /优先级变200了r6#show ip bgp Network Next Hop Metric LocPrf Weight Path200 0 65000 I r2(config#route-map fuckjiuge permit 10r2(config-route-map#match ip ad 1r2(config-route-map#set metric 5 /MED值设为5默认为0。越小越好r

12、2(config-route-map#exitr2(config#route-map fuckjiuge permit 20r2(config-route-map#exitr2(config#router bgp 65000r6#show ip bgp Network Next Hop Metric LocPrf Weight Path5 0 65000 iPaths: (2 available, best #1, table Default-IP-Routing-TableFlag: 0x940Advertised to update-groups:1 65000Origin IGP, me

13、tric 0, localpref 100, valid, internal, best/这里可以看出默认本地优先级为100,默认MED为065000Origin IGP, metric 5, localpref 100, valid, external既然能在RT2的出口上改值那么能不能在路由进RT6时改MED值呢?答案是可以的,因为既然能够在进站做就可以在出站做。同理关于本地优先级,权重的修改也能在出接口上做配置只是要配置的路由器不同r6(config#route-map fuckjiuge2 permit 10r6(config-route-map#match ip ad 1r6(con

14、fig-route-map#set metric 5r6(config-route-map#exitr6(config#route-map fuckjiuge2 permit 20r6(config-route-map#exitr6(config#router bgp 65001 inr6#show ip bgp Network Next Hop Metric LocPrf Weight Path5 0 65000 i需求(2)的满足方法和上面一样只是做配置的路由器不同,这里就用本地优先来做r6(config#route-map fuckjiuge1 permit 10r6(config-ro

15、ute-map#match ip ad prefix-list 1r6(config-route-map#set local-preference 200r6(config-route-map#exitr6(config#route-map fuckjiuge1 permit 20r6(config#router bgp 65001r6(config-router#endr5#show ip bgp Network Next Hop Metric LocPrf Weight Pathr6#show ip bgpNetwork Next Hop Metric LocPrf Weight Path

16、*我还发现我开始的那个映射fuckjiuge2没有No掉,但它不会影响结果,那是因为在一个接口的一个方向上只能有一个映射关系,这里说的接口是指邻居。因此前一个映射关系会被第二个取代,不会影响结果r6#show run | b route-mapfuckjiuge1 in那么我要是把第二个映射再no掉,第一个会不会又出现呢?经过实验证实不会。实际上这里不应该用几个映射,要是一定要两个要求都满足可以在一个映射中进行多种动作。通过本地优先来完成选路r1(config#route-map fuckjiuge permit 10r1(config-route-map#match ip ad 1r1(co

17、nfig-route-map#set local-preference 200r1(config-route-map#exitr1(config#route-map fuckjiuge permit 20r1(config-route-map#exitr1(config#router bgp 65000r2(config#route-map fuckjiuge permit 10r2(config-route-map#match ip ad 1r2(config-route-map#set local-preference 200r2(config-route-map#exitr2(confi

18、g#route-map fuckjiuge permit 20r2(config-route-map#exitr2(config#router bgp 65000r2(config-router#endr3#show ip bgpNetwork Next Hop Metric LocPrf Weight Pathr4#show ip bgpNetwork Next Hop Metric LocPrf Weight Path这里之所以都只有一条那是因为从RT1 RT2只传了一条最佳路由r1#show ip bgpNetwork Next Hop Metric LocPrf Weight Path

19、r2#show ip bgp Network Next Hop Metric LocPrf Weight Path通过MED值来选路r5(config#route-map med permit 0 r5(config-route-map#match ip ad prefix-list 2r5(config-route-map#set metric 5r5(config-route-map#exitr5(config#route-map med permit 10r5(config-route-map#exitr5(config#router bgp 65001r6(config#route-m

20、ap med permit 10r6(config-route-map#match ip ad prefix-list 2r6(config-route-map#set metric 5r6(config-route-map#exitr6(config#route-map med permit 20r6(config-route-map#exitr6(config#router bgp 65001r1#show ip bgp Network Next Hop Metric LocPrf Weight Pathr2#show ip bgpNetwork Next Hop Metric LocPr

21、f Weight Pathr3#show ip bgpNetwork Next Hop Metric LocPrf Weight Path满足上面4个需求后测试Type escape sequence to abort.Type escape sequence to abort.Type escape sequence to abort.Type escape sequence to abort.Type escape sequence to abort.Type escape sequence to abort.组网二拓扑图实验分析要使AS65001去其他AS都从RT5到RT1,可以进行权重的修改,将所有从RT1来的路由权重都加大,就可以了,当然这只能改变RT5的数据选路,要改变整个AS65001,可以通过把本地优先级都加大就行了。AS65002也和上面同样的做法就行了。前面的路由配置与组网一一样在没做控制配置前的BGP表如下r5#show ip bgpNetwork

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论