【CCNP】BGP路由汇聚配置案例
- 格式:docx
- 大小:348.33 KB
- 文档页数:11
思科CCNP认证BGP的建邻配置与属性详解本⽂讲述了思科CCNP认证BGP的建邻配置与属性。
分享给⼤家供⼤家参考,具体如下:BGP建邻配置BGP的宣告是依赖路由表的,宣告需要满⾜:1:被宣告的路由必须在路由表中。
2:被宣告的路由必须和路由表中的前缀掩码⼀致。
⽆论本地路由表中的条⽬是通过何种⽅式获取的,均可宣告到BGP协议中。
BGP协议宣告时必须和本地路由表中的记录完全⼀致。
宣告:r1(config-router)#network 100.1.1.1 mask 255.255.255.255路由表:IBGP默认使⽤回环建邻,EBGP默认使⽤直连建邻。
r2(config)#router bgp 1r2(config-router)#bgp router-id 100.2.2.2r2(config-router)#neighbor 100.5.5.5 remote-as 2r2(config-router)#neighbor 100.5.5.5 ebgp-multihopEBGP⾮直连建邻修改跳数:EBGP建邻没有特殊情况⼀般使⽤直连建邻,如果使⽤⾮直连建邻需要修改跳数,默认情况下跳数为1(不修改跳数直接使⽤⾮直连建邻会失败)。
BGP的路由传递,传递的是BGP路由表中的路由信息。
BGP的路由表在收到路由以后需要检验该路由的下⼀跳是否可达,如果不可达该路由⼀定不优。
使⽤对等体组建邻BGP邻居:(可以减少建邻过程的重复操作步骤)r1(config)#router bgp 1r1(config-router)#bgp router-id 100.1.1.1r1(config-router)#neighbor a peer-groupr1(config-router)#neighbor a remote-as 1r1(config-router)#neighbor a update-source lo0r1(config-router)#neighbor 100.2.2.2 peer-group ar1(config-router)#neighbor 100.3.3.3 peer-group aBGP属性1:weightcisco私有属性,对于离开AS的路由在路由器选择哪⼀条最优,本台路由器产⽣的路由weight值为32768,学习到的路由的weight值为0,不能传递。
【CCNP】BGP路由汇聚配置案例版本V1.0密级☑开放☐内部☐机密类型☐讨论版☐测试版☑正式版1案例配置拓扑2案例配置需求1、如上图所示,IP地址规划方面,R1上有一环回接口loopback 0,地址为172.16.1.1/24,R2上有一环回接口loopback 0,地址为172.16.2.1/24,路由器互连的接口为172.8.AB.X/24(其中AB为路由器编号叠加,X为路由器编号,如R1连接R3的接口S0/0的地址为172.8.13.1/24);2、图中有4个AS,分别是AS 100,AS 200,AS 300,AS 400,R1/R3、R2/R3、R3/R4采用物理接口之间建立eBGP邻居关系;3、将R1/R2的loopback 0接口发布到BGP中,在R3上将这两条BGP路由汇聚给R4,并解析汇SPOTO 全球培训●项目●人才 1SPOTO 全球 培训 ● 项目 ● 人才2 3 案例配置思路1、 R1上的关键配置:router bgp 100no synchronizationbgp log-neighbor-changesnetwork 172.16.1.0 mask 255.255.255.0neighbor 172.8.13.3 remote-as 300no auto-summary2、 R2上的关键配置:router bgp 200no synchronizationbgp log-neighbor-changesnetwork 172.16.2.0 mask 255.255.255.0neighbor 172.8.23.3 remote-as 300no auto-summary3、 R3上的关键配置:router bgp 300no synchronizationbgp log-neighbor-changesaggregate-address 172.16.0.0 255.255.252.0 /BGP 路由汇聚,汇总命令后的参数将在“案例检验结果出分析”/ 雏鹰论坛CCNPneighbor 172.8.13.1 remote-as 100neighbor 172.8.23.2 remote-as 200neighbor 172.8.34.4 remote-as 400no auto-summary4、 R4上的关键配置:router bgp 400no synchronizationbgp log-neighbor-changesneighbor 172.8.34.3 remote-as 300no auto-summarySPOTO 全球 培训 ● 项目 ● 人才3 4 案例检验结果1、 配置汇总命令aggregate-address 172.16.0.0 255.255.252.0后,在R3和R4关于汇总路由和细路由的显示情况:R3#show ip bgpBGP table version is 11, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 32768 i*> 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 i/从R1/R2学习到的两条BGP 路由汇总为/22的路由/R4#show ip bgpBGP table version is 11, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 i*> 172.16.1.0/24 172.8.34.3 0 300 100 i*> 172.16.2.0/24 172.8.34.3 0 300 200 i/从R3学习到了/22的汇总路由,同时也学习了两条细路由,在R3上汇总,所以汇总路由只包含R3所在的AS 300,路由源的AS 丢失/ 雏鹰论坛CCNPR4#show ip bgp 172.16.0.0 255.255.252.0BGP routing table entry for 172.16.0.0/22, version 11Paths: (1 available, best #1, table Default-IP-Routing-Table)Not advertised to any peerSPOTO 全球 培训 ● 项目 ● 人才4 300, (aggregated by 300 172.8.34.3)172.8.34.3 from 172.8.34.3 (172.8.34.3)Origin IGP , metric 0, localpref 100, valid, external, atomic-aggregate , best/atomic-aggregate 属性表明发生了路由属性的丢失,aggregator 属性表明在哪里丢失属性,从上面的show 命令可以看出,R3在AS 300执行了路由汇总/2、 配置汇总命令aggregate-address 172.16.0.0 255.255.252.0 as-set ,加上as-set 参数后,在R3和R4显示的关于汇总路由和细路由的情况:R3#show ip bgpBGP table version is 12, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 100 32768 {100,200} i*> 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 iR4#show ip bgpBGP table version is 12, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 {100,200} i*> 172.16.1.0/24 172.8.34.3 0 300 100 i*> 172.16.2.0/24 172.8.34.3 0 300 200 i/汇总路由的AS PATH 列表中携带上了路由源的AS {100,200},不过在做路径选择时,花括号{}内的AS 只能当一个AS 计算/ 雏鹰论坛CCNPR4#show ip bg 172.16.0.0 255.255.252.0BGP routing table entry for 172.16.0.0/22, version 12Paths: (1 available, best #1, table Default-IP-Routing-Table)SPOTO 全球 培训 ● 项目 ● 人才5 Flag: 0x820Not advertised to any peer300 {100,200}, (aggregated by 300 172.8.34.3)172.8.34.3 from 172.8.34.3 (172.8.34.3)Origin IGP , metric 0, localpref 100, valid, external, best/在R3的汇聚命令后加上了AS-SET 参数,则AS 属性不会出现丢失的情况,那么在这里atomic-aggregate 属性就没有了,由此可以看出,AS-SET 和atomic-aggregate 属性互斥,AS-SET 参数是将所有细路由的属性复制到汇总路由/3、 配置汇总命令aggregate-address 172.16.0.0 255.255.252.0 as-set summar-only ,再加上summary-only 参数后,在R3和R4显示的关于汇总路由和细路由的情况:R3#show ip bgpBGP table version is 14, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 100 32768 {100,200} is > 172.16.1.0/24 172.8.13.1 0 0 100 is > 172.16.2.0/24 172.8.23.2 0 0 200 i/添加了summary-only 参数后,细路由前面出现了“s ”标志,表明被抑制掉了,抑制的路由不会发送给它的邻居/R4#show ip bgpBGP table version is 14, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 {100,200} i/只存在汇总路由/4、 抑制单条细路由的汇总命令:SPOTO 全球 培训 ● 项目 ● 人才6 ip prefix-list supp seq 5 permit 172.16.1.0/24!route-map supp permit 10match ip address prefix-list supp! aggregate-address 172.16.0.0 255.255.252.0 as-set suppress-map suppR3#show ip bgpBGP table version is 5, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 100 32768 {100,200} is > 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 i/只有172.16.1.0/24被抑制,此路由不会发送给它的BGP 邻居/R4#show ip bgpBGP table version is 19, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 {100,200} i*> 172.16.2.0/24 172.8.34.3 0 300 200 i/没有收到172.16.1.0/24的路由/5、 查看R3的ip 路由表:R3# sh ip routeCodes: C - connected, S - static, R - RIP , M - mobile, B - BGPD - EIGRP , EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2SPOTO 全球 培训 ● 项目 ● 人才7 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.8.0.0/24 is subnetted, 3 subnetsC 172.8.34.0 is directly connected, Serial0/2C 172.8.13.0 is directly connected, Serial0/0C 172.8.23.0 is directly connected, Serial0/1172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksB 172.16.0.0/22 [200/0] via 0.0.0.0, 00:00:04, Null0 /汇总路由指向Null0/B 172.16.1.0/24 [20/0] via 172.8.13.1, 00:00:36 雏鹰论坛CCNPB 172.16.2.0/24 [20/0] via 172.8.23.2, 00:45:055 案例配置文件6 案例总结及其它1、 BGP 汇总命令aggregate-address 后面的参数比较丰富,大家可以根据需要添加合适的参数;SPOTO 全球 培训 ● 项目 ● 人才8SPOTO 全球 培训 ● 项目 ● 人才9/advertise-map 和as-set 结合,表示路由器根据某些细路由的属性复制到汇总路由,advertise-map 后跟的是route-map/ip prefix-list supp seq 5 permit 172.16.1.0/24!route-map supp permit 10match ip address prefix-list supp!router bgp 300aggregate-address 172.16.0.0 255.255.252.0 as-set advertise-map supp效果:R3#show ip bgpBGP table version is 19, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 100 32768 100 i*> 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 iR3#show ip bgp 172.16.1.0BGP routing table entry for 172.16.1.0/24, version 2SPOTO 全球 培训 ● 项目 ● 人才10 Paths: (1 available, best #1, table Default-IP-Routing-Table)Advertised to update-groups:1100172.8.13.1 from 172.8.13.1 (172.16.1.1)Origin IGP , metric 0, localpref 100, valid, external, bestR3#show ip bgp 172.16.0.0BGP routing table entry for 172.16.0.0/22, version 18Paths: (1 available, best #1, table Default-IP-Routing-Table)Advertised to update-groups:1100, (aggregated by 300 172.8.34.3)0.0.0.0 from 0.0.0.0 (172.8.34.3)Origin IGP , localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, best/按照上面的配置,汇总路由复制了细路由172.16.1.0/24的BGP 属性/R4#show ip bgpBGP table version is 31, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 100 i*> 172.16.1.0/24 172.8.34.3 0 300 100 i*> 172.16.2.0/24 172.8.34.3 0 300 200 i/attribute-map 和as-set 结合,手动设置汇总路由的属性,attribute-map 后跟的是route-map/ route-map supp permit 10set origin incomplete!router bgp 300aggregate-address 172.16.0.0 255.255.252.0 as-set attribute-map suppCCNP BGP路由汇聚配置案例SPOTO 全球培训●项目●人才WEB: BBS: (网络) ●11效果:R3#show ip bgpBGP table version is 5, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path *> 172.16.0.0/22 0.0.0.0 100 32768 {100,200} ?*> 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 i/采用attribute-map手动设定汇总路由的属性/R4#show ip bgpBGP table version is 51, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path *> 172.16.0.0/22 172.8.34.3 0 0 300 {100,200} ?*> 172.16.1.0/24 172.8.34.3 0 300 100 i*> 172.16.2.0/24 172.8.34.3 0 300 200 i2、参见欢迎来雏鹰论坛参与讨论。
CCNP知识重点:思科设备BGP 路径属性配置CCNP知识重点:思科设备BGP路径属性配置BGP协议与传统的路由协议相比最大的优势在于可以通过调整BGP的属性值影响选路,今天的技术帖我们就给大家举例介绍思科设备BGP路径属性的配置。
拓扑图如以下图所示:(1) IGP协议配置//RTA配置RTA(config)#interface Loopback0RTA(config)#interface Loopback10RTA(config-ifRTA(config)#interface Ethernet0/0RTA(config)#interface Ethernet0/1//RTB配置RTB(config)#interface Loopback0RTB(coRTB(config)#interface Ethernet0/0RTB(config)#interface Ethernet0/1RTB(config)#router ospf 110RTB(config-router)#network 2.2.2.2 0.0.0.0 area 0RTB(config-router)#network 192.168.1.0 0.0.0.255 area 0 //RTC配置RTC(config)#interface Loopback0RTC(config-if)#ip addressRTC(config)#interface Ethernet0/0RTC(config)#interface Ethernet0/1RTC(config)#router ospf 110RTC(config-router)#router-idRTC(config-router)#network 0.0.0.0 area 0RTC(config-router)#network 192.168.2.0 0.0.0.255 area 0 //RTD配置RTD(config)#interface Loopback0RTD(config)#interface Loopback40RTD(config)#interface Ethernet0/0RTD(config)#interface Ethernet0/1RTD(config)#router ospf 110RTD(config-router)#network 4.4.4.4 0.0.0.0 area 0RTD(config-router)#network 192.168.1.0 0.0.0.255 area 0 RTD(config-router)#network 192.168.2.0 0.0.0.255 area 0 (2) BGP根本配置//RTA配置RTA(config)#router bgp 100RTA(config-router)#neighbor 100.1.1.2 remote-as 200 RTA(config-router)#neighbor 100.1.2.2 remote-as 200//RTB配置RTB(config)#router bgp 200RTB(config-router)#neighbor 4.4.4.4 remote-as 200RTB(config-router)#neighbor 4.4.4.4 update-source Loopback0 RTB(config-router)#neighbor 100.1.1.1 remote-as 100RTB(config-router)#address-family ipv4RTB(config-router-af)#neighbor 4.4.4.4 activateRTB(config-router-af)#neighbor 100.1.1.1 activate//RTC配置RTC(config)#router bgp 200RTC(config-router)#neighbor 4.4.4.4 remote-as 200RTC(config-router)#neighbor 4.4.4.4 update-source Loopback0 RTC(config-router)#neighbor 100.1.2.1 remote-as 100RTC(config-router)#address-family ipv4RTC(config-router-af)#neighbor 4.4.4.4 activateRTC(config-router-af)#neighbor 100.1.2.1 activate//RTD配置RTD(config)#router bgp 200RTD(config-router)#neighbor 2.2.2.2 remote-as 200RTD(config-router)#neighbor 2.2.2.2 update-source Loopback0 RTD(config-router)#neighbor 3.3.3.3 remote-as 200RTD(config-router)#neighbor 3.3.3.3 update-source Loopback0查看RTD BGP路由信息RTD#show ip bgpBGP tStatus codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incompleteRPKI validation codes: V valid, I invalid, N Not foundNetworkNext HopMetricLocPrfWeight Path1000 100 i* i 100.1.2.10 1000 100 i0.0.0.00 32768 i从上述现象发现,RTD学习的路由的下一跳地址为RTA,针对RTD而言不可达,所以该路由非有最优(3) 配置NEXT_HOP属性//RTB配置RTB(config-router-af)#neighbor 4.4.4.4 next-hop-self//RTC配置RTC(config-router-af)#neighbor 4.4.4.4 next-hop-self查看RTD BGP路由信息RTD#show ip bgpStatus codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incompleteRPKI validation codes: V valid, I invalid, N Not foundNetworkNext HopMetricLocPrfWeight Path100 i100 ii(4) 配置LOCAL_PREFERENCE属性//RTC配置RTC(config-router-af)#bgp default local-preference 200 查看RTD BGP路由信息RTD#show ip bgpStatus codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incompleteRPKI validation codes: V valid, I invalid, N Not foundNetworkNext HopMetricLocPrfWeightPath1000 100 i*>i3.3.3.30 2000 100 i32768 i从上述现象发现,RTD优选从RTC接收路由RTD#tracerouteType escape sequence to abort.VRF info: (vrf in name/id, vrf out name/id)1 192.168.2.1 1 msec 1 msec 1 msec2 100.1.2.1 1 msec 1 msec *从上述现象发现,RTD的网段访问网段的流量路径走RTD-RTC-RTA 南京建策科技股份于2004年成立,是IT教育培训中心。
CCNP之BGP实验案例实验需求:1、每一台路由器都起一个/32的回环地址,用来建立BGP邻居关系2、大型企业内部起OSPF协议,ISP B内部也起OSPF协议,企业A分别和ISP B和ISP C建立BGP邻接关系,以用来透传互联网上的条目3、要求ISP C学到挂在ISP B的服务器条目尽可能少4、要求ISP C前往ISP B那些服务器是通过R3和R5之间的高带宽链路,为了充分利用带宽,要求ISP B访问ISP C上的服务器是走的R4和R6之间的低带宽链路,这些配置都需要在大型企业上完成5、要求ISP和企业之间建立的BGP邻接是安全的6、完成配置之后,确信网络中每一台设备都学到了服务器对应的BGP条目实验拓扑图:实验步骤:1、在大型企业A和ISP B内部起OSPF协议R2:R2(config)#router ospf 1R2(config-router)#net 2.2.2.2 0.0.0.0 a 0R2(config-router)#net 23.23.23.23 0.0.0.0 a 0R2(config-router)#net 24.24.24.24 0.0.0.0 a 0R3:R3(config)#router ospf 1R3(config-router)#net 3.3.3.3 0.0.0.0 a 0R3(config-router)#net 23.23.23.1 0.0.0.0 a 0R4:R4(config)#router ospf 1R4(config-router)#net 4.4.4.4 0.0.0.0 a 0R4(config-router)#net 24.24.24.1 0.0.0.0 a 0R5:R5(config)#router ospf 1R5(config-router)#net 5.5.5.5 0.0.0.0 a 0R5(config-router)#net 57.57.57.2 0.0.0.0 a 0R6:R6(config)#router ospf 1R6(config-router)#net 6.6.6.6 0.0.0.0 a 0R6(config-router)#net 67.67.67.2 0.0.0.0 a 0R7:R7(config)#router ospf 1R7(config-router)#net 7.7.7.7 0.0.0.0 a 0R7(config-router)#net 57.57.57.1 0.0.0.0 a 0R7(config-router)#net 67.67.67.1 0.0.0.0 a 02、全网启用BGP协议由于ebgp建立在TCP连接的基础上,所以需要配置静态路由。
思科CCNP认证PBR策略路由与BGP协议详解本⽂讲述了思科CCNP认证PBR策略路由与BGP协议。
分享给⼤家供⼤家参考,具体如下:PBR——策略路由定义:通过流量策略来执⾏选路的⼀种转发⼿段。
控制层⾯——给路由的转发做指导数据层⾯——在路由表中找到路由的出接⼝或者下⼀跳传统的路由表转发只能通过数据的⽬标地址做策略。
策略路由可以根据源地址、⽬的地址、源端⼝、⽬的端⼝、协议、TOS等流量特征来做决策提供路由——灵活性⾼,但速度慢,需要⼀个⼀个抓,操作相对⿇烦。
路由表与策略路由的关系:策略路由是先于路由表执⾏的,策略路由没有捕获的流量依然会去执⾏路由表。
两种配置:1:接⼝下配置access-list 100 permit ip host 1.1.1.1 any //⽤ACL捕获流量route-map pbr permit 10 //定义route-mapnatch ip address 10 //调⽤被ACL捕获的流量set ip next-hop 10.1.1.1 //设置下⼀跳int f0/1ip policy route-map pbr //接⼝下调⽤只能捕获该接⼝的⼊接⼝流量做策略(不能处理本路由器产⽣的流量)。
2:全局配置access-list 100 permit ip host 1.1.1.1 any //⽤ACL捕获流量route-map pbr permit 10 //定义route-mapmatch ip address 10 //调⽤被ACL捕获的流量set ip next-hop 10.1.1.1 //设置下⼀跳ip local policy route-map pbr能够捕获所有接⼝⼊接⼝流量以及本路由器产⽣的流量(源地址是本路由器地址)3:策略路由的冗余设置route-map pbr permit 10match ip address 1ip next-hop verify-availability 10.1.24.2 1 track 1 //track 成功则本条⽣效,track失败则执⾏下⼀条set语句track ip next-hop 10.1.34.3track 1 ip sla 1 //定义⼀个track监控sla的探测结果ip sla 1 //定义⼀个slaip icmp-echo 10.1.12.1 source-ip 10.4.4.4 //设置其探针ip sla schedule 1 life forever start-time now //设置sla 1的执⾏时间4:default 语句在route-map的set ip default这个位置输⼊,定义被捕获的流量为先查路由表。
【CCNP】BGPCommunity属性配置案例【CCNP】BGP Community属性配置案例版本V1.0密级?开放?内部?机密类型?讨论版?测试版?正式版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 100no synchronizationbgp log-neighbor-changesnetwork 3.3.3.3 mask 255.255.255.255network 50.1.1.1 mask 255.255.255.255network 100.1.1.1 mask 255.255.255.255network 200.1.1.1 mask 255.255.255.255neighbor 172.8.12.2 remote-as 200neighbor 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 200no synchronizationbgp log-neighbor-changesneighbor 172.8.12.1 remote-as 100neighbor 172.8.23.3 remote-as 200neighbor 172.8.23.3 send-community /开启发送community 属性,默认不发送/neighbor 172.8.24.4 remote-as 300neighbor 172.8.24.4 send-community /开启发送community 属性,默认不发送/no auto-summary!ip bgp-community new-format3、R3上的关键配置:router bgp 200no synchronizationbgp log-neighbor-changesneighbor 172.8.23.2 remote-as 200no auto-summary!ip bgp-community new-format/开启bgp community新格式,用来显示私有community属性/4、R4上的关键配置:router bgp 300no synchronizationbgp log-neighbor-changesneighbor 172.8.24.2 remote-as 200no auto-summary!ip bgp-community new-format/开启bgp community新格式,用来显示私有community属性/ 4案例检验结果1、查看R1上关于策略的配置情况:R1#show ip prefix-listip prefix-list loopback0: 1 entriesseq 5 permit 50.1.1.1/32ip prefix-list loopback1: 1 entriesseq 5 permit 100.1.1.1/32ip prefix-list loopback2: 1 entriesseq 5 permit 200.1.1.1/32ip prefix-list loopback3: 1 entriesseq 5 permit 3.3.3.3/32R1#show route-map communityroute-map community, permit, sequence 10Match clauses:ip address prefix-lists: loopback0Set clauses:community no-advertisePolicy routing matches: 0 packets, 0 bytesroute-map community, permit, sequence 20Match clauses:ip address prefix-lists: loopback1Set clauses:community no-exportPolicy routing matches: 0 packets, 0 bytesroute-map community, permit, sequence 30Match clauses:ip address prefix-lists: loopback2Set clauses:community local-ASPolicy routing matches: 0 packets, 0 bytesroute-map community, permit, sequence 40Match clauses:ip address prefix-lists: loopback3Set clauses:community 3:3Policy routing matches: 0 packets, 0 bytesroute-map community, permit, sequence 50Match 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, ? - incompleteNetwork 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.255Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to any peer) Not advertised to any peer 100172.8.12.1 from 172.8.12.1 (200.1.1.1)Origin IGP, metric 0, localpref 100, valid, external, bestCommunity: 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: 2100172.8.12.1 from 172.8.12.1 (200.1.1.1)Origin IGP, metric 0, localpref 100, valid, external, bestCommunity: no-export /与R1上设置的属性一致/ 雏鹰论坛CCNPR2#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:2100172.8.12.1 from 172.8.12.1 (200.1.1.1)Origin IGP, metric 0, localpref 100, valid, external, bestCommunity: local-AS /与R1上设置的属性一致/R2#show ip bgp 3.3.3.3 255.255.255.255Paths: (1 available, best #1, table Default-IP-Routing-Table)Advertised to update-groups:2 3100172.8.12.1 from 172.8.12.1 (200.1.1.1)Origin IGP, metric 0, localpref 100, valid, external, bestCommunity: 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, ? - incompleteNetwork 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 bgpBGP 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, ? - incompleteNetwork 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上存在/ 雏鹰论坛CCNPR4#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 peer200 100172.8.24.2 from 172.8.24.2 (172.8.24.2)Origin IGP, localpref 100, valid, external, bestCommunity: 3:35案例数据抓包1、R1发送给R2的关于3.3.3.3/32的Update Message:2、R1发送给R2的关于200.1.1.1/32的Update Message:3、R1发送给R2的关于100.1.1.1/32的Update Message:4、R1发送给R2的关于50.1.1.1/32的Update Message:6案例配置文件7案例总结及其它1、BGP Community属性用来标识一些有相同性质的前缀,给路由打标记,以便统一处理,一个路由可以有多个属性值,不限于一个网络或一个自治系统,没有物理边界;2、BGP Community属性有公有和私有:公认的Community:a)NO_ADVERTISE:不通告给任何的BGP对等体;b)NO_EXPORT:不通告给eBGP对等体;c)INTERNET:可以通告给所有的其它BGP对等体;d)LOCAL-AS:表示本路径不发布到本AS 外部,当配置联盟时,本路径不发布给其它的自治系统或子自治系统;私有的Community:a)私有团体是对用户有意义的数字;b)四个字节,为增加可读性,可配置为aa:nn,一般aa建议为AS号,nn代表业务;3、缺省在peer之间不传递community属性,必须在bgp进程下针对特定peer使用neighbor ××××send-community才能将community属性发送出去;4、参见欢迎来雏鹰论坛参与讨论。
BGP选路规则前提:路由下一跳不可达或没有解决同步问题,则不能参与路由选择:1.选择Weight值最高的路由——思科私有2.选择Local-Preference较大的路由3.选择network或aggregate或重分布获得的本地路由4.选择AS路径较短的路由5.依次选择Origin属性为IGP、EGP和INCOMPLETE类型的路由6.选择MED较小的路由7.优选EBGP而不是IBGP8.选择下一跳IGP度量值较小的路由9.负载均衡,BGP默认不启用负载均衡。
若配置负载均衡,则不比较后面的参数(maximum-paths n)10.如果都是EBGP路由,则选择先收到的那条(最老的)11.选择BGP Router ID小的BGP对等体通告的路由12.优先选择最短的cluster-list13.优先选择邻居IP地址最小的路由(neighbor指定的地址)BGP属性补充说明:•第3点:本地发起的路由有多种方式,如在BGP进程下用network命令,或将其它路由协议重分布进BGP,或者手工聚合(汇总)。
通过network和重分布的优先于手工聚合。
•第4点:在做聚合路由时,使用as-set后产生的AS-Path列表中{ }里的AS号长度只算一个AS号的长度,在联盟内的AS-Path列表中()的AS号长度不做计算依据。
•第9点:等价负载均衡,当前面8条选路原则都无法优选出最优路由时,并且在BGP进程下面配置了maximum-paths,那么将执行负载均衡。
•第10条,第11条:如果BGP进程下使用bgp bestpath compare-routerid命令,则忽略第10条,进行第11条的比较。
C去往65004优选谁?BGP选路案例默认情况下的BGP表修改BGP默认本地优先级Router A配置route-map调整后的BGP表修改BGP的MED属性使用Route-Map调整MED效果。
【CCNP】BGP路由汇聚配置案例版本V1.0密级☑开放☐内部☐机密类型☐讨论版☐测试版☑正式版1案例配置拓扑2案例配置需求1、如上图所示,IP地址规划方面,R1上有一环回接口loopback 0,地址为172.16.1.1/24,R2上有一环回接口loopback 0,地址为172.16.2.1/24,路由器互连的接口为172.8.AB.X/24(其中AB为路由器编号叠加,X为路由器编号,如R1连接R3的接口S0/0的地址为172.8.13.1/24);2、图中有4个AS,分别是AS 100,AS 200,AS 300,AS 400,R1/R3、R2/R3、R3/R4采用物理接口之间建立eBGP邻居关系;3、将R1/R2的loopback 0接口发布到BGP中,在R3上将这两条BGP路由汇聚给R4,并解析汇SPOTO 全球培训●项目●人才 1SPOTO 全球 培训 ● 项目 ● 人才2 3 案例配置思路1、 R1上的关键配置:router bgp 100no synchronizationbgp log-neighbor-changesnetwork 172.16.1.0 mask 255.255.255.0neighbor 172.8.13.3 remote-as 300no auto-summary2、 R2上的关键配置:router bgp 200no synchronizationbgp log-neighbor-changesnetwork 172.16.2.0 mask 255.255.255.0neighbor 172.8.23.3 remote-as 300no auto-summary3、 R3上的关键配置:router bgp 300no synchronizationbgp log-neighbor-changesaggregate-address 172.16.0.0 255.255.252.0 /BGP 路由汇聚,汇总命令后的参数将在“案例检验结果出分析”/ 雏鹰论坛CCNPneighbor 172.8.13.1 remote-as 100neighbor 172.8.23.2 remote-as 200neighbor 172.8.34.4 remote-as 400no auto-summary4、 R4上的关键配置:router bgp 400no synchronizationbgp log-neighbor-changesneighbor 172.8.34.3 remote-as 300no auto-summarySPOTO 全球 培训 ● 项目 ● 人才3 4 案例检验结果1、 配置汇总命令aggregate-address 172.16.0.0 255.255.252.0后,在R3和R4关于汇总路由和细路由的显示情况:R3#show ip bgpBGP table version is 11, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 32768 i*> 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 i/从R1/R2学习到的两条BGP 路由汇总为/22的路由/R4#show ip bgpBGP table version is 11, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 i*> 172.16.1.0/24 172.8.34.3 0 300 100 i*> 172.16.2.0/24 172.8.34.3 0 300 200 i/从R3学习到了/22的汇总路由,同时也学习了两条细路由,在R3上汇总,所以汇总路由只包含R3所在的AS 300,路由源的AS 丢失/ 雏鹰论坛CCNPR4#show ip bgp 172.16.0.0 255.255.252.0BGP routing table entry for 172.16.0.0/22, version 11Paths: (1 available, best #1, table Default-IP-Routing-Table)Not advertised to any peerSPOTO 全球 培训 ● 项目 ● 人才4 300, (aggregated by 300 172.8.34.3)172.8.34.3 from 172.8.34.3 (172.8.34.3)Origin IGP , metric 0, localpref 100, valid, external, atomic-aggregate , best/atomic-aggregate 属性表明发生了路由属性的丢失,aggregator 属性表明在哪里丢失属性,从上面的show 命令可以看出,R3在AS 300执行了路由汇总/2、 配置汇总命令aggregate-address 172.16.0.0 255.255.252.0 as-set ,加上as-set 参数后,在R3和R4显示的关于汇总路由和细路由的情况:R3#show ip bgpBGP table version is 12, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 100 32768 {100,200} i*> 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 iR4#show ip bgpBGP table version is 12, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 {100,200} i*> 172.16.1.0/24 172.8.34.3 0 300 100 i*> 172.16.2.0/24 172.8.34.3 0 300 200 i/汇总路由的AS PATH 列表中携带上了路由源的AS {100,200},不过在做路径选择时,花括号{}内的AS 只能当一个AS 计算/ 雏鹰论坛CCNPR4#show ip bg 172.16.0.0 255.255.252.0BGP routing table entry for 172.16.0.0/22, version 12Paths: (1 available, best #1, table Default-IP-Routing-Table)SPOTO 全球 培训 ● 项目 ● 人才5 Flag: 0x820Not advertised to any peer300 {100,200}, (aggregated by 300 172.8.34.3)172.8.34.3 from 172.8.34.3 (172.8.34.3)Origin IGP , metric 0, localpref 100, valid, external, best/在R3的汇聚命令后加上了AS-SET 参数,则AS 属性不会出现丢失的情况,那么在这里atomic-aggregate 属性就没有了,由此可以看出,AS-SET 和atomic-aggregate 属性互斥,AS-SET 参数是将所有细路由的属性复制到汇总路由/3、 配置汇总命令aggregate-address 172.16.0.0 255.255.252.0 as-set summar-only ,再加上summary-only 参数后,在R3和R4显示的关于汇总路由和细路由的情况:R3#show ip bgpBGP table version is 14, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 100 32768 {100,200} is > 172.16.1.0/24 172.8.13.1 0 0 100 is > 172.16.2.0/24 172.8.23.2 0 0 200 i/添加了summary-only 参数后,细路由前面出现了“s ”标志,表明被抑制掉了,抑制的路由不会发送给它的邻居/R4#show ip bgpBGP table version is 14, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 {100,200} i/只存在汇总路由/4、 抑制单条细路由的汇总命令:SPOTO 全球 培训 ● 项目 ● 人才6 ip prefix-list supp seq 5 permit 172.16.1.0/24!route-map supp permit 10match ip address prefix-list supp! aggregate-address 172.16.0.0 255.255.252.0 as-set suppress-map suppR3#show ip bgpBGP table version is 5, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 100 32768 {100,200} is > 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 i/只有172.16.1.0/24被抑制,此路由不会发送给它的BGP 邻居/R4#show ip bgpBGP table version is 19, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 {100,200} i*> 172.16.2.0/24 172.8.34.3 0 300 200 i/没有收到172.16.1.0/24的路由/5、 查看R3的ip 路由表:R3# sh ip routeCodes: C - connected, S - static, R - RIP , M - mobile, B - BGPD - EIGRP , EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2SPOTO 全球 培训 ● 项目 ● 人才7 E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.8.0.0/24 is subnetted, 3 subnetsC 172.8.34.0 is directly connected, Serial0/2C 172.8.13.0 is directly connected, Serial0/0C 172.8.23.0 is directly connected, Serial0/1172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksB 172.16.0.0/22 [200/0] via 0.0.0.0, 00:00:04, Null0 /汇总路由指向Null0/B 172.16.1.0/24 [20/0] via 172.8.13.1, 00:00:36 雏鹰论坛CCNPB 172.16.2.0/24 [20/0] via 172.8.23.2, 00:45:055 案例配置文件6 案例总结及其它1、 BGP 汇总命令aggregate-address 后面的参数比较丰富,大家可以根据需要添加合适的参数;SPOTO 全球 培训 ● 项目 ● 人才8SPOTO 全球 培训 ● 项目 ● 人才9/advertise-map 和as-set 结合,表示路由器根据某些细路由的属性复制到汇总路由,advertise-map 后跟的是route-map/ip prefix-list supp seq 5 permit 172.16.1.0/24!route-map supp permit 10match ip address prefix-list supp!router bgp 300aggregate-address 172.16.0.0 255.255.252.0 as-set advertise-map supp效果:R3#show ip bgpBGP table version is 19, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 0.0.0.0 100 32768 100 i*> 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 iR3#show ip bgp 172.16.1.0BGP routing table entry for 172.16.1.0/24, version 2SPOTO 全球 培训 ● 项目 ● 人才10 Paths: (1 available, best #1, table Default-IP-Routing-Table)Advertised to update-groups:1100172.8.13.1 from 172.8.13.1 (172.16.1.1)Origin IGP , metric 0, localpref 100, valid, external, bestR3#show ip bgp 172.16.0.0BGP routing table entry for 172.16.0.0/22, version 18Paths: (1 available, best #1, table Default-IP-Routing-Table)Advertised to update-groups:1100, (aggregated by 300 172.8.34.3)0.0.0.0 from 0.0.0.0 (172.8.34.3)Origin IGP , localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, best/按照上面的配置,汇总路由复制了细路由172.16.1.0/24的BGP 属性/R4#show ip bgpBGP table version is 31, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP , e - EGP , ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 172.16.0.0/22 172.8.34.3 0 0 300 100 i*> 172.16.1.0/24 172.8.34.3 0 300 100 i*> 172.16.2.0/24 172.8.34.3 0 300 200 i/attribute-map 和as-set 结合,手动设置汇总路由的属性,attribute-map 后跟的是route-map/ route-map supp permit 10set origin incomplete!router bgp 300aggregate-address 172.16.0.0 255.255.252.0 as-set attribute-map suppCCNP BGP路由汇聚配置案例SPOTO 全球培训●项目●人才WEB: BBS: (网络) ●11效果:R3#show ip bgpBGP table version is 5, local router ID is 172.8.34.3Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path *> 172.16.0.0/22 0.0.0.0 100 32768 {100,200} ?*> 172.16.1.0/24 172.8.13.1 0 0 100 i*> 172.16.2.0/24 172.8.23.2 0 0 200 i/采用attribute-map手动设定汇总路由的属性/R4#show ip bgpBGP table version is 51, local router ID is 172.8.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path *> 172.16.0.0/22 172.8.34.3 0 0 300 {100,200} ?*> 172.16.1.0/24 172.8.34.3 0 300 100 i*> 172.16.2.0/24 172.8.34.3 0 300 200 i2、参见欢迎来雏鹰论坛参与讨论。