[信息与通信]JUSTECHBGP.doc_第1页
[信息与通信]JUSTECHBGP.doc_第2页
[信息与通信]JUSTECHBGP.doc_第3页
[信息与通信]JUSTECHBGP.doc_第4页
[信息与通信]JUSTECHBGP.doc_第5页
已阅读5页,还剩73页未读 继续免费阅读

下载本文档

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

文档简介

EGPBGP 知识点2008-7-4 CCIE 集训营 宋涛1: IBGP PEER试验22:夸路由器建立IBGP 邻居53: EBGP 对等体配置84:在BGP对等体中制定更新源和对等体地址114.1 在IBGP中使用环回口作为更新源及对等体地址114.2 EBGP 建立队等体关系时使用环回口作更新源和队等体地址135.BGP 网络通告156.向BGP通告默认路由157:理解IBGP的防环机制及理解同步原则188:next-hop-self 和 next-hop-unchanged 讲解228.1NEXT-HOP-SELF 解释228.2 NEXT-HOP-UNCHANGED解释229:理解BGP 自动汇总269.1 BGP基本的汇总概念279.2 重分发时的自动汇总2910:BGP路由优选特性3310.1:本地优先级影响出站策略试验3310.2:MED影响进站策略试验4210.3 WEIGHT 影响路由出站试验4310.4添加AS-PATH 影响选路4310.4BGP 后门路由特性4410.5路由抑制4411:BGP汇总试验4611.1 简单的汇总试验46112 汇总后限制明细路由被发送4711.3 汇总时的AS-PATH信息丢失4911.3.1 防止BGP汇总时丢失路径信息4911.4 汇总时作路由属性修改5311.5 汇总路有的路由抑制试验5511.6 BGP 汇总的通告映射5712: BGP团队属性6312.1 公认的团体属性设置6312.2 自定义团体属性6415:BGP 路由过滤6715.1 route-map 过滤6715.2 distribute-list 过滤6715.3 prefix-list 前缀列表过滤6715.4 filter-list6816:BGP 路由反射器7016.1 试验拓扑7016.2 试验目的7016.3 配置步骤7117:对等体组7217.1 试验拓扑7217.2 试验需求7217.3 配置命令7218:过滤专用AS7319:联盟7419.1 试验拓扑7419.2 试验需求7419.3 配置命令7520:CCIE 考试中的LOCAL-AS 和ALLOW-IN参数7620.1 试验拓扑7620.2 试验需求76Bgp basic configurationStep 1 启用BGPRouter bgp xxStep 2 关闭自动汇总No auto-summaryStep 3 配置ROUTER-IDBgp router-id x.x.x.xStep 4 指定对等体Neighbor x.x.x.x remote-as xx这个地址是对等体地址,该地址必须可达Neighbor x.x.x.x update-source loopback xx指明OPEN 和UPDATA 消息的更新源地址是当前设备哪个接口Neighbor x.x.x.x multiple-hop xx /当和PEER 建立EBGP PEER 关系时,如果是非直连用该命令进行TTL 的修改。Step 5 宣告网络Network x.x.x.x mask x.x.x.x1: IBGP PEER试验r2#show tcp brief TCB Local Address Foreign Address (state)6420036C .179 .27942 ESTABR1 !hostname R1!boot-start-markerboot-end-marker!no ip domain lookup!interface Loopback0 ip address !interface Serial1/1 ip address serial restart-delay 0!line con 0 exec-timeout 0 0 logging synchronous!router bgp 1 no synchronization bgp log-neighbor-changes network mask neighbor remote-as 1 no auto-summary!EndR2!hostname R2!interface Loopback0 ip address !interface Serial1/0 ip address serial restart-delay 0!interface Serial2/3 no ip address shutdown serial restart-delay 0!ip classlessno ip http server!line con 0 exec-timeout 0 0 logging synchronous!router bgp 1 no synchronization bgp log-neighbor-changes network mask neighbor remote-as 1 no auto-summary!EndR1#sh ip bgp summary BGP router identifier , local AS number 1BGP table version is 1, main routing table version 11 network entries using 101 bytes of memory1 path entries using 48 bytes of memory1 BGP path attribute entries using 60 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 209 total bytes of memoryBGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer 路由更新表的变化,为0变厚加1 InQ OutQ Up/Down State/PfxRcd显示邻居状态和被学习子网前缀数目 4 1 0 0 0 0 0 never ActiveR1#sh ip bgp summary BGP router identifier , local AS number 1BGP table version is 2, main routing table version 21 network entries using 101 bytes of memory1 path entries using 48 bytes of memory1 BGP path attribute entries using 60 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 209 total bytes of memoryBGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 4 1 4 5 2 0 0 00:00:04 0R1#sh ip bgp BGP table version is 3, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* /24 0 32768 i*i/24 0 100 0 i2:夸路由器建立IBGP 邻居R1!hostname R1!no ip domain lookup!interface Loopback0 ip address !router bgp 1 no synchronization bgp log-neighbor-changes network mask neighbor remote-as 1 no auto-summary!ip route !line con 0 exec-timeout 0 0 logging synchronous!EndR2!hostname R2!no ip domain lookup!interface Loopback0 ip address !interface Serial1/0 ip address !interface Serial1/1 ip address !line con 0 exec-timeout 0 0 logging synchronous!EndR3hostname r3!no ip domain lookup!interface Loopback0 ip address !interface Serial1/0 ip address !router bgp 1 no synchronization bgp log-neighbor-changes network mask neighbor remote-as 1 no auto-summary!ip route !line con 0 exec-timeout 0 0 logging synchronous!end R1#sh ip bgp suBGP router identifier , local AS number 1BGP table version is 5, main routing table version 52 network entries using 202 bytes of memory2 path entries using 96 bytes of memory2 BGP path attribute entries using 120 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 418 total bytes of memoryBGP activity 3/1 prefixes, 3/1 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 4 1 5 5 5 0 0 00:00:56 1R1#sh ip bgp BGP table version is 5, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* /24 0 32768 i*i/24 0 100 0 iR1#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set /24 is subnetted, 1 subnetsC is directly connected, Loopback0 /24 is subnetted, 1 subnetsB 200/0 via , 00:01:32 /24 is subnetted, 2 subnetsS 1/0 via C is directly connected, Serial1/13: EBGP 对等体配置R1 !hostname R1!boot-start-markerboot-end-marker!no ip domain lookup!interface Loopback0 ip address !interface Serial1/1 ip address serial restart-delay 0!line con 0 exec-timeout 0 0 logging synchronous!router bgp 1 no synchronization bgp log-neighbor-changes network mask neighbor remote-as 2 no auto-summary!EndR2!hostname R2!interface Loopback0 ip address !interface Serial1/0 ip address serial restart-delay 0!interface Serial2/3 no ip address shutdown serial restart-delay 0!ip classlessno ip http server!line con 0 exec-timeout 0 0 logging synchronous!router bgp 2 no synchronization bgp log-neighbor-changes network mask neighbor remote-as 1 no auto-summary!EndR1#sh ip bgp summary BGP router identifier , local AS number 1BGP table version is 3, main routing table version 32 network entries using 202 bytes of memory2 path entries using 96 bytes of memory2 BGP path attribute entries using 120 bytes of memory1 BGP AS-PATH entries using 24 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 442 total bytes of memoryBGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 4 2 5 5 2 0 0 00:00:06 1R1#sh ip bgp BGP table version is 3, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* /24 0 32768 i* /24 0 0 2 iR1#sh ip bgp BGP routing table entry for /24, version 3Paths: (1 available, best #1, table Default-IP-Routing-Table) Not advertised to any peer 2 from () Origin IGP, metric 0, localpref 100, valid, external, bestR1#R1#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set /24 is subnetted, 1 subnetsC is directly connected, Loopback0 /24 is subnetted, 1 subnetsB 20/0 via , 00:01:50 /24 is subnetted, 1 subnetsC is directly connected, Serial1/14:在BGP对等体中制定更新源和对等体地址4.1 在IBGP中使用环回口作为更新源及对等体地址R1 !hostname R1!boot-start-markerboot-end-marker!no ip domain lookup!interface Loopback0 ip address !interface Serial1/1 ip address serial restart-delay 0!line con 0 exec-timeout 0 0 logging synchronous!router bgp 1 no synchronization bgp log-neighbor-changes network mask neighbor remote-as 1 neighbor update-source loopback 0 no auto-summary!EndR2!hostname R2!interface Loopback0 ip address !interface Serial1/0 ip address serial restart-delay 0!interface Serial2/3 no ip address shutdown serial restart-delay 0!ip classlessno ip http server!line con 0 exec-timeout 0 0 logging synchronous!router bgp 1 no synchronization bgp log-neighbor-changesneighbor remote-as 1 neighbor update-source loopback 0 no auto-summary!End*May 9 13:31:54.103: %BGP-5-ADJCHANGE: neighbor UpR1#sh ip bgp summary BGP router identifier , local AS number 1BGP table version is 2, main routing table version 21 network entries using 101 bytes of memory1 path entries using 48 bytes of memory1 BGP path attribute entries using 60 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 209 total bytes of memoryBGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 4 1 5 6 2 0 0 00:01:47 04.2 EBGP 建立队等体关系时使用环回口作更新源和队等体地址!hostname R1!boot-start-markerboot-end-marker!no ip domain lookup!interface Loopback0 ip address !interface Serial1/1 ip address serial restart-delay 0!line con 0 exec-timeout 0 0 logging synchronous!router bgp 1 no synchronization bgp log-neighbor-changes network mask neighbor remote-as 1 neighbor update-source loopback 0neighbor ebgp-multihop no auto-summary!EndR2!hostname R2!interface Loopback0 ip address !interface Serial1/0 ip address serial restart-delay 0!interface Serial2/3 no ip address shutdown serial restart-delay 0!ip classlessno ip http server!line con 0 exec-timeout 0 0 logging synchronous!router bgp 2 no synchronization bgp log-neighbor-changesneighbor remote-as 1 neighbor update-source loopback 0 neighbor ebgp-multihop no auto-summary!End*May 9 13:52:32.771: %BGP-3-NOTIFICATION: sent to neighbor 2/2 (peer in wrong AS) 2 bytes 0002R1# FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 002D 0104 0002 00B4 0202 0202 1002 0601 0400 0100 0102 0280 0002 0202 00R1#sh ip bgp summary BGP router identifier , local AS number 1BGP table version is 2, main routing table version 21 network entries using 101 bytes of memory1 path entries using 48 bytes of memory1 BGP path attribute entries using 60 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 209 total bytes of memoryBGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 4 2 5 6 2 0 0 00:01:01 05.BGP 网络通告要通过BGP协议通告目标网络,必须首先把路由条目注入进BGP中。总共有三种方法:(1) 通过把从IGP学习到的路由条目重分发进BGP中; ?(2) 通过network命令把网络宣告进BGP中; i(3) 通过添加静态路由条目,然后再使用network命令把网络宣告进BGP中; iR2#show ip bgp查看当前路由器的BGP 转发表BGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* /24 0 32768 i6.向BGP通告默认路由要给BGP对端通告一条默认路由,总共有三种方法可以实现。(1) 如果只给特定的对端通告默认路由,那么可以通过neighbor default-originate命令完成,使用这条命令时,不管本地的路由表中有没有默认路由都可以实现。R2#sh ip bgp BGP table version is 4, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path*i 100 0 i在本地并不会有默认路由出现在BGP转发表内.但对等体转发表内会有.(2) 如果给所有的BGP邻居发送一条默认路由,那么要完成这个任务我们必须通过三个步骤去完成。1:建议默认路由2:重分发进BGP3:使用DEFAULT-INFORMATION ORIGINNET 命令。ip route null 0redistribute staticdefault-information originate*Jul 7 12:53:59.275: BGP: Applying map to find origin for /0R1#sh ip bgp BGP table version is 3, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 0 32768 ?* /24 0 32768 ?R3#sh ip bgp BGP table version is 4, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 0 0 1 ?(3) 在IGP表中首先建立指向NULL 0的路由条目,然后使用network命令通告出去。network R1#sh ip bgp BGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 0 32768 iR2#sh ip bgp BGP table version is 10, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path*i 100 0 iR3#sh ip bgp BGP table version is 7, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 0 0 1R3#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSP

温馨提示

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

评论

0/150

提交评论