Didn't you say that you are best at turning against the wind? Why are you tired now?
Community
- 可选传递属性,一种标记(tag)
- 主要是控制路由传递的范围
- 可以将某些分配一个特定的Community属性,之后就可以基于Community值而不是每条路由进行BGP属性的设置
Community公有的团体属性
- no-export—不将路由发给任何eBGP邻居,只在本AS内部传递(联盟内可传递)
- no-advertise—不将路由发给任何BGP邻居
- internet—可以将路由发给任何BGP邻居
- local-as—与no-export类似,即不将路由发到小AS外(IBGP联盟内可传递)
总结
bgp confederation identifier 200
bgp confederation peers 234
aggregate-address 1.1.0.0 255.255.252.0 as-set suppress-map NAME//汇总路由并抑制route-map匹配的感兴趣流
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 send-community both
neighbor 3.3.3.3 default-originate//向3.3.3.3下发默认路由
neighbor 12.12.12.1 remote-as 100
route-map NAME permit 10
match ip address 10
set community 100:1//打tag,便于控制路由传递的范围
network 1.1.1.0 mask 255.255.255.0
neighbor 12.12.12.2 remote-as 200
neighbor 12.12.12.2 send-community//默认community不发送
neighbor 12.12.12.2 route-map NAME out//挂载route-map
Router(config)#ip bgp-community new-format//切换community显示
bgp confederation identifier 200
bgp confederation peers 234
aggregate-address 1.1.0.0 255.255.252.0 as-set summary-only//汇总路由并抑制所有明细
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 send-community both
neighbor 3.3.3.3 default-originate
neighbor 12.12.12.1 remote-as 100
BGP的汇总:
1.BGP默认是不会抑制明细路由的(summary-only)
2.当汇总非本AS起源的路由时,有可能会出现路由倒灌。(as-set )