peer route-policy
Function
The peer route-policy command specifies a route-policy for filtering routes received from a peer or peer group or routes to be advertised to a peer or peer group.
The undo peer route-policy command restores the default setting.
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 or peer group.
Format
peer { group-name | ipv4-address } route-policy route-policy-name { import | export }
undo peer { group-name | ipv4-address | ipv6-address } route-policy route-policy-name { import | export }
Parameters
Parameter | Description | Value |
---|---|---|
group-name | Specifies the name of a peer group. | The name is a string of 1 to 47 characters without any space. It is case-sensitive. |
ipv4-address | Specifies the IPv4 address of a peer. | It is in dotted decimal notation. |
ipv6-address | Specifies the IPv6 address of a peer. | The prefix is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
route-policy-name | Specifies the name of a route-policy. | The name must be unique and is a string of 1 to 40 case-sensitive characters, with spaces not supported. |
import | Applies a route-policy to routes to be imported from a peer or peer group. | - |
export | Applies a route-policy to routes to be advertised to a peer or peer group. | - |
ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view and BGP-IPv4 multicast address family view.
ipv6-address is valid only in the BGP-IPv6 unicast address family view.
Usage Guidelines
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 or peer group can be controlled. To be specific, only the necessary routes are received from or advertised to the peer or peer group. In this manner, route management is implemented, the scale of the routing table is reduced, and fewer network resources are consumed.
Prerequisites
Peer relationships have been established using the peer as-number command.
If the command specifies a route-policy that does not exist, use the route-policy command to create the route-policy.
Precautions
If the peer route-policy command is run for a peer group, all the members of the peer group inherit the configuration.