The export route-policy evpn command associates the VPN-IPv4 address family or VPN-IPv6 address family of a VPN instance with an export routing policy to filter routes to be advertised to the EVPN.
The undo export route-policy evpn command disassociates the VPN-IPv4 address family or VPN-IPv6 address family of a VPN instance with an export routing policy.
By default, the VPN-IPv4 address family or VPN-IPv6 address family of a VPN instance is not associated with any export routing policy.
Usage Scenario
By default, the VPN IPv4/IPv6 address family of a VPN instance adds all VPN targets in the export VPN target list to routes to be advertised to the EVPN. To control route export more precisely, run the export route-policy evpn command to associate the VPN IPv4/IPv6 address family with an export routing policy and set attributes for eligible routes.
Prerequisites
An RD has been configured for the VPN instance IPv4/IPv6 address family using the route-distinguisher command.
Configuration Impact
If the command is run more than once, the latest configuration overrides the previous one.
The export routing policy configured using the export route-policy evpn command does not affect the export routing policy applied to the VPN instance using the export route-policy command.Precautions
If the specified routing policy does not exist, run the route-policy command to create the routing policy.
<HUAWEI> system-view [~HUAWEI] route-policy policy-2 permit node 10 [*HUAWEI-route-policy] apply extcommunity rt 10:1 [*HUAWEI-route-policy] quit [*HUAWEI] ip vpn-instance vrf1 [*HUAWEI-vpn-instance-vrf1] ipv4-family [*HUAWEI-vpn-instance-vrf1-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vrf1-af-ipv4] export route-policy policy-2 evpn