Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Router
    • All use cases
    • On-premises without redundancy and one cloud network
    • On-premises without redundancy and multiple cloud networks
    • On-premises with redundancy and one cloud network
    • On-premises with redundancy and multiple cloud networks
    • Two separate route instances without on-premises redundancy
    • Even redistribution of on-premise traffic (Active-Active)
    • Prioritizing on-premise traffic based on direction (Active-Standby)
    • Reserving an on-premise connection via a VPN gateway (PRC)
    • Prioritizing a static VPC route over routes from PRC
    • Even traffic distribution for route 0.0.0.0/0
    • Prioritizing traffic by direction for route 0.0.0.0/0
    • Connectivity for two cloud networks
    • Connectivity for two cloud networks and on-premises
  • Access management
  • Release notes

In this article:

  • Longest prefix match (LPM)
  • BGP AS path prepend
  1. Use cases
  2. Prioritizing on-premise traffic based on direction (Active-Standby)

Prioritizing on-prem traffic based on direction (Active-Standby)

Written by
Yandex Cloud
Updated at June 10, 2025
  • Longest prefix match (LPM)
  • BGP AS path prepend

To prioritize traffic by direction in Cloud Interconnect, you can use the following methods:

  • Longest Prefix Match (LPM)
  • BGP AS path prepend

The longest prefix match method has a higher priority than BGP AS path prepending when it comes to the algorithm for selecting the best route on routers.{#lpm1} We recommend that you only choose one of the suggested methods rather than use both at the same time.

Longest prefix match (LPM)Longest prefix match (LPM)

Below, you can see an example of prioritizing traffic through two private connections set up via two points of presence using the longest prefix match method.

The customer router (R2) uses the NORD PoP to announce the short prefix from the customer infrastructure, 10.0.0.0/8, over BGP towards Yandex Cloud.

Another customer edge router (R1) uses the M9 PoP to announce two long (more specific) prefixes from the customer infrastructure, 10.0.0.0/9 and 10.128.0.0/9, over BGP towards Yandex Cloud.

Yandex Cloud will treat announcements via M9 as more specific ones, i.e., of higher priority.

This way, all traffic from the 172.16.1.0/24, 172.16.2.0/24, and 172.16.3.0/24 cloud subnets to the customer infrastructure will be routed through the private connection towards M9. If this connection fails, the traffic will automatically failover to the private connection to NORD.

BGP AS path prependBGP AS path prepend

Below, you can see an example of prioritizing traffic through two private connections set up via two points of presence with the BGP AS path prepend method.

You can learn more about BGP AS path prepending here.

The customer edge router (R1) uses the M9 PoP to announce the 10.0.0.0/8 prefix from the customer infrastructure over BGP towards Yandex Cloud. The BGP AS_PATH attribute will default to 65001, and the AS path length (count of autonomous system number values) will be 1.

Another customer edge router (R2) announces the same prefix (10.0.0.0/8) from the customer infrastructure over BGP through the NORD PoP towards Yandex Cloud.

Before announcing the prefix, the BGP routing policy on the R2 router adds the customer's autonomous system number (BGP ASN) to the AS_PATH attribute value so that it will be equal to 65001 65001 and the AS path length will be 2. This makes the prefix with such AS path length less preferable for external BGP routers.

This way, for the 10.0.0.0/8 traffic, Yandex Cloud will select the best route via the M9 PoP, while the route via the NORD PoP will act as a failover due to its longer AS path.

All traffic from the 172.16.1.0/24, 172.16.2.0/24, and 172.16.3.0/24 cloud subnets to the customer infrastructure will be routed through the private connection to M9. If this connection fails, the traffic will automatically failover to the private connection to NORD.

Was the article helpful?

Previous
Even redistribution of on-premise traffic (Active-Active)
Next
Reserving an on-premise connection via a VPN gateway (PRC)
© 2025 Direct Cursus Technology L.L.C.