251
Examples
# In BGP IPv4 unicast instance view, use ACL 2000 to filter outbound BGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] filter-policy 2000 export
# In BGP-VPN IPv6 unicast instance view, use ACL6 2000 to filter outbound BGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] filter-policy 2000 export
# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass, and use ACL 3000 to filter outbound
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] ipv4-family unicast
[Sysname-bgp-ipv4] filter-policy 3000 export
Related commands
•
filter-policy import
•
peer as-path-acl
•
peer filter-policy
•
peer prefix-list
•
peer route-policy
filter-policy import
Use
filter-policy import
to filter inbound routing information by using a specified filter.
Use
undo filter-policy import
to cancel filtering inbound routing information.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
filter-policy
{
acl-number
|
prefix-list
prefix-list-name
}
import
undo filter-policy
{
acl-number
|
prefix-list
prefix-list-name
}
import
In BGP IPv6 unicast instance view/BGP-VPN IPv6 unicast instance view:
filter-policy
{
acl6-number
|
prefix-list
ipv6-prefix-name
}
import
undo filter-policy
{
acl6-number
|
prefix-list
ipv6-prefix-name
}
import
Default
No inbound routing information is filtered.