6-33
ip-prefix-name
: Name of an IP prefix list used to filter outgoing routing information, a string of 1 to 19
characters.
direct
: Filters direct routes.
isis process-id
: Filters outgoing routes redistributed from an ISIS process. The ID is in the range 1 to
65535.
ospf process-id
: Filters outgoing routes redistributed from the OSPF process with an ID from 1 to
65535.
rip process-id
: Filters outgoing routes redistributed from a RIP process. The ID is in the range 1 to
65535.
static
: Filters static routes.
If no routing protocol is specified, all outgoing routes are filtered.
Description
Use the
filter-policy export
command to configure the filtering of outgoing routes.
Use the
undo filter-policy export
command to remove the filtering.
If no routing protocol is specified, all redistributed routes are filtered when advertised.
By default, no route filtering is configured.
Note that if you want to reference an advanced ACL (with a number from 3000 to 3999) in the
command, the ACL should be configured with the
rule
[
rule-id
] {
deny
|
permit
}
ip source
sour-addr
sour-wildcard
command to deny/permit a route with the specified destination, or with the
rule
[
rule-id
]
{
deny
|
permit
}
ip source
sour-addr sour-wildcard
destination
dest-addr dest-wildcard
command to
deny/permit a route with the specified destination and mask. The
source
keyword specifies the
destination address of a route while the
destination
keyword specifies the subnet mask of the route
(the subnet mask must be valid; otherwise, the configuration is ineffective).
Examples
# In BGP view, reference ACL 2000 to filter all outgoing routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] filter-policy 2000 export
# In BGP-VPN instance view, reference ACL 2000 to filter all outgoing routes (the VPN has been
created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] filter-policy 2000 export
# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass, and reference ACL 3000 to filter
outgoing routes.
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] bgp 100
[Sysname-bgp] filter-policy 3000 export