文档详情

BGP路径选择的控制——局部偏爱属性案例.doc

发布:2017-07-03约2.17万字共4页下载文档
文本预览下载声明
操纵BGP路径选择---local?preference属性案例 HYPERLINK /showpic.html \l blogid=56fdccdb0100075jurl=/orignal/56fdccdbe506e09720ab8 \t _blank 本地优先级(local pref)属性是分配给路由的一种优先级度量,用于和到同一目的地的其他路由相比较。这是BGP路由处理中的第二优先属性(WEIGHT是第一优先属性)。Local Pref属性只在本AS内部有效,不会被传送到EBGP邻居上。本地优先级越高,路由优先级越高。 ? 以上案例中,我们通过对R3的配置,设置从R1学到的的本地优先级(Localpref)设置为200,由于缺省的值为100,AS200中所有的路由器都会选择R3到达。 ? ? //// r1 //// int f2/0 ? ip ad ? int f3/0 ? ip ad ? int lo0 ? ip ad ? int lo1 ? ip ad ? router bgp 100 ? no syn ? neighbor remote-as 200 ? neighbor remote-as 200 ? network ? network ? ? ? //// r2 //// int f2/0 ? ip ad ? int f4/0 ? ip ad ? router os 1 ? netw 55 a 0 ? passive-interface f2/0 ? router bgp 200 ? no syn ? neighbor remote-as 100 ? neighbor remote-as 200 ? neighbor remote-as 200 ? neighbor next-hop-self ? ? //// r3 //// int f3/0 ? ip ad ? int f5/0 ? ip ad ? router os 1 ? netw 55 a 0 ? passive-interface f3/0 ? router bgp 200 ? no syn ? neighbor remote-as 100 ? neighbor remote-as 200 ? neighbor next-hop-self ? neighbor remote-as 200 ? neighbor route-map localpref in ? access-list 1 permit 55 ? route-map localpref permit 10 ? match ip ad 1 ? set local-pref 200 route-map localpref permit 20 ? set local-pref 100 ? //// r4 //// int f4/0 ? ip ad ? int f5/0 ? ip ad ? int lo0 ? ip ad ? router os 1 ? netw 55 a 0 ? router bgp 200 ? no syn ? neighbor remote-as 200 ? neighbor remote-as 200 ? netw ? ? ? ? 验证: //// r4 //// r4#sh ip bgp ?? Network????????? Next Hop??????????? Metric LocPrf Weight Path *i????????? ??????????????? 0??? 200????? 0 100 i * i????????? ??????????????? 0??? 100????? 0 100 i *i???????????????? ??????????????? 0??? 100????? 0 100 i * ????????? ????????????????? 0???????? 32768 i ? ? r4#sh ip ro B??? /8 [200/0] via , 00:02:20 B??? /8 [200/0] via , 00:02:24 ???? /24 is subnetted, 1 subnets C?????? is directly connected, Loopback0 O??? /24 [110/128] via , 00:04:35, Serial5/0 O??? /24 [110/128] via , 00:04:35, Serial4/0 C??? /24 is directly connected, Serial5/0
显示全部
相似文档