一、BGP拓扑

BGP团体属性Community及 Community-filter路由操控

【温馨提示】:阅读此篇文章,需要具有IGP路由及基本的BGP基础,学习了解过圈内之前的IGP及BGP相关基础干货分享,有助于小伙伴们理解BGP团体属性。

二、BGP团体属性配置实施

1、前提R1和R2及R3配置EBGP邻居关系

<R1>display bgp peer //查看BGP邻居关系

BGP团体属性Community及 Community-filter路由操控

2、R4作为路由反射与R2和R3及R5R6配置IBGP邻居关系

BGP团体属性Community及 Community-filter路由操控

R4与R2R3R5R6形成正常的IBGP邻居关系

3、R1发布路由

[R1]bgp 100

[R1-bgp] network 11.11.11.11 255.255.255.255 //发布11.11.11.11的路由

此时R2可以正常学习到R1发布的11网段的路由:

BGP团体属性Community及 Community-filter路由操控

R4可以正常学习到11

网段的路由:

BGP团体属性Community及 Community-filter路由操控

 

4、配置团体属性配合Route-Policy+前缀列表

[R1-bgp] ip ip-prefix HCIE index 10 permit 11.11.11.11 32//配置前缀列表匹配11的路由

[R1]route-policy HCIE permit node 10

[R1-route-policy] if-match ip-prefix HCIE

[R1-route-policy] apply community no-advertise//配置团体属性不发布给BGP邻居

[R1-bgp]peer 10.1.12.2 advertise-community//配置该属性发布给对等体R2

5、此时R2和R4再次查看路由

此时我们查看R2路由团体属性 no-advertise :不会发布路由给BGP邻居

BGP团体属性Community及 Community-filter路由操控

我们在R4就查看不到R2传递的11的路由:

BGP团体属性Community及 Community-filter路由操控

6、通过配置community控制路由

[R1]route-policy HCIE permit node 10

[R1-route-policy] if-match ip-prefix HCIE// 匹配前缀列表HCIE

[R1-route-policy]apply community 11:11// 配置团体属性打上11:11

BGP团体属性Community及 Community-filter路由操控

[R2]ip community-filter 11 permit 11:11 //创建团体属性过滤器

[R2]route-policy 11 deny no 10

[R2-route-policy]if-match community-filter 11:11 //匹配11:11的路由拒绝

[R2-bgp]peer 10.1.12.1 route-policy 11 import //针对邻居的入方向进行调用

此时R2查看不到R1发布来的BGP路由

BGP团体属性Community及 Community-filter路由操控

每天关注的前10名小伙伴关注分享该WX Gongzhonghao: 

 华亿网络实验室 或   huayinetwork 进行资料下载

 

BGP团体属性Community及 Community-filter路由操控

相关文章:

  • 2022-01-08
  • 2021-06-19
  • 2021-10-15
  • 2021-12-02
  • 2022-01-09
  • 2021-07-08
  • 2021-05-01
  • 2021-09-05
猜你喜欢
  • 2021-05-19
  • 2021-04-25
  • 2022-01-10
  • 2021-06-10
  • 2021-08-19
  • 2021-11-27
  • 2021-08-12
相关资源
相似解决方案