break

Function

The break command enables the device to exit from the current route-filter. If the current route-filter is referenced by a parent route-filter, the device keeps implementing remaining condition and action clauses of the parent route-filter.

Format

break

Parameters

None

Views

Route-filter policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

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. If the break command is run, the device exits from the current route-filter. If the current route-filter is referenced by a parent route-filter, the device keeps implementing remaining condition and action clauses of the parent route-filter.

Precautions

The break command itself does not have a permit or deny attribute. However, if none of the apply, approve, refuse, or finish command has been run when the break command is run, the device exits from the current route-filter and denies the routes that match the filtering conditions of the specified route-filter.

In the following example, routes are denied.

xpl route-filter r1

break

end-filter

In the following example, routes are permitted.

xpl route-filter r1

approve

break

end-filter

Example

# Configure a route-filter named r1 and enable the device to exit from the route-filter and deny the routes with Local_Pref greater than 100.
<HUAWEI> system
[~HUAWEI] xpl route-filter r1
[~HUAWEI-xpl-filter] if local-preference GE 100 then
[~HUAWEI-xpl-filter-if] break
[~HUAWEI-xpl-filter-if] endif
[~HUAWEI-xpl-filter] if local-preference le 50 then
[~HUAWEI-xpl-filter-if] apply community none
[~HUAWEI-xpl-filter-if] endif
[~HUAWEI-xpl-filter] end-filter
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >