Configuring an L3VPN Instance

You can configure an L3VPN instance to store and manage received VPN routes or VM routes.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Create an L3VPN instance on each device.

    For IPv4 services, configure an IPv4 L3VPN instance.

    1. Run ip vpn-instance vpn-instance-name

      A VPN instance is created, and its view is displayed.

    2. Run ipv4-family

      The VPN instance IPv4 address family is created, and its view is displayed.

    3. Run route-distinguisher route-distinguisher

      An RD is set for the VPN instance IPv4 address family.

    4. Run vpn-target vpn-target &<1-8> [ both | export-extcommunity | import-extcommunity ] evpn

      One or multiple VPN targets are set for the VPN instance IPv4 address family.

    5. Run evpn mpls routing-enable

      The device is enabled to generate and advertise EVPN IP prefix routes and IRB routes.

    6. (Optional) Run tnl-policy policy-name evpn

      A specified tunnel policy is applied to the VPN instance IPv4 address family to associate the tunnel policy with the EVPN routes leaked to the VPN instance IPv4 address family.

    7. (Optional) Run import route-policy policy-name evpn

      An import route-policy is applied to the VPN instance IPv4 address family to filter EVPN routes to be imported to the VPN instance IPv4 address family. Perform this step to apply an import route-policy to the VPN instance IPv4 address family and set attributes for eligible EVPN routes. This enables the device to more precisely control EVPN routes to be imported into the VPN instance IPv4 address family more precisely.

    8. (Optional) Run export route-policy policy-name evpn

      An export route-policy is applied to the VPN instance IPv4 address family to filter EVPN routes to be advertised. Perform this step to apply an export route-policy to the VPN instance IPv4 address family and set attributes for eligible EVPN routes. This enables the device to more precisely control EVPN routes to be advertised.

    9. Run quit

      Exit the VPN instance IPv4 address family view.

    10. Run quit

      Exit the VPN instance view.

    For IPv6 services, configure an IPv6 L3VPN instance.

    1. Run ip vpn-instance vpn-instance-name

      A VPN instance is created, and its view is displayed.

    2. Run ipv6-family

      The VPN instance IPv6 address family is created, and its view is displayed.

    3. Run route-distinguisher route-distinguisher

      An RD is set for the VPN instance IPv6 address family.

    4. Run vpn-target vpn-target &<1-8> [ both | export-extcommunity | import-extcommunity ] evpn

      One or multiple VPN targets are set for the VPN instance IPv6 address family.

    5. Run evpn mpls routing-enable

      The device is enabled to generate and advertise EVPN IP prefix routes and IRB routes.

    6. (Optional) Run tnl-policy policy-name evpn

      A specified tunnel policy is applied to the VPN instance IPv6 address family to associate the tunnel policy with the EVPN routes leaked to the VPN instance IPv6 address family.

    7. (Optional) Run import route-policy policy-name evpn

      An import route-policy is applied to the VPN instance IPv6 address family to filter EVPN routes to be imported to the VPN instance IPv6 address family. Perform this step to apply an import route-policy to the VPN instance IPv6 address family and set attributes for eligible EVPN routes. This enables the device to more precisely control EVPN routes to be imported into the VPN instance IPv6 address family.

    8. (Optional) Run export route-policy policy-name evpn

      An export route-policy is applied to the VPN instance IPv6 address family to filter EVPN routes to be advertised. Perform this step to apply an export route-policy to the VPN instance IPv6 address family and set attributes for eligible EVPN routes. This enables the device to more precisely control EVPN routes to be advertised.

    9. Run quit

      Exit the VPN instance IPv6 address family view.

    10. Run quit

      Exit the VPN instance view.

  3. Run interface interface-type interface-number.subinterface-number

    An Ethernet sub-interface is created, and the Ethernet sub-interface view is displayed.

  4. (Optional) Run vlan-type dot1q vlan-id

    A VLAN to be associated with the Ethernet sub-interface is specified, and the VLAN encapsulation type is set.

  5. Run ip binding vpn-instance vpn-instance-name

    The Ethernet sub-interface is bound to the L3VPN instance.

  6. (Optional) Run ipv6 enable

    IPv6 is enabled on the interface.

  7. Run ip address ip-address { mask | mask-length } or ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }

    An IPv4/IPv6 address is configured for the Ethernet sub-interface.

  8. Run commit

    The configuration is committed.

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