The peer route-policy command specifies a routing policy for filtering routes received from an EVPN peer or peer group or routes to be advertised to an EVPN peer or peer group.
The undo peer route-policy command deletes a specified routing policy.
By default, no routing policy is used for filtering routes received from an EVPN peer or peer group or routes to be advertised to an EVPN peer or peer group.
peer { group-name | ipv4-address } route-policy route-policy-name { import | export }
undo peer { group-name | ipv4-address } route-policy route-policy-name { import | export }
Parameter | Description | Value |
---|---|---|
group-name | Specifies the name of an EVPN peer group. | The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
ipv4-address | Specifies the IPv4 address of an EVPN peer. | The value is in dotted decimal notation. |
route-policy-name | Specifies the name of a routing policy. | The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
import | Applies a routing policy to routes to be imported from an EVPN peer or peer group. | - |
export | Applies a routing policy to routes to be advertised to an EVPN peer or peer group. | - |
Usage Scenario
After a routing policy is created, the peer route-policy command is run to apply a routing policy to an EVPN peer or 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
The ability to exchange EVPN routes with the peer or a group has been enabled using the peer { group-name | ipv4-address } enable.
The corresponding routing policy has been established. By default, nonexistent routing policies cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent routing policy is referenced using this command, all routes are advertised to neighbors or all routes are received.
Precautions
If a routing policy is specified for an EVPN peer, all the peers in the EVPN peer group inherit the configuration.