Configuring BGP SRv6

A controller orchestrates IGP SIDs and BGP SR-allocated BGP peer SIDs to implement inter-AS forwarding over the optimal path.

Context

BGP is a dynamic routing protocol used between ASs. BGP SRv6 is a BGP extension for SR and is used for inter-AS source routing.

BGP SRv6 uses BGP egress peer engineering (EPE) to allocate Peer-Node and Peer-Adj SIDs to peers. These SIDs can be reported to the controller through BGP-LS for orchestrating E2E SRv6 TE Policies.

Procedure

  • Configure BGP EPE.
    1. Run system-view

      The system view is displayed.

    2. Run segment-routing ipv6

      SRv6 is enabled.

    3. Run quit

      Return to the system view.

    4. Run bgp { as-number-plain | as-number-dot }

      BGP is enabled, and the BGP view is displayed.

    5. Run peer ipv6-address as-number { as-number-plain | as-number-dot }

      A BGP peer is created.

    6. Run the peer ipv6-address egress-engineering srv6 command to enable BGP EPE only.

      Alternatively, run the peer ipv6-address egress-engineering srv6 locator locator-name command to enable BGP EPE and specify a locator to be used for SID allocation to a specific peer.

      Alternatively, run the peer ipv6-address egress-engineering srv6 static-sid { psp psp-sid | no-flavor no-flavor-sid } * command to configure a static uncompressed End.X SID (PSP) or an End.X SID (no flavor).

      Alternatively, run the peer ipv6-address egress-engineering srv6 static-sid { psp compress psp-compress-sid | no-flavor compress no-flavor-compress-sid } command to configure a static compressed End.X SID (PSP) or an End.X SID (no flavor).

      Alternatively, run the peer ipv6-address egress-engineering srv6 static-sid psp-usp-usdpsp-usp-usd-sid command to configure a static uncompressed End.X SID (PSP, USP, and USD).

      Alternatively, run the peer ipv6-address egress-engineering srv6 static-sid { psp-usp-usd compress psp-usp-usd-compress-sid | psp-usp-usd-coc compress psp-usp-usd-coc-compress-sid } command to configure a static compressed End.X SID (PSP, USP, and USD) or an End.X SID (PSP, USP, USD, and COC).

      If all of the preceding three commands are run, only the last command takes effect.

      Table 1 describes the effects of each format of the peer ipv6-address egress-engineering srv6 command with the segment-routing ipv6 egress-engineering locator command being executed or not. (The left four column headings in the table indicate the functions corresponding to the involved commands.) The segment-routing ipv6 egress-engineering locator locator-name command is used to specify a locator to be used for SID allocation to all BGP EPE peers.

      Table 1 Effects of different command configuration combinations

      Locator for SID Allocation to All BGP EPE Peers

      BGP EPE Enabling

      Locator for SID Allocation to a Specific BGP EPE Peer

      Static SID

      Effect

      Configured

      N/A

      Configured

      Not configured

      The locator specified in the peer ipv6-address egress-engineering srv6 locator locator-name command takes effect, and static SIDs are dynamically allocated.

      Configured

      N/A

      Not configured

      Configured

      SIDs from the same locator are configured for all BGP EPE peers.

      For various static SIDs, if only one type of static SID is specified, the other types of SIDs are dynamically allocated.

      Configured

      Configured

      Not configured

      Not configured

      The locator specified in the segment-routing ipv6 egress-engineering locator locator-name command takes effect, and other static SIDs are dynamically allocated.

      Not configured

      N/A

      Configured

      Not configured

      The locator specified in the peer ipv6-address egress-engineering srv6 locator locator-name command takes effect, and other static SIDs are dynamically allocated.

      Not configured

      N/A

      Not configured

      Configured

      SID configuration fails. To address this issue, before you configure a static SID, run the segment-routing ipv6 egress-engineering locator locator-name command.

      Not configured

      Configured

      Not configured

      Not configured

      No SIDs are allocated.

    7. Run commit

      The configuration is committed.

  • Configure the BGP peer relationship-based virtual link function.
    1. Run system-view

      The system view is displayed.

    2. Run bgp { as-number-plain | as-number-dot }

      BGP is enabled, and the BGP view is displayed.

    3. Run peer ipv6-address virtual-link

      The BGP peer relationship-based virtual link function is enabled.

      BGP EPE must be configured before you enable the BGP peer relationship-based virtual link function.

    4. Configure TE attributes, including link latency, metric, affinity, and SRLG attributes. These TE attributes can be transmitted to a controller through BGP-LS, allowing the controller to adjust SRv6 TE Policies based on the attributes.

      • Run the peer ipv6-address virtual-link twamp-light test-session session-id command to configure TWAMP Light detection for the specified virtual link.

        When binding a test session to a BGP virtual link, ensure that the local and remote addresses of the test session are the same as those of the virtual link.

        Before running this command, you need to configure a TWAMP Light IPv6 session.

      • Run the peer ipv6-address virtual-link te link administrative group group-value or peer ipv6-address virtual-link te link administrative group name { name-string } &<1-32> command to configure an affinity value or name for the specified virtual link.

        Before running this command, you need to run the path-constraint affinity-mapping command in the system view to create an affinity name template and run the attribute affinity-name bit-sequence bit-number command in the template view to configure the mapping between affinity names and bits.

      • Run the peer ipv6-address virtual-link te metric metric-value command to configure a metric value for the specified virtual link.
      • Run the peer ipv6-address virtual-link te srlg { srlgValue } &<1-64> command to add the specified virtual link to an SRLG.

    5. Run commit

      The configuration is committed.

  • Configure BGP-LS.

    BGP-LS is used to collect network topology information, making topology information collection simpler and more efficient. You must configure a BGP-LS peer relationship between the controller and forwarder, so that topology information can be properly reported from the forwarder to the controller. This example provides the procedure for configuring BGP-LS on the forwarder. The procedure on the controller is similar to that on the forwarder.

    1. Run system-view

      The system view is displayed.

    2. Run bgp { as-number-plain | as-number-dot }

      BGP is enabled, and the BGP view is displayed.

    3. Run peer ipv6-address as-number { as-number-plain | as-number-dot }

      A BGP peer is created.

    4. Run link-state-family unicast

      BGP-LS is enabled, and the BGP-LS address family view is displayed.

    5. Run peer ipv6-address enable

      The device is enabled to exchange BGP-LS routes with the specified peer.

    6. Run commit

      The configuration is committed.

Verifying the Configuration

After configuring BGP SRv6, verify the configuration.

Run the display bgp egress-engineering command to check BGP EPE information. If SIDs are displayed in the SRv6 SID and SRv6 SID (PSP) fields, the configuration succeeds.

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