The peer route-policy import command specifies a route-policy for filtering routes received from a peer.
The undo peer route-policy import command deletes a specified route-policy.
By default, no route-policy is configured for filtering routes received from a peer or peer group or routes to be advertised to a peer group.
Parameter | Description | Value |
---|---|---|
group-name |
Specify a peer-group. |
The value is a string of 1 to 47 case-sensitive characters, spaces not supported. |
route-policy-name |
Apply Routing policy. |
The value is a string of 1 to 200 case-sensitive characters, spaces not supported. |
import |
Applies a route-policy to routes to be imported from a peer group. |
- |
Usage Scenario
After a route-policy is created, the peer route-policy command is used to apply a Route-Policy to a peer or a peer group so that the routes advertised to or received from the peer group can be controlled. To be specific, only the necessary routes are received from or advertised to the peer group. In this manner, route management is implemented, the scale of the routing table is reduced, and fewer network resources are consumed.
Prerequisites
If the command specifies a route-policy that does not exist, use the route-policy command to create the route-policy.
Configuration Impact
If the peer route-policy command is run for a peer group, all the members of the peer group inherit the configuration.
The peer route-policy command is mutually exclusive with the peer route-filter commands. Binding a route-policy after a BGP peer relationship is established may cause peer flapping.<HUAWEI> system-view [~HUAWEI] route-policy r1 permit node 10 [*HUAWEI-route-policy] commit [~HUAWEI-route-policy] quit [~HUAWEI] bgp 100 instance p1 [~HUAWEI-bgp-instance-p1] group a external [~HUAWEI-bgp-instance-p1] ipv4-family vpnv4 [~HUAWEI-bgp-instance-p1-af-vpnv4] peer a enable [~HUAWEI-bgp-instance-p1-af-vpnv4] peer a route-policy test-policy import