< Home

Configuring Route Attributes of a VPN Instance

This section describes how to configure the VPN target to control route advertisement and acceptance.

Procedure

  • Configuring Hub-PE
    1. Access the system view.

      system-view

    2. Access the VPN instance view of the VPN-in.

      ip vpn-instance vpn-instance-name1

    3. Access the VPN instance IPv4 address family view.

      ipv4-family

    4. Create a VPN target extended community for the VPN instance IPv4 address family to import the IPv4 routes advertised by all the Spoke-PEs.

      vpn-target vpn-target1 &<1-8> import-extcommunity

      vpn-target1 lists the Export VPN targets advertised by all the Spoke-PEs.

    5. (Optional) Configure an import routing policy for the VPN instance IPv4 address family.

      import route-policy policy-name

      In addition to using a VPN target to control VPN route sending and receiving, an import routing policy can be configured to better control VPN route receiving. The routing policy filters routes before they are imported into the VPN instance IPv4 address family.

    6. (Optional) Configure an export routing policy for the VPN instance IPv4 address family.

      export route-policy policy-name

      Besides using a VPN target to control VPN route sending and receiving, an export routing policy can be configured to better control VPN route sending. The export routing policy filters routes before they are advertised to other PEs.

    7. Return to the system view.

      quit

    8. Access the VPN instance view of the VPN-out.

      ip vpn-instance vpn-instance-name2

    9. Access the VPN instance IPv4 address family view.

      ipv4-family

    10. Create a VPN target extended community for the VPN instance IPv4 address family to advertise the routes of all the Hubs and Spokes.

      vpn-target vpn-target2 &<1-8> export-extcommunity

      vpn-target2 lists the Import VPN targets advertised by all the Spoke-PEs.

    11. (Optional) Configure an import routing policy for the VPN instance IPv4 address family.

      import route-policy policy-name

      In addition to using a VPN target to control VPN route sending and receiving, an import routing policy can be configured to better control VPN route receiving. The routing policy filters routes before they are imported into the VPN instance IPv4 address family.

    12. (Optional) Configure an export routing policy for the VPN instance IPv4 address family.

      export route-policy policy-name

      Besides using a VPN target to control VPN route sending and receiving, an export routing policy can be configured to better control VPN route sending. The export routing policy filters routes before they are advertised to other PEs.

  • Configuring Spoke-PE
    1. Access the system view.

      system-view

    2. Access the VPN instance view of the VPN-in.

      ip vpn-instance vpn-instance-name1

    3. Access the VPN instance IPv4 address family view.

      ipv4-family

    4. Create a VPN target extended community for the VPN instance IPv4 address family to import the IPv4 routes advertised by all the Hub-PEs.

      vpn-target vpn-target2 &<1-8> import-extcommunity

      vpn-target2 should be included in the export VPN target list of the Hub-PE.

    5. Create a VPN target extended community for the VPN instance IPv4 address family to advertise the IPv4 routes of the stations that the Spoke-PE accesses.

      vpn-target vpn-target1 &<1-8> export-extcommunity
      vpn-target1 should be included in the import VPN target list of the Hub-PE.

    6. (Optional) Configure an import routing policy for the VPN instance IPv4 address family.

      import route-policy policy-name

      In addition to using a VPN target to control VPN route sending and receiving, an import routing policy can be configured to better control VPN route receiving. The routing policy filters routes before they are imported into the VPN instance IPv4 address family.

    7. (Optional) Configure an export routing policy for the VPN instance IPv4 address family.

      export route-policy policy-name

      Besides using a VPN target to control VPN route sending and receiving, an export routing policy can be configured to better control VPN route sending. The export routing policy filters routes before they are advertised to other PEs.

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