< Home

Binding an Interface with the VPN Instance

After associating an interface with a VPN instance, you can change the interface to a VPN interface. As a result, packets that pass through the interface are forwarded based on the forwarding information of the VPN instance, and such layer-3 attributes as IP address and routing protocol that are configured for the interface are deleted. These layer-3 attributes need to be re-configured if required.

Context

The configuration on the Hub-PE involves two interfaces or sub-interfaces: one is bound with the VPN-in and receives the routes advertised by the Spoke-PE; the other is bound with the VPN-out and advertises the routes of the Hub and all the Spokes.

Perform the following steps on the Hub-PE and all the Spoke-PEs.

Procedure

  1. Access the system view.

    system-view

  2. Access the view of the interface that is to be bound with the VPN instance.

    interface interface-type interface-number

  3. Bind the interface with a VPN instance.

    ip binding vpn-instance vpn-instance-name

    Running the ip binding vpn-instance command on an interface can delete the layer-3 attributes, such as the IP address and routing protocol, including the IPv4 and IPv6. If these layer-3 attributes are still required, configure them again.

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

    Disabling an address family of a VPN instance deletes the layer-3 attributes, such as the IP address and routing protocol of the interface bound to the VPN instance. Disabling all the address families of a VPN instance unbinds all the bound interfaces from the VPN instance.

  4. Set the IP address.

    ip address ip-address { mask | mask-length }

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >