A Community filter is used to filter BGP routes based on Community attributes contained in the BGP routes. A Community attribute is a set of destination addresses with the same characteristics. Filtering rules defined based on Community attributes can be used to filter BGP routes.
In addition to the well-known Community attributes, users can define community attributes using digits. The matching condition of a Community filter can be specified using a Community ID or a regular expression.
Like an AS_Path attribute, a Community attribute is used to filter only BGP routes because the Community attribute is also a private attribute of BGP.
The system view is displayed.
To configure a basic Community filter, run the ip community-filter basic comm-filter-name [ index index-number ] { permit | deny } [ community-number | aa:nn | internet [ strict-match ] | no-export-subconfed | no-advertise | no-export ] &<1-20> or ip community-filter basic-comm-filter-num [ index index-number ] { permit | deny } [ community-number | aa:nn | internet | no-export-subconfed | no-advertise | no-export ] &<1-20> command.
To configure an advanced Community filter, run the ip community-filter { advanced comm-filter-name | adv-comm-filter-num } [ index index-number ] { permit | deny } regular-expression command.
The configuration is committed.
Run the display ip community-filter [ basic-comm-filter-num | adv-comm-filter-num | comm-filter-name ] command to check information about the configured Community filter.