Community List
2025/10/29小于 1 分钟
Community List
Community List 使用 Community 字符串过滤/操作 BGP 路由,可以在 Route Map 中使用,匹配在 Community List 中定义的具有特定 Community 属性的路由。
配置方法
config router community-list
edit <name>
set type {standard | expanded}
config rule
edit <id>
set action {deny | permit}
set regexp <string>
set match <string>
next
end
next
endtype {standard | expanded}:Community List 的类型:- standard:匹配精确的 Community 字符,通常用于直接过滤 Community 精确字符。
- expanded:基于正则表达式进行匹配。在处理较多的 Community 时,非常有用。
action {deny | permit}:action 的 permit/deny 表示匹配/不匹配。regexp <string>:使用正则表达式匹配 Community List,type配置为expanded时可用。match <string>:使用完整 Community 字符方式匹配 Community List,type配置为standard时可用。
引用 Community List
被 Route Map 引用
config router route-map
edit <name>
config rule
edit <id>
set match-community <string>
next
end
next
endmatch-community <string>:匹配 BGP 路由中的 community 属性。