< Home

Controlling the Receiving and Sending of VPN Routes Using Routing Policies

An ASBR can either save all VPNv4 routes or partial VPNv4 routes (by filtering VPN targets through a routing policy).

Context

The following describes two methods for controlling the receiving and sending of VPN routes:

  • Without VPN Target Filtering

    Without the filtering method, the ASBR stores all the VPN IPv4 routes.

  • VPN Target Filtering

    With the filtering method, the ASBR stores partial VPN IPv4 routes through routing policies.

In practical applications, only one of the preceding methods is selected.

Procedure

  • Without VPN Target Filtering

    Perform the following steps on the ASBR:

    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Access the BGP-VPNv4 address family view.

      ipv4-family vpnv4 [ unicast ]

    4. Disable the function of filtering VPN IPv4 routes by the VPN target.

      undo policy vpn-target

      By default, the PE performs VPN target filtering on the received IPv4 VPN routes. The routes passing the filter are added to the routing table, and the others are discarded. If the PE is not configured with VPN instance, or the VPN instance is not configured with the VPN target, the PE discards all the received VPN IPv4 routes.

      In the Inter-AS VPN Option B mode, if the ASBR does not store information about the VPN instance, the ASBR must save all the VPNv4 routing information and advertise it to the peer ASBR. In this case, the ASBR should receive all the VPNv4 routing information without the VPN target filtering.

  • VPN Target Filtering

    Perform the following steps on the ASBR:

    1. Access the system view.

      system-view

    2. Configure an extended community filter.

      ip extcommunity-filter { basic-extcomm-filter-num | basic basic-extcomm-filter-name | advanced-extcomm-filter-num | advanced advanced-extcomm-filter-name } { permit | deny } { rt { { as-number-plain | as-number-dot }:nn | 4as-number:nn | ipv4-address:nn } } &<1-16>

    3. Configure a routing policy.

      route-policy route-policy-name permit node node

    4. Configure a matching rule based on the extended community filter.

      if-match extcommunity-filter { { basic-extcomm-filter-num | advanced-extcomm-filter-num } &<1-16> | advanced-extcomm-filter-name | basic-extcomm-filter-name }

    5. Return to the system view.

      quit

    6. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    7. Access the BGP-VPNv4 address family view.

      ipv4-family vpnv4 [ unicast ]

    8. Apply the routing policy to control the VPN IPv4 routing information.

      peer ipv4-address route-policy route-policy-name { export | import }

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