![Huawei Quidway S8500 Series Command Manual Download Page 482](http://html.mh-extra.com/html/huawei/quidway-s8500-series/quidway-s8500-series_command-manual_169479482.webp)
Command Manual – Routing Protocol
Quidway S8500 Series Routing Switches
Chapter 6 IP Routing Policy Configuration Commands
Huawei Technologies Proprietary
6-13
6.1.16 if-match community
Syntax
if-match community
{
basic-community-number
[
whole-match
] |
adv-community-number
}
undo if-match community
View
Route policy view
Parameter
basic-community-list-number:
Basic community list number, ranging from 1 to 99.
adv-community-list-number:
Advanced community list number, ranging from 100 to
199.
whole-match
: Exact match. That is, all specified communities must be present and
only these communities are present.
Description
Use the
if-match community
command to match the community attribute of the BGP
information.
Use the
undo if-match community
command to cancel the match of the community
attribute.
By default, no match operation is done on the community attribute of BGP routes.
This if-match sub-statement of route-policy is used to filter BGP routing information and
specify the match condition according to the community attributes of the routing
information.
Related command:
route-policy
,
ip community-list
.
Example
# First define a community-list numbered 1, allowing it to contain the routing information
of AS 100 and AS 200. Then, define a route-policy named “test”. An if-match
sub-statement is defined for Node 10 of the route-policy, which quotes the definition of
the community-list.
[Quidway] ip community-list 1 permit 100:200
[Quidway] route-policy test permit node 10
[Quidway-route-policy] if-match community 1