下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、BGP实验之操纵BGP路径选择 local preference属性案例(配图+详细验证过程) 作者:JACKSON参考:CISCO中文社区 感谢JACKSON支持原创本地优先级(local pref)属性是分配给路由的一种优先级度量,用于和到同一目的地的其 他路由相比较。这是BGP路由处理中的第二优先属性(WEIGHT是第一优先属性)。Local Pref 属性只在本AS内部有效,不会被传送到EBGP邻居上。本地优先级越高,路由优先级越高。以上案例中,我们通过对R3的配置,设置从R1学到的1.0.0.0的本地优先级(Localpref) 设置为200,由于缺省的值为100,AS200中所有的
2、路由器都会选择R3到达1.0.0.0。/ r1 /int f2/0ip ad 192.1.1.1 255.255.255.0int f3/0ip ad 193.1.1.1 255.255.255.0 int lo0int lo1ip ad 2.2.2.2 255.255.255.0router bgp 100no synneighbor 192.1.1.2 remote-as 200neighbor 193.1.1.3 remote-as 200network 1.0.0.0network 1.0.0.0/ r2 /int f2/0ip ad 192.1.1.2 255.255.255.0in
3、t f4/0ip ad 194.1.1.2 255.255.255.0router os 1netw 0.0.0.0 255.255.255.255 a 0passive-interface f2/0router bgp 200no synneighbor 192.1.1.1 remote-as 100neighbor 194.1.1.4 remote-as 200neighbor 195.1.1.3 remote-as 200neighbor 194.1.1.4 next-hop-self/ r3 /int f3/0ip ad 193.1.1.3 255.255.255.0int f5/0i
4、p ad 195.1.1.3 255.255.255.0router os 1netw 0.0.0.0 255.255.255.255 a 0passive-interface f3/0router bgp 200no synneighbor 193.1.1.1 remote-as 100neighbor 195.1.1.4 remote-as 200neighbor 195.1.1.4 next-hop-selfneighbor 194.1.1.2 remote-as 200neighbor 193.1.1.1 route-map localpref inaccess-list 1 perm
5、it 1.0.0.0 0.255.255.255route-map localpref permit 10match ip ad 1set local-pref 200route-map localpref permit 20set local-pref 100/ r4 /int f4/0ip ad 194.1.1.4 255.255.255.0int f5/0ip ad 195.1.1.4 255.255.255.0int lo0ip ad 4.4.4.4 255.255.255.0 router os 1router bgp 200no synneighbor 194.1.1.2 remo
6、te-as 200neighbor 195.1.1.3 remote-as 200netw 4.0.0.0验证:/ r4 /r4#sh ip bgpNetwork Next Hop Metric LocPrf Weight Path*i1.0.0.0 195.1.1.3 0 200 0 100 i* i2.0.0.0 195.1.1.3 0 100 0 100 i*i 194.1.1.2 0 100 0 100 i* 4.0.0.0 0.0.0.0 0 32768 ir4#sh ip roB 1.0.0.0/8 200/0 via 195.1.1.3, 00:02:20B 2.0.0.0/8
7、200/0 via 194.1.1.2, 00:02:244.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback0O 193.1.1.0/24 110/128 via 195.1.1.3, 00:04:35, Serial5/0O 192.1.1.0/24 110/128 via 194.1.1.2, 00:04:35, Serial4/0C 195.1.1.0/24 is directly connected, Serial5/0C 194.1.1.0/24 is directly connect
8、ed, Serial4/0 r2#sh ip bgpNetwork Next Hop Metric LocPrf Weight Path *i1.0.0.0 193.1.1.1 0 200 0 100 i192.1.1.1 0 0 100 ii2.0.0.0 193.1.1.1 0 100 0 100 i* 192.1.1.1 0 0 100 i*i4.0.0.0 194.1.1.4 0 100 0 i r2#sh ip roB 1.0.0.0/8 200/0 via 193.1.1.1, 00:06:00B 2.0.0.0/8 20/0 via 192.1.1.1, 00:06:044.0.0.0/8 is variably subnetted, 2 subnets, 2 masksO 4.4.4.4/32 110/65 via 194.1.1.4, 00:08:20, Serial4/0B 4.0.0.0/8 200/0 via 194.1.1.4, 00:06:55O 193.1.1.0/24 110/192 via 194.1.1.4, 00:08:20, Serial4/0C 192.1.1.0/24
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论