BGP的各种属性配置_第1页
BGP的各种属性配置_第2页
BGP的各种属性配置_第3页
BGP的各种属性配置_第4页
BGP的各种属性配置_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

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

文档简介

1、BGP的各种属性配置 日期:2009-5-6 浏览次数: 1788出处:51cto blogLab 31. Configuring BGP Summarization实验目的:1、掌握使用指向NULL0接口的静态路由的汇总配置方法。2、掌握使用聚合属性的路由汇总配置方法。R1(config)#ip route 172.16.0.0 255.255.252.0 null 0R1(config)#router bgp 64512R1(config-router)#aggregate-address 172.16.0.0 255.255.252.0 summary-onlyLab 33. BGP N

2、eighbor Authentication实验目的:1、掌握其于MD5的BGP对等体认证配置。R1(config)#router bgp 64512R1(config-router)#neighbor 10.1.255.2 password cisco123 R2(config)#router bgp 64513R2(config-router)#neighbor 10.1.255.1 password cisco123 Lab 34. Configuring BGP Local Preference实验目的:1、理解掌握BGP的本地优选属性概念和配置方法。2、本地优选的属性默认值为100,

3、较高值的路径会被优先选择。3、本地优先属性,决定离开本自治系统最佳的路径。(BGP在选择最佳路由时,并不会考具体链路的带宽。为了解决这一问题,可以在本地配置“本地优先”来确定数据流如何流出本自治系统。BGP会优先选择本地优先属性值较高的路由。)R4(config)#router bgp 64513R4(config-router)#bgp default local-preference 200R4(config-router)#exitR4(config)#(BGP在向IBGP对等体通告路由时,其下一跳不变,这种机制被称为BGP的下一跳属性.)R4(config)#router bgp 64

4、513R4(config-router)#neighbor 10.1.1.1 next-hop-selfLab 35. Using Route Maps to Configuring BGP Local Preference 实验目的:1、掌握基于route-map的本地优先配置方法。2、使用route-map配置可以定置基于目标网络的本地优先。(本地优先会影响数据流如何流出本地自治系统。BGP的选路规则:EBGP对等体通告的路由优于IBGP对等体通告的路由。)R4(config)#R4(config)#route-map set_lp permit 10R4(config-route-map

5、)#match ip address 1R4(config-route-map)#set local-preference 200R4(config-route-map)#exitR4(config)#R4(config)#route-map set_lp permit 20R4(config-route-map)#exitR4(config)#R4(config)#router bgp 64513R4(config-router)#neighbor 192.168.2.2 route-map set_lp in R4(config-router)#exitR4(config)#exitR4#

6、R4#clear ip bgp * soft inR4#Lab 36. Configuring BGP Multi-Exit Discriminator实验目的:1、理解MED属性能够影响,其它的自治系统的数据流如何流入本地自治系统。2、掌握基于route-map的MED配置方法。(MED属性可以实现:影响其它的自治系统的数据流,如何流入本地自治系统。根据R2(config)#R2(config)#route-map set_med permit 10R2(config-route-map)#match ip address 1R2(config-route-map)#set metric 1

7、00R2(config-route-map)#exitR2(config)#R2(config)#route-map set_med permit 20R2(config-route-map)#exitR2(config)#R2(config)#router bgp 64512R2(config-router)#neighbor 192.168.1.2 route-map set_med out R2(config-router)#exitR2(config)#R2#R2#clear ip bgp * soft outR2#Lab 37. Configuring BGP Weight实验目的:

8、1、当本地出口路由器,有多条外出自治系统的链路时,应用权重(Weight)属性能够决定数据流从本地路由器哪条出口链路流出本地自治系统.2、权重(Weight)属性为Cisco私有属性。(BGP的选路规则:1、最先收到路由优先于后收到的路由。2、优先选择BGP的Router-ID较低的路由。)R1(config)#router bgp 64512R1(config-router)#neighbor 192.168.4.1 weight 100R1(config-router)#neighbor 192.168.1.2 weight 50R1(config-router)#exitR1#clear

9、 ip bgp * softR1(config)#R1(config)#route-map set_weight permit 10R1(config-route-map)#match ip address 1R1(config-route-map)#set weight 100R1(config-route-map)#exitR1(config)#R1(config)#R1(config)#route-map set_weight permit 20R1(config-route-map)#exitR1(config)#R1(config)#router bgp 64512R1(config

10、-router)#neighbor 192.168.4.1 route-map set_weight in R1(config-router)#exitR1(config)#exitR1#clear ip bgp * softR1#Lab 38. Affects the BGP Routing By Path Prepend实验目的:1、掌握如何配置路径欺骗影响BGP的路由选择。2、理解BGP的路径欺骗是MED的替代解决方法,但是其适用范围较小,只能在有限的网络环境下配置使用。(BGP的选路规则:优先选择AS-PATH最短的路径。)R3(config)#R3(config)#route-map

11、 set_prepend permit 10R3(config-route-map)#match ip address 1R3(config-route-map)#set as-path prepend 64514 64514R3(config-route-map)#exitR3(config)#R3(config)#route-map set_prepend permit 20R3(config-route-map)#exitR3(config)#R3(config)#router bgp 64514R3(config-router)#neighbor 192.168.2.1 route-m

12、ap set_prepend out R3(config-router)#exitR3(config)#exitR3#R3#clear ip bgp * soft outR3#(需要注意的是:在set as-path prepend后添加的AS号,最好是本地自治系统号,否则可能会产生无效路由。)Lab 39. Using Route Tag to Store BGP AS-Path实验目的:1、解决BGP与IGP在做路由重发布时,BGP AS-PATH属性丢失的问题。2、掌握使用路由标记存储BGP路径属性配置方法。R2(config)#router ospf 1R2(config-router

13、)#redistribute bgp 64513 subnetsR2(config-router)#exitR2(config)#R2(config)#router bgp 64513R2(config-router)#redistribute ospf 1 match external internal R2(config-router)#(将OSPF中的内部与外部类型的路由重发布到BGP 64513的自治系统。) R3(config)#router bgp 64513R3(config-router)#redistribute ospf 1 match internal external

14、R3(config-router)#exitR3(config)#R3(config)#router ospf 1R3(config-router)#redistribute bgp 64513 subnetsR3(config-router)#exitR3(config)#exit产生此AS-PATH路径信息丢失的主要原因是:由于R2路由器把BGP路由协议重发布到OSPF中,而OSPF不能够识别BGP的路由AS-PATH属性。所以在R4上查看重发布路由的AS-PATH是不完整。解决这个问题的关键:由于路由标记可以被所有的路由协议识别,因此,可以在重发布前将BGP的AS-PATH转存到路由标记

15、中,然后在R4路由器上再发路由标识中存储的AS-PATH取出来还原到BGP的路由中。实施路由标记的配置:R2(config)#route-map SET_TAG permit 10R2(config-route-map)#set automatic-tag/(设置自动计算路由标记。主要计算结果为AS-PATH的属性值) R2(config-route-map)#exitR2(config)#R2(config)#router bgp 64513R2(config-router)#table-map SET_TAG/(配置将BGP的扩展属性,映射到路由表中。其主要目的是通过SET_TAG的路由图

16、的过滤,将AS-PATH将属性存储到标记中。)R3(config)#route-map GET_TAG permit 10R3(config-route-map)#set as-path tag/(将AS-PATH属性从路由标记中取出,并还原到BGP的路由数据库中。) R3(config-route-map)#exitR3(config)#router bgp 64513R3(config-router)#redistribute ospf 1 match external internal route-mapGET_TAG/(在路由重发布时,完成AS-PATH的转存工作。)解决路由起源信息不

17、完整R3(config)#route-map SET_ORIGIN permit 10R3(config-route-map)#set origin igp /(设置相应的起源属性为IGP。) R3(config-route-map)#exitR3(config)#R3(config)#router bgp 64513R3(config-router)#neighbor 192.168.2.2 route-map SET_ORIGIN out /(调用相应的route-map设置起源属性。)Lab 40. Using Distribute-list to Filtering BGP Routi

18、ng实验目的:1、掌握使用distribute-list过滤BGP的路由。R2(config)#R2(config)#router bgp 64512R2(config-router)#neighbor 10.1.255.2 distribute-list 1 out Lab 41. Using Route-Map to Filtering BGP Routing实验目的:1、掌握使用Route-Map过滤BGP的路由。R2(config)#access-list 1 permit anyR2(config)#R2(config)#route-map bgpfilter permit 10R2(config-route-map)#match ip address 1R2(config-route-map)#exitR2(config)#R2(config)#router bgp 64512R2(config-router)#neighbor 10.1.255.2 rou

温馨提示

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

评论

0/150

提交评论