Applying a Tunnel Selector

After a tunnel selector is configured, it needs to be applied to VPNv4, VPNv6 or labeled BGP routes.The mode in which a tunnel selector is applied to routes varies according to the route type.

Context

The system can use a tunnel selector to have routes recurse to a proper tunnel only after the tunnel selector is applied to the routes on the PE or ASBR.

A tunnel selector applies to the following types of routes:
  • VPNv4 routes: A tunnel selector can be applied to a BGP-VPNv4 address family so that the ASBR in inter-AS VPN Option B networking can apply tunnel policies to VPNv4 routes and have the routes recurse to proper tunnels.

  • VPNv6 routes: A tunnel selector can be applied to a BGP-VPNv6 address family so that the ASBR in inter-AS VPN Option B networking can apply tunnel policies to VPNv6 routes and have the routes recurse to proper tunnels.

  • Labeled BGP-IPv4 routes: A tunnel selector can be applied to a BGP-IPv4 unicast address family so that the PE in inter-AS VPN Option C networking can apply tunnel policies to labeled BGP-IPv4 routes.

  • BGP-EVPN routes: A tunnel selector can be applied to a BGP-EVPN address family so that the PE in inter-AS VPN Option B networking can apply tunnel policies to labeled BGP-EVPN routes.

  • L2VPN-AD routes: A tunnel selector can be applied to a BGP-L2VPN-AD address family so that the ASBR in the inter-AS VPLS Option B networking can apply tunnel policies to BGP L2VPN-AD routes.

Perform the following steps on the PE or ASBR where a tunnel selector needs to be applied:

Procedure

  • Apply a tunnel selector to VPNv4 routes.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv4-family vpnv4

      The BGP-VPNv4 address family view is displayed.

    4. Run tunnel-selector tunnel-selector-name

      A tunnel selector is applied to VPNv4 routes on the local device.

      After the tunnel selector is applied to VPNv4 routes, the VPNv4 routes filtered by the if-match clause will recurse to a tunnel according to the tunnel policy specified in the apply clause. The VPNv4 routes filtered out by the if-match clause recurse to LSPs by default.

    5. Run commit

      The configuration is committed.

  • Apply a tunnel selector to VPNv6 routes.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv6-family vpnv6

      The BGP-VPNv6 address family view is displayed.

    4. Run tunnel-selector tunnel-selector-name

      A tunnel selector is applied to VPNv6 routes on the local device.

      After the tunnel selector is applied to VPNv6 routes, the VPNv6 routes filtered by the if-match clause will recurse to a tunnel according to the tunnel policy specified in the apply clause. The VPNv6 routes filtered out by the if-match clause recurse to LSPs by default.

    5. Run commit

      The configuration is committed.

  • Apply a tunnel selector to the labeled BGP-IPv4 routes.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run tunnel-selector tunnel-selector-name [ all ]

      A tunnel selector is applied to the labeled BGP-IPv4 routes on the local device.

      After the tunnel selector is applied to the labeled BGP-IPv4 routes, the labeled routes filtered by the if-match clause will recurse to a tunnel according to the tunnel policy specified in the apply clause. The labeled BGP-IPv4 routes matching the if-match clause recurse to LSPs by default.

      In an inter-AS VPN Option C scenario, to implement tunnel-based load-balancing among labeled BGP routes, run the tunnel-selector tunnel-selector-name all command to configure a tunnel selector on the ASBR. If the all parameter is used, the tunnel selector applies to all BGP IPv4 unicast routes, including labeled routes, imported routes, and network segment routes.

    4. Run commit

      The configuration is committed.

  • Apply a tunnel selector to the labeled BGP-EVPN routes.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run l2vpn-family evpn

      The BGP-EVPN view is displayed.

    4. Run tunnel-selector tunnel-selector-name [ all ]

      After tunnel selector is applied to the labeled BGP EVPN routes on the local device, BGP EVPN routes filtered using the if-match clause recurse to a tunnel based on the tunnel policy specified in the apply clause. BGP EVPN routes that do not match the if-match clause recurse to LSPs by default.

    5. Run commit

      The configuration is committed.

  • Apply a tunnel selector to BGP L2VPN-AD routes.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run l2vpn-ad-family

      The BGP L2VPN-AD address family view is displayed.

    4. Run tunnel-selector tunnel-selector-name

      A tunnel selector is applied to L2VPN-AD routes on the local device.

      After a tunnel selector is applied to L2VPN-AD routes, the L2VPN-AD routes that match the if-match clause recurse to the tunnel policy specified in the apply clause. L2VPN-AD routes that do not match the if-match clause recurse to LSPs by default.

    5. Run commit

      The configuration is committed.

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