The else command matches the routes that fail to meet all the previous matching rules in one if condition branch.
By default, the else command is not run.
Usage Scenario
Route-filters are used to filter routes based on sets or a single element and modify route attributes of the routes that meet matching rules. To match the routes that fail to meet all the previous matching rules in one if condition branch, run the else command.
Prerequisites
A matching rule has been configured for the route-filter using the if or elseif command.
Follow-up Procedure
Run the apply, approve, refuse, finish, call route-filter, or break command to configure an action clause for the routes that fail to meet all the previous matching rules in one if condition branch.
<HUAWEI> system [~HUAWEI] xpl route-filter route-filter1 [~HUAWEI-xpl-filter] if med eq 100 then [~HUAWEI-xpl-filter-if] apply ip next-hop 1.1.1.1 [~HUAWEI-xpl-filter-if] elseif med eq 200 then [~HUAWEI-xpl-filter-elif] apply ip next-hop 2.2.2.2 [~HUAWEI-xpl-filter-elif] else [~HUAWEI-xpl-filter-else] apply ip next-hop 3.3.3.3 [~HUAWEI-xpl-filter-else] endif [~HUAWEI-xpl-filter] end-filter