The ip binding vpn-instance command binds an interface to a VPN instance.
The undo ip binding vpn-instance command disables the binding between a VPN instance and an interface.
By default, an interface belongs to the public network and is not bound to any VPN instance.
| Parameter | Description | Value |
|---|---|---|
| vpn-instance-name | Specifies the name of the VPN instance that is bound to a particular interface. | 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. |
Usage Scenario
After a VPN instance is created on a PE, the interface connected to the VPN must be bound to the VPN instance on the PE to serve as a VPN interface. After the binding, the interface can be assigned a private network address and run a private network routing protocol.
Prerequisites
The route-distinguisher command is run to configure an RD for the VPN instance enabled with the IPv4 or IPv6 address family.
Configuration Impact
Binding an interface to a VPN instance or deleting the binding will result in the deletion of the IP address of the interface and Layer 3 features such as the routing protocol. These features must be re-configured if needed.
Precautions
An interface cannot be bound to a VPN instance that is not enabled with the IPv4 or IPv6 address family.
Running the undo ipv4-family or undo ipv6-family command to disable the IPv4or IPv6 address family also deletes the IPv4 or IPv6 configurations of the interface bound to the VPN instance. If both the IPv4 and IPv6 address families are disabled for a VPN instance, the binding relationship between the VPN instance and the interface will be removed.
If the ip binding vpn-instance command is used to bind an interface to a VPN instance, do not use the MAC address as a matching condition in the security policy configured for this interface. Otherwise, the policy cannot be matched, and traffic forwarding is abnormal.
# Bind GE 1/0/0 to the VPN instance named vrf1.
<sysname> system-view
[sysname] interface gigabitethernet 1/0/0
[sysname-GigabitEthernet1/0/0] ip binding vpn-instance vrf1
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!