In BGP/MPLS IP VPN application, each VPN has an instance to maintain forwarding information of the local VPN. Such an instance is called a VPN instance or VPN routing and forwarding table (VRF).
VPN instances isolate VPN routes from routes on the public network and isolate the routes of different VPN instances. VPN instances must be configured in all types of BGP/MPLS IP VPN networking.
Perform the following steps on each PE device.
The system view is displayed.
A VPN instance is created, and its view is displayed.
A VPN instance name is case sensitive. For example, "vpn1" and "VPN1" are different VPN instances.
The description is configured for the VPN instance.
A service ID is created for the VPN instance.
A service ID is unique on a device. It distinguishes a VPN service from other VPN services on the network.
The IPv4 address family is enabled for the VPN instance, and the VPN instance IPv4 address family view is displayed.
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.
An RD is configured for the VPN instance IPv4 address family.
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.
A VPN target is configured for the VPN instance IPv4 address family.
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.
Skip this step when the device functions as the MCE only.
The configuration restricts the number of routes or route prefixes imported from the attached CE devices and peer PE devices into a VPN instance on a PE device. It is recommended that you use only one of the following commands.
By default, the number of routes in a VRF is not limited as long as the total number of routes does not exceed the maximum number of unicast routes supported by the PE device.
The interval for logging the event that the number of routes exceeds the threshold is set for the VPN instance IPv4 address family.
If the routes or prefixes in the IPv4 address family of a VPN instance reach the maximum, the system will generate logs at intervals (defaulting to 5 seconds). To prevent logs from being displayed frequently, run this step to prolong the interval of log generation.
Before applying a routing policy to a VPN instance, create the routing policy. For details about how to configure a routing policy, see Routing Policy Configuration in the S2720, S5700, and S6700 V200R019C10 Configuration Guide - IP Unicast Routing.
Run apply-label per-instance
MPLS label allocation based on the VPN instance IPv4 address family (known as label per instance) is configured. 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.
Run apply-label per-route
MPLS label allocation based on each route (known as label per route) is configured. The VPN instance address family assigns a unique label to each route to be sent to the peer PE.
When only a small number of VPN routes exist on the PE and MPLS label resources are sufficient, the label per route mode improves system security. In this way, downstream devices can load balance VPN traffic based on the inner labels of packets.
By default, label per instance is used.