A VPN instance can be configured on the PE to manage VPN routes.
An instance is created to comprise the VPN forwarding information for each VPN in a BGP/MPLS IP VPN. This instance is called a VPN instance or a VPN routing and forwarding (VRF) table. It is also called a per-site forwarding table in RFC 4364. VPN instances must be created in all BGP/MPLS IP VPN solutions.
VPN instances isolate VPN routes from public network routes and isolate the routes of VPN instances from each other. Perform the following steps on the PE:
system-view
Manually create a VPN instance.
Run the ip vpn-instance vpn-instance-name command to create a VPN instance and access the VPN instance view.
A VPN instance is automatically generated when a virtual system is created.
Run the vsys enable command to enable the virtual system function.
Run the vsys name vsys-name command to create a virtual system. The VPN instance named vsys-name is automatically created.
Run the ip vpn-instance vsys-name command to access the VPN instance view.
PEs do not have default VPN instances. Multiple VPN instances can be created on a PE.
description description-information
Similar to a host name or an interface description, the VPN instance description helps users memorize the VPN instance.
service-id service-id
A service ID is unique on a device. It distinguishes a VPN service from other VPN services on the network.
ipv4-family
T
VPN instances support both the IPv4 and IPv6 address families. Configurations in a VPN instance can be performed only after an address family is enabled for the VPN instance based on the advertised route and forwarding data type.
route-distinguisher route-distinguisher
A VPN instance IPv4 address family takes effect only after being configured with an RD. The RDs of different VPN instances on a PE must be different.
An RD can be modified or deleted only after the VPN instance is deleted or the VPN instance IPv4 address family is disabled.
vpn-target vpn-target &<1-8> [ both | export-extcommunity | import-extcommunity ]
A VPN target is a BGP extended community attribute. It is used to control the receiving and advertisement of VPN routing information. A maximum of eight VPN targets can be configured using a vpn-target command.
routing-table limit number { alert-percent | simply-alert }
After the routing-table limit command is run to increase the allowed maximum number of routes in a VPN instance IPv4 address family or the undo routing-table limit command is run to cancel the limit, manually configure the static routes that are considered to be nonconforming previously.
prefix limit number { alert-percent [ route-unchanged ] | simply-alert }
After the prefix limit command is run to increase the allowed maximum number of route prefixes in a VPN instance IPv4 address family or the undo prefix limit command is run to cancel the limit, the system adds newly received route prefixes of various protocols to the private network IP routing table.
After the number of route prefixes exceeds the maximum limit, direct and static routes can still be added to the IPv4 address family routing table of VPN instances.
limit-log-interval interval
import route-policy policy-name
In addition to using a VPN target to control VPN route sending and receiving, an import routing policy can be configured to better control VPN route receiving. The routing policy filters routes before they are imported into the VPN instance IPv4 address family.
export route-policy policy-name
Besides using a VPN target to control VPN route sending and receiving, an export routing policy can be configured to better control VPN route sending. The export routing policy filters routes before they are advertised to other PEs.
tnl-policy policy-name
A tunnel is specified for IPv4 VPN data forwarding when a tunnel policy is applied to a VPN instance IPv4 address family.
apply-label per-instance
One label is assigned to all the routes of the VPN instance IPv4 address family.
When a large number of VPN routes on the PE exhausts MPLS label resources, the label per instance mode saves label resources on the PE and lowers the requirement for the PE capacity.
apply-label per-route
By default, the VPN instance IPv4 address family assigns the same label to all routes to be sent to the peer PE.
The apply-label per-instance and apply-label per-route commands are mutually exclusive. If both commands are run, the latest configuration overrides the previous one.