You can specify an import routing policy when the route redistribution control provided by the
extended community attributes is not enough. An import routing policy may deny routes that are
permitted by the import target attributes.
An import routing policy specified in VPN instance view applies to both the IPv4 VPN and the IPv6
VPN.
An import routing policy specified in IPv4 VPN view applies to only the IPv4 VPN.
An import routing policy specified in IPv4 VPN view takes precedence over that specified in VPN
instance view. If you specify an import routing policy in both IPv4 VPN view and VPN instance view,
the IPv4 VPN uses the policy specified in IPv4 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
ip binding vpn-instance
Syntax
ip binding vpn-instance vpn-instance-name
undo ip binding vpn-instance vpn-instance-name
View
VLAN interface view, tunnel interface view, Layer 3 Ethernet interface view
Default level
2: System level
Parameters
vpn-instance-name
: Name of the VPN instance to be associated, a case-sensitive string of 1 to 31
characters.
Description
Use
ip binding vpn-instance
to associate an interface with a VPN instance.
Use
undo ip binding vpn-instance
to remove the association.
By default, an interface is associated with no VPN instance; it belongs to the public network.
When configured on an interface, the
ip binding vpn-instance
command clears the IP address of
the interface. Therefore, you must reconfigure the IP address of the interface after configuring the
command.
Examples
# Associate VLAN-interface 1 with the VPN instance
vpn1
.
<Sysname> system-view
[Sysname] interface Vlan-interface1
[Sysname-Vlan-interface1] ip binding vpn-instance vpn1
# Associate tunnel 1 interface with the VPN instance
vpn1
.
<Sysname> system-view
[Sysname] interface Tunnel 1
[Sysname-Tunnel1] ip binding vpn-instance vpn2
464