import route-policy

Use import route-policy to apply an import routing policy to a VPN instance.

Use undo import route-policy to restore the default.

Syntax

import route-policy route-policy

undo import route-policy

Default

All routes matching the import target attribute are accepted.

Views

VPN instance view

IPv4 VPN view

IPv6 VPN view

Predefined user roles

network-admin

Parameters

route-policy: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters.

Usage guidelines

You can specify an import routing policy to filter received routes or modify their route attributes for the VPN instance.

If you execute this command multiple times, the most recent configuration takes effect.

An import routing policy specified in VPN instance view applies to both IPv4 VPN and IPv6 VPN. An import routing policy specified in IPv4 VPN view applies only to IPv4 VPN. An import routing policy specified in IPv6 VPN view applies only to IPv6 VPN.

If you have specified import routing policies in both IPv4 VPN view and VPN instance view, IPv4 VPN uses the import routing policy specified in IPv4 VPN view.

If you have specified import routing policies in both IPv6 VPN view and VPN instance view, IPv6 VPN uses the import routing policy specified in IPv6 VPN view.

Examples

# Apply import routing policy poly-1 to VPN instance vpn1.

<Sysname> system-view
[Sysname] ip vpn-instance vpn1
[Sysname-vpn-instance-vpn1] import route-policy poly-1

Related commands

export route-policy

route-policy (Layer 3—IP Routing Command Reference)