Route target sets are used to match the RTs of VPN routes.
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 detailed set and route-filter configuration steps, see Configuration Procedures of Sets and Route-Filters Using the Paragraph Editing Mode. For detailed description about XPL clauses, see XPL Paragraph Editing Clauses.
Objective |
Configure a route target set to match the VPN routes with the RT 100:1, 200:1, or 300:1. |
Configuration Example |
<HUAWEI> edit xpl extcommunity-list rt rt-list1
xpl extcommunity-list rt rt-list1
100:1,
200:1,
300:1
end-list
The route target set in this example contains three elements and can match VPN routes carrying RT 100:1, 200:1, or 300:1. |
Objective |
Configure a route-filter to set the next hop IP addresses of the VPN routes carrying the RTs that are a subset of the set named rt-list1 and the VPN routes carrying the RTs of which the set named rt-list1 is a subset to 1.1.1.1 and 2.2.2.2, respectively. |
Reference Example |
<HUAWEI> edit xpl route-filter r1
xpl route-filter r1
if extcommunity rt matches-within rt-list1 then
apply ip next-hop 1.1.1.1
elseif extcommunity rt matches-all rt-list1 then
apply ip next-hop 2.2.2.2
endif
end-filter
The route-filter references the set named rt-list1 and sets the next hop IP addresses of the VPN routes carrying the RTs that are a subset of this set and the VPN routes carrying the RTs of which this set is a subset to 1.1.1.1 and 2.2.2.2, respectively. |