【CCNP】BGP Community属性配置案例_第1页
【CCNP】BGP Community属性配置案例_第2页
【CCNP】BGP Community属性配置案例_第3页
【CCNP】BGP Community属性配置案例_第4页
【CCNP】BGP Community属性配置案例_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

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

文档简介

BGP Community属性配置案例【CCNP】BGP Community属性配置案例版本 V1.0密级开放内部机密 类型讨论版测试版正式版修订记录修订日期修订人版本号审核人修订说明2012-11-23Jeff1.0Jeff正式发布1 案例配置拓扑2 案例配置需求1、 如上图所示,IP地址规划方面,R1上有三个环回接口loopback 0、loopback 1、loopback 2,地址分别为50.1.1.1/32、100.1.1.1/32、200.1.1.1/32,路由器互连的接口为172.8.AB.X/24(其中AB为路由器编号叠加,X为路由器编号,如R1连接R2的接口S0/0的地址为172.8.12.1/24);2、 图中有三个AS,AS 100、AS 200、AS 300,R1/R2为eBGP邻居关系,R2/R3为iBGP邻居关系,R2/R4为eBGP邻居关系;3、 将R1的环回接口发布到BGP中,R1将loopback 0接口的BGP路由发送给R2时,设置公有Community属性为NO_ADVERTISE,R1将loopback 1接口的BGP路由发送给R2时,设置公有Community属性为NO_EXPORT,R1将loopback 2接口的BGP路由发送给R2时,设置公有Community属性为LOCAL-AS,查看此时BGP的团体属性;4、 在R1路由器上添加环回接口loopback 3,IP地址为3.3.3.3/32,设置发送给R2的私有Community属性为3:3,查看此时BGP的团体属性;3 案例配置思路1、 R1上的关键配置:router bgp 100 no synchronization bgp log-neighbor-changes network 3.3.3.3 mask 255.255.255.255 network 50.1.1.1 mask 255.255.255.255 network 100.1.1.1 mask 255.255.255.255 network 200.1.1.1 mask 255.255.255.255 neighbor 172.8.12.2 remote-as 200 neighbor 172.8.12.2 send-community /开启发送community属性,默认不发送/ neighbor 172.8.12.2 route-map community out /做out方向的策略/no auto-summary!ip bgp-community new-format /开启bgp community新格式,用来显示私有community属性/2、 R2上的关键配置:router bgp 200 no synchronization bgp log-neighbor-changes neighbor 172.8.12.1 remote-as 100 neighbor 172.8.23.3 remote-as 200 neighbor 172.8.23.3 send-community /开启发送community属性,默认不发送/ neighbor 172.8.24.4 remote-as 300 neighbor 172.8.24.4 send-community /开启发送community属性,默认不发送/ no auto-summary!ip bgp-community new-format /开启bgp community新格式,用来显示私有community属性/3、 R3上的关键配置:router bgp 200 no synchronization bgp log-neighbor-changes neighbor 172.8.23.2 remote-as 200no auto-summary!ip bgp-community new-format/开启bgp community新格式,用来显示私有community属性/4、 R4上的关键配置:router bgp 300 no synchronization bgp log-neighbor-changes neighbor 172.8.24.2 remote-as 200no auto-summary!ip bgp-community new-format/开启bgp community新格式,用来显示私有community属性/4 案例检验结果1、 查看R1上关于策略的配置情况:R1#show ip prefix-list ip prefix-list loopback0: 1 entries seq 5 permit 50.1.1.1/32ip prefix-list loopback1: 1 entries seq 5 permit 100.1.1.1/32ip prefix-list loopback2: 1 entries seq 5 permit 200.1.1.1/32ip prefix-list loopback3: 1 entries seq 5 permit 3.3.3.3/32R1#show route-map communityroute-map community, permit, sequence 10 Match clauses: ip address prefix-lists: loopback0 Set clauses: community no-advertise Policy routing matches: 0 packets, 0 bytesroute-map community, permit, sequence 20 Match clauses: ip address prefix-lists: loopback1 Set clauses: community no-export Policy routing matches: 0 packets, 0 bytesroute-map community, permit, sequence 30 Match clauses: ip address prefix-lists: loopback2 Set clauses: community local-AS Policy routing matches: 0 packets, 0 bytesroute-map community, permit, sequence 40 Match clauses: ip address prefix-lists: loopback3 Set clauses: community 3:3 Policy routing matches: 0 packets, 0 bytesroute-map community, permit, sequence 50 Match clauses: Set clauses: Policy routing matches: 0 packets, 0 bytes2、 查看R2上关于BGP表及相关路由的community属性:R2#show ip bgpBGP table version is 9, local router ID is 172.8.24.2Status 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* 3.3.3.3/32 172.8.12.1 0 0 100 i* 50.1.1.1/32 172.8.12.1 0 0 100 i* 100.1.1.1/32 172.8.12.1 0 0 100 i* 200.1.1.1/32 172.8.12.1 0 0 100 iR2#show ip bgp 50.1.1.1 255.255.255.255BGP routing table entry for 50.1.1.1/32, version 9Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to any peer) Not advertised to any peer 100 172.8.12.1 from 172.8.12.1 (200.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best Community: no-advertise /与R1上设置的属性一致/R2#show ip bgp 100.1.1.1 255.255.255.255BGP routing table entry for 100.1.1.1/32, version 8Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer) Advertised to update-groups: 2 100 172.8.12.1 from 172.8.12.1 (200.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best Community: no-export /与R1上设置的属性一致/R2#show ip bgp 200.1.1.1 255.255.255.255BGP routing table entry for 200.1.1.1/32, version 7Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised outside local AS) Advertised to update-groups: 2 100 172.8.12.1 from 172.8.12.1 (200.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best Community: local-AS /与R1上设置的属性一致/R2#show ip bgp 3.3.3.3 255.255.255.255BGP routing table entry for 3.3.3.3/32, version 6Paths: (1 available, best #1, table Default-IP-Routing-Table) Advertised to update-groups: 2 3 100 172.8.12.1 from 172.8.12.1 (200.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best Community: 3:3 /R2路由器上打了BGP Community新格式命令,所以这里正常显示,否则,这里显示不正常/3、 查看R3上的BGP表:R3#show ip bgpBGP table version is 1, local router ID is 172.8.23.3Status 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* i3.3.3.3/32 172.8.12.1 0 100 0 100 i* i100.1.1.1/32 172.8.12.1 0 100 0 100 i* i200.1.1.1/32 172.8.12.1 0 100 0 100 i/这里没有50.1.1.1/32的BGP路由,因为此路由在R2上的BGP Community为公有属性no-advertise,意思是不通告给任何的BGP对等体,R3与R2为iBGP邻居关系,所以R3的BGP表中不存在此路由,另外,路由前没有“”,是由于下一跳不可达,这里只测试BGP Community/4、 查看R4上的BGP表和BGP Community属性:R4#show ip bgp BGP table version is 9, local router ID is 172.8.24.4Status 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* 3.3.3.3/32 172.8.24.2 0 200 100 i/R4没有收到50.1.1.1/32路由,因为此路由在R2上的BGP Community为公有属性no-advertise,意思是不通告给任何的BGP对等体,R4与R2为eBGP邻居关系,所以R4的BGP表中不存在此路由,同理,100.1.1.1/32在R2上的BGP Community为公有属性no-export ,意思是不通告给eBGP对等体,R4与R2为eBGP邻居关系,所以R4的BGP表中不存在此路由,R3与R2为iBGP邻居关系,所以R3上存在此路由,200.1.1.1/32在R2上的BGP Community为公有属性local-as,意思是只在本AS内部发送,如果配置联盟,那么不发送到其它AS或者子AS,所以R4上不存在此路由,而R3上存在/R4#show ip bgp 3.3.3.3 255.255.255.255BGP routing table entry for 3.3.3.3/32, version 9Paths: (1 available, best #1, table Default-IP-Routing-Table) Not advertised to any peer 200 100 172.8.24.2 from 172.8.24.2 (172.8.24.2) Origin IGP, localpref 100, valid, external, best Community: 3:35 案例数据抓包1、 R1发送给R2的关于3.3.3.3/32的Update Message:2、 R1发送给R2的关于200.1.1.1/32的Update Messa

温馨提示

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

评论

0/150

提交评论