Large-Community sets apply to BGP and are used to match the Large-Community attribute of BGP routes. This section describes how to configure Large-Community sets.
If only paragraph editing is used as an example, the corresponding line editing is similar. To use the line editing mode, perform the operations described in paragraph editing.
For details about how to configure sets and route-filters, see Configuration Procedures of Sets and Route-Filters Using the Paragraph Editing Mode. For details about XPL clauses, see XPL Paragraph Editing Clauses.
Objectives |
Configure a Large-Community set to match Large-Community attribute values 100:1:1, 200:1:1, and 300:1:1. |
Configuration Example 1 |
<HUAWEI> edit xpl large-community-list aaa
xpl large-community-list aaa
100:1:1,
200:1:1,
300:1:1
end-list
This Large-Community set includes three elements and matches Large-Community attribute values 100:1:1, 200:1:1, and 300:1:1. |
Objectives |
Configure a Large-Community set to match Large-Community attribute values 100:1:*, 200:1:*, and 300:1:1. |
Configuration Example 2 |
<HUAWEI> edit xpl large-community-list bbb
xpl large-community-list bbb
regular 100:1:*,
regular 200:1:*,
300:1:1
end-list
This Large-Community set includes three elements and matches Large-Community attribute values 100:1:*, 200:1:*, and 300:1:1. |
Objectives |
Configure a route-filter to add Large-Community attribute values 100:1:1, 200:1:1, and 300:1:1 to the routes with a Local_Pref value less than or equal to 100. |
Reference Example 1 |
<HUAWEI> edit xpl route-filter r1
xpl route-filter r1
if local-preference le 100 then
apply large-community aaa additive
endif
end-filter
This route-filter references the Large-Community set aaa and adds Large-Community attribute values 100:1:1, 200:1:1, and 300:1:1 to the routes with a Local_Pref value less than or equal to 100. |
Objectives |
Configure a route-filter to set the next hop addresses of the routes whose Large-Community attribute values compose a subset of the set bbb to 1.1.1.1. |
Reference Example 2 |
<HUAWEI> edit xpl route-filter r2
xpl route-filter r2
if large-community matches-within bbb then
apply ip next-hop 1.1.1.1
endif
end-filter
This route-filter references the Large-Community set bbb and sets the next hop addresses of the routes whose Large-Community attribute values compose a subset of the set bbb to 1.1.1.1. |