< Home

ip binding vpn-instance

Function

The ip binding vpn-instance command associates an interface on a PE with a VPN instance.

The undo ip binding vpn-instance command disables the association between a VPN instance and an interface.

By default, an interface is a public network interface and is not associated with any VPN instance.

Format

ip binding vpn-instance vpn-instance-name

undo ip binding vpn-instance vpn-instance-name

Parameters

Parameter Description Value
vpn-instance-name Specifies the name of the VPN instance that is associated with the interface. The value must be an existing VPN instance name.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After a VPN instance is created, you need to associate the PE interface connecting to the VPN with the VPN instance. Then, the interface is used as a private network interface on which a private network address and a private network routing protocol can be configured.

Prerequisites

The ip vpn-instance command has been executed to create a VPN instance

Precautions

Binding an interface to a VPN instance or deleting the binding will result in the deletion of the IP address of the interface, Layer 3 features, and IP-related routing protocols. These features must be re-configured if needed.

An interface cannot be bound to any VPN instance that is not enabled with any address family.

Using the undo ipv4-family or undo ipv6-family command to disable the IPv4 or IPv6 address family also deletes the IPv4 or IPv6 configurations of the interfaces bound to the VPN instance.

The binding relationship between an interface and a VPN instance with a BFD session bound is removable using the undo ip binding vpn-instance command only after the bound BFD session is removed.

Example

# Associate the VLANIF 10 interface with the VPN instance named vrf1.

<HUAWEI> system-view
[HUAWEI] ip vpn-instance vrf1
[HUAWEI-vpn-instance-vrf1] ipv4-family
[HUAWEI-vpn-instance-vrf1-af-ipv4] route-distinguisher 100:1
[HUAWEI-vpn-instance-vrf1-af-ipv4] quit
[HUAWEI-vpn-instance-vrf1] quit
[HUAWEI] interface vlanif 10
[HUAWEI-Vlanif10] ip binding vpn-instance vrf1
# Associate the GE0/0/1 interface with the VPN instance named vrf1.
<HUAWEI> system-view
[HUAWEI] ip vpn-instance vrf1
[HUAWEI-vpn-instance-vrf1] ipv4-family
[HUAWEI-vpn-instance-vrf1-af-ipv4] route-distinguisher 100:1
[HUAWEI-vpn-instance-vrf1-af-ipv4] quit
[HUAWEI-vpn-instance-vrf1] quit
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] ip binding vpn-instance vrf1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >