ip vpn-instance

Function

The ip vpn-instance command creates a VPN instance and displays the VPN instance view.

The undo ip vpn-instance command deletes the specified VPN instance.

Format

ip vpn-instance vpn-instance-name

undo ip vpn-instance vpn-instance-name

Parameters

Parameter Description Value
vpn-instance-name Specifies the name of a VPN instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The ip vpn-instance command needs to be run to create a VPN instance on the PE at the edge of the backbone network in the BGP/MPLS IP VPN and BGP/MPLS IPv6 VPN networking.

Configuration Impact

After the ip vpn-instance command is run, a virtual routing table is created on the PE and consumes resources on the PE .

Precautions

If the undo ip vpn-instance command is run to delete a VPN instance, all configurations of the VPN instance on the PE will be cleared automatically.

By default, The device has a default VPN instance default and the management interface GE0/0/0 is bound to the VPN instance.

Follow-up Procedure

After creating a VPN instance, perform the following configurations in the VPN instance view:

  • Enable the IPv4 or IPv6address family for the VPN instance. A VPN instance supports both the IPv4 or IPv6address families. You need to run the ipv4-family (VPN instance view) or ipv6-family (VPN instance view) command to enable the IPv4 or IPv6 address family based on the type of the protocol stack used to advertise VPN routes in the VPN instance.
  • Configure an RD for the IPv4 or IPv6 address family of the VPN instance. You are allowed to perform VPN configurations in the address family view only after using the route-distinguisher command to configure an RD for the address family.
  • Configure a VPN target for the IPv4 or IPv6 address family of the VPN instance using the vpn-target command. The VPN target controls route learning between VPN instances.
  • Bind the VPN instance to a VPN-connected interface on the PE using the ip binding vpn-instance command. After an interface is bound to a VPN instance, the interface becomes a part of the VPN. Packets entering the interface will be forwarded based on the VRF table of the VPN.

Example

# Create a VPN instance named vrf1 and enable the IPv4 address family and IPv6 address family.

<sysname> system-view
[sysname] ip vpn-instance vrf1
[sysname-vpn-instance-vrf1] ipv4-family
[sysname-vpn-instance-vrf1-af-ipv4] route-distinguisher 100:1
[sysname-vpn-instance-vrf1-af-ipv4] vpn-target 100:100
[sysname-vpn-instance-vrf1-af-ipv4] quit
[sysname-vpn-instance-vrf1] ipv6-family
[sysname-vpn-instance-vrf1-af-ipv6] route-distinguisher 100:2
[sysname-vpn-instance-vrf1-af-ipv6] vpn-target 100:200
Related Topics
display ip vpn-instance
ipv4-family (VPN instance view)
ipv6-family (VPN instance view)
vpn-target (VPN instance view)
ip binding vpn-instance

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.