The route-filter export command filters the routes to be advertised so that BGP advertises only desired routes.
The undo route-filter export command restores the default configuration.
The route-filter import command filters the routes to be received.
The undo route-filter import command restores the default configuration.
By default, received routes or the routes to be advertised are not filtered.
Parameter | Description | Value |
---|---|---|
route-filter-name |
Specifies the name of a route-filter. |
The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters. |
direct |
Filters the direct routes to be advertised. |
- |
isis process-id |
Specifies the ID of an IS-IS process. |
The value is an integer ranging from 1 to 4294967295. |
ospf process-id |
Specifies the ID of an OSPF process. |
The value is an integer ranging from 1 to 4294967295. |
rip process-id |
Specifies the ID of an RIP process. |
The value is an integer ranging from 1 to 4294967295. |
static |
Filters the static routes to be advertised. |
- |
Usage Scenario
To filter the routes to be advertised using a route-filter, run the route-filter export command.
If you specify a route protocol in the command, BGP filters only the routes of this protocol before advertising them. If you do not specify any protocol in the command, BGP filters all routes before advertising them. To filter the routes to be received by BGP, run the route-filter import command. BGP adds only the received routes that match the route-filter to the BGP routing table.Configuration Impact
If the route-filter export command with the same route protocol specified is run more than once, the latest configuration overrides the previous one.
The route-filter export command is mutually exclusive with the filter-policy export command. If the route-filter export command is run, some BGP routes are not added to the IP routing table. Therefore, exercise caution when using the command. If the route-filter import is run more than once, the latest configuration overrides the previous one. The route-filter import command is mutually exclusive with the filter-policy import command.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] ipv4-family [*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-instance-vpna] quit [*HUAWEI] xpl route-filter aaa [*HUAWEI-xpl-filter] end-filter [*HUAWEI] bgp 100 instance a [*HUAWEI-bgp-instance-a] ipv4-family vpn-instance vpna [*HUAWEI-bgp-instance-a-vpna] route-filter aaa import
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] ipv4-family [*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-instance-vpna] quit [*HUAWEI] xpl route-filter aaa [*HUAWEI-xpl-filter] end-filter [*HUAWEI] bgp 100 instance a [*HUAWEI-bgp-instance-a] ipv4-family vpn-instance vpna [*HUAWEI-bgp-instance-a-vpna] route-filter aaa export