BGP Community(团体)配置实例
Posted myway_liang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了BGP Community(团体)配置实例相关的知识,希望对你有一定的参考价值。
该实验是引用了BGP路由聚合配置实例的基础上,再深入探讨BGP团体实验。如下链接为“BGP路由聚合配置实例”基础部份: http://www.cnblogs.com/vincent-liang/p/6441860.html 当你收到一个BGP路由带有no-export属性的,该台路由器将不再向eBGP路由节点发送该访问控制列表的IP路由。 查看R4没有no-export属性的BGP路由如下: R4#show ip bgp BGP table version is 19, local router ID is 4.4.4.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 11.11.11.0/24 3.3.3.3 0 1 i *> 2.2.2.2 0 1 i * 22.22.22.0/24 3.3.3.3 0 1 i *> 2.2.2.2 0 0 1 i * 33.33.33.0/24 2.2.2.2 0 1 i *> 3.3.3.3 0 0 1 i *> 44.44.44.0/24 0.0.0.0 0 32768 i *> 55.55.55.0/24 5.5.5.5 0 0 5 i *> 66.66.66.0/24 6.6.6.6 0 0 6 i *> 101.1.0.0/22 0.0.0.0 100 32768 {1,6} i s 101.1.1.0/24 3.3.3.3 0 1 i s> 2.2.2.2 0 1 i *> 101.1.2.0/24 6.6.6.6 0 0 6 i *> 101.1.3.0/24 6.6.6.6 0 0 6 i *> 106.1.1.0/24 6.6.6.6 0 0 6 i access-list 1 permit 55.55.55.0 0.0.0.255 route-map orange permit 10 match ip address 1 set community no-export router bgp 5 neighbor 4.4.4.4 send-community neighbor 4.4.4.4 route-map orange out 查看R4带有no-export属性的BGP路由如下: R4#show ip bgp BGP table version is 24, local router ID is 4.4.4.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 11.11.11.0/24 3.3.3.3 0 1 i *> 2.2.2.2 0 1 i * 22.22.22.0/24 3.3.3.3 0 1 i *> 2.2.2.2 0 0 1 i * 33.33.33.0/24 2.2.2.2 0 1 i *> 3.3.3.3 0 0 1 i *> 44.44.44.0/24 0.0.0.0 0 32768 i *> 66.66.66.0/24 6.6.6.6 0 0 6 i *> 101.1.0.0/22 0.0.0.0 100 32768 {1,6} i s 101.1.1.0/24 3.3.3.3 0 1 i s> 2.2.2.2 0 1 i *> 101.1.2.0/24 6.6.6.6 0 0 6 i *> 101.1.3.0/24 6.6.6.6 0 0 6 i *> 106.1.1.0/24 6.6.6.6 0 0 6 i
配置no-advertise前BGP路由 R1#show ip bgp BGP table version is 16, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 11.11.11.0/24 0.0.0.0 0 32768 i *>i22.22.22.0/24 2.2.2.2 0 100 0 i *>i33.33.33.0/24 3.3.3.3 0 100 0 i * i44.44.44.0/24 4.4.4.4 0 100 0 4 i *>i 4.4.4.4 0 100 0 4 i *>i55.55.55.0/24 4.4.4.4 0 100 0 4 5 i * i 4.4.4.4 0 100 0 4 5 i *>i66.66.66.0/24 4.4.4.4 0 100 0 4 6 i * i 4.4.4.4 0 100 0 4 6 i *> 101.1.1.0/24 0.0.0.0 0 32768 i *>i101.1.2.0/24 4.4.4.4 0 100 0 4 6 i * i 4.4.4.4 0 100 0 4 6 i *>i101.1.3.0/24 4.4.4.4 0 100 0 4 6 i * i 4.4.4.4 0 100 0 4 6 i *>i106.1.1.0/24 4.4.4.4 0 100 0 4 6 i * i 4.4.4.4 0 100 0 4 6 i access-list 4 permit 44.44.44.0 0.0.0.255 route-map apple permit 10 match ip address 4 set community no-advertise neighbor 2.2.2.2 send-community neighbor 2.2.2.2 route-map apple out neighbor 3.3.3.3 send-community neighbor 3.3.3.3 route-map apple out 配置no-advertise后BGP路由 R1#show ip bgp BGP table version is 34, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 11.11.11.0/24 0.0.0.0 0 32768 i *>i22.22.22.0/24 2.2.2.2 0 100 0 i *>i33.33.33.0/24 3.3.3.3 0 100 0 i *> 101.1.1.0/24 0.0.0.0 0 32768 i
以上是关于BGP Community(团体)配置实例的主要内容,如果未能解决你的问题,请参考以下文章
CCIE学习笔记 3---BGP 团体属性 community
51-高级路由:BGP community属性:local-as