Configuring BGP route filtering policies
Configuration prerequisites
Before you configure BGP routing filtering policies, configure the following filters used for route filtering as needed:
ACL (see ACL and QoS Configuration Guide)
Prefix list (see "Configuring routing policies")
Routing policy (see "Configuring routing policies")
AS path list (see "Configuring routing policies")
Configuring BGP route distribution filtering policies
To configure BGP route distribution filtering policies, use the following methods:
Use an ACL or prefix list to filter routing information advertised to all peers.
Use a routing policy, ACL, AS path list, or prefix list to filter routing information advertised to a peer or peer group.
If you configure multiple filtering policies, apply them in the following sequence:
filter-policy export
peer filter-policy export
peer as-path-acl export
peer prefix-list export
peer route-policy export
Only routes passing all the configured policies can be advertised.
To configure BGP route distribution filtering policies (IPv4):
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter BGP view or BGP-VPN instance view. |
| N/A |
3. Enter BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view. | address-family ipv4 [ unicast ] | N/A |
4. Configure BGP route distribution filtering policies. |
| Use at least one method. By default, no BGP distribution filtering policy is configured. |
To configure BGP route distribution filtering policies (IPv6):
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter BGP view or BGP-VPN instance view. |
| N/A |
3. Enter BGP IPv6 unicast address family view or BGP-VPN IPv6 unicast address family view. | address-family ipv6 [ unicast ] | N/A |
4. Configure BGP route distribution filtering policies. |
| Use at least one method. Not configured by default. |
Configuring BGP route reception filtering policies
You can use the following methods to configure BGP route reception filtering policies:
Use an ACL or prefix list to filter routing information received from all peers.
Use a routing policy, ACL, AS path list, or prefix list to filter routing information received from a peer or peer group.
If you configure multiple filtering policies, apply them in the following sequence:
filter-policy import
peer filter-policy import
peer as-path-acl import
peer prefix-list import
peer route-policy import
Only routes passing all the configured policies can be received.
To configure BGP route reception filtering policies (IPv4):
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter BGP view or BGP-VPN instance view. |
| N/A |
3. Enter BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view. | address-family ipv4 [ unicast ] | N/A |
4. Configure BGP route reception filtering policies. |
| Use at least one method. By default, no route reception filtering is configured. |
To configure BGP route reception filtering policies (IPv6):
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter BGP view or BGP-VPN instance view. |
| N/A |
3. Enter BGP IPv6 unicast address family view or BGP-VPN IPv6 unicast address family view. | address-family ipv6 [ unicast ] | N/A |
4. Configure BGP route reception filtering policies. |
| Use at least one method. By default, no route reception filtering is configured. |