Enterprise network engineering · BGP specialty · Nationwide

BGP design and advanced routing troubleshooting

When traffic takes a path nobody intended, or failover behaves differently from the design, the cause usually sits in routing policy. We review BGP architecture and investigate routing failures with evidence, then document the routing model so it stays understandable.

Focus
BGP policy, redistribution and failover
Method
Intended path versus observed evidence
Typical output
A documented routing model and validated changes

Scroll to explore the model. Skip to service details

Failure domains in an A/B redundant design Conceptual illustration of an A/B redundant design; real failure domains come from the topology and its dependencies. At the top, an upstream WAN connection links to edge A and edge B. Below are three layers, each with an A device and a B device: edge routers, core or spine switches, and access or leaf switches. Each device connects to both devices in the next layer. At the bottom, a workload is dual-homed to leaf A and leaf B. Core A on the A side is shaded as a failure domain and marked failed; every link to it is shown as failed. Traffic continues on the alternate path through the B side: from the workload to leaf B, core B, edge B and the upstream connection. A callout notes that capacity on the surviving path must be sufficient, because the B side now carries the full load. A SIDE B SIDE Upstream / WAN Edge AEdge router Edge BEdge router FAILEDCore ACore / spine Core BCore / spine Leaf AAccess / leaf Leaf BAccess / leaf WorkloadDual-homed CHECKCapacity onsurviving path Active path Redundant link Failed link Failure domain CONCEPTUAL Failure domains in an A/B redundant design Conceptual illustration of an A/B redundant design; real failure domains come from the topology and its dependencies. At the top, an upstream WAN connection links to edge A and edge B. Below are three layers, each with an A device and a B device: edge routers, core or spine switches, and access or leaf switches. Each device connects to both devices in the next layer. At the bottom, a workload is dual-homed to leaf A and leaf B. Core A on the A side is shaded as a failure domain and marked failed; every link to it is shown as failed. Traffic continues on the alternate path through the B side: from the workload to leaf B, core B, edge B and the upstream connection. A callout notes that capacity on the surviving path must be sufficient, because the B side now carries the full load. A SIDE B SIDE Upstream / WAN Edge AEdge router Edge BEdge router FAILEDCore ACore / spine Core BCore / spine Leaf AAccess / leaf Leaf BAccess / leaf WorkloadDual-homed CHECKCapacity on surviving pathThe B side now carries the full load Active path Redundant link Failed link Failure domain CONCEPTUAL
Path
Direction

Interactive model

How BGP picks a path in each direction

Conceptual illustration with example values. It does not depict a specific network or recommend specific attribute values.

  1. Outbound · your edges decide

    Outbound: local preference

    Inside your autonomous system, a higher local preference wins. In this example the primary path carries local preference 200 and the alternate 100 — the taller and shorter columns over the two edges — so outbound traffic uses the primary.

    • Decided on your edge routers
    • Example values: 200 primary, 100 alternate
  2. Inbound · the remote side decides

    Inbound: influence the other side

    You cannot set the neighbor’s preferences directly. Prepending your AS number on the alternate path (three times in this example, shown as three extra hops) makes it look longer, so the remote side prefers the primary.

    • Decided by the remote network
    • Example: alternate advertisement prepended three times
  3. Outbound · after a failure

    Outbound after a failure

    With the primary session down, its local-preference column is gone: only the alternate route remains and outbound traffic uses it. How quickly that happens depends on failure detection — for example BFD or hold timers.

    • Primary withdrawn (illustration)
    • Detection method decides how quickly traffic moves
  4. Inbound · after a failure

    Inbound after a failure

    When the primary advertisement is withdrawn, the remote side falls back to the prepended path. Confirming that both directions moved is part of the validation plan.

    • Remote side uses the longer path
    • Both directions validated after the change

When to bring us in

Situations this work is built for

  1. Traffic takes the wrong path

    Traffic uses a backup provider, a distant data center or a firewall it was never meant to cross, and nobody can say which attribute is responsible.

  2. Failover is slow, partial or one-directional

    Losing a link moves outbound traffic but not inbound, takes longer than expected, or strands some prefixes on the failed path.

  3. Redistribution has become fragile

    Routes move between BGP, an IGP and static routes at several points, and a change in one place causes loops, flapping or unexpected next hops elsewhere.

  4. A provider, site or cloud connection is being added

    A new ISP, circuit, Azure connection or acquired network has to join the routing policy without disturbing what already works.

Service details

Understand intended and observed paths

Every routing investigation begins by writing down what should happen, then establishing what does.

We start by stating the intended path for each traffic class that matters — which exit, which data center, which firewall — in both directions, because the outbound and inbound halves of a flow are decided independently. We then compare that intent with what the network is actually doing.

Once the evidence is laid side by side, the gap is usually explainable. Typical culprits are a local preference value set for a circuit that no longer exists, a more-specific prefix leaking from a branch, or a route learned over iBGP whose next hop is not reachable the way everyone assumed.

BGP path selection with local preference and AS-path prepending Conceptual illustration with example attribute values; it does not depict a specific network, and the values are not recommendations. On the left, a data center with router A on the primary path and router B on the alternate path. On the right, Azure or a remote site with edge A on the primary path and edge B on the alternate path. Each path carries traffic in both directions. Outbound, from the data center to the remote side, the primary path has a local preference of 200 and the alternate path 100, so outbound traffic uses the primary path because the higher local preference wins. Inbound, from the remote side to the data center, routes advertised over the alternate path are AS-path prepended three times while the primary path advertises its AS path as is, so the remote side prefers the shorter AS path and inbound traffic also returns on the primary path. ATTRIBUTE VALUES ARE EXAMPLES DATA CENTER AZURE / REMOTE SITE OUTBOUND → ← INBOUND Local preference 200 AS path as advertised Router APrimary path Edge APrimary path OUTBOUND → ← INBOUND Local preference 100 AS-path prepend ×3 Router BAlternate path Edge BAlternate path OUTBOUND · DATA CENTER → REMOTEHigher local preference wins200 beats 100 (example values), so trafficleaves on the primary path. INBOUND · REMOTE → DATA CENTERShorter AS path winsPrepending ×3 lengthens the alternate, sotraffic returns on the primary path. ILLUSTRATIVE BGP path selection with local preference and AS-path prepending Conceptual illustration with example attribute values; it does not depict a specific network, and the values are not recommendations. On the left, a data center with router A on the primary path and router B on the alternate path. On the right, Azure or a remote site with edge A on the primary path and edge B on the alternate path. Each path carries traffic in both directions. Outbound, from the data center to the remote side, the primary path has a local preference of 200 and the alternate path 100, so outbound traffic uses the primary path because the higher local preference wins. Inbound, from the remote side to the data center, routes advertised over the alternate path are AS-path prepended three times while the primary path advertises its AS path as is, so the remote side prefers the shorter AS path and inbound traffic also returns on the primary path. ATTRIBUTE VALUES ARE EXAMPLES DATA CENTER AZURE / REMOTE SITE OUTBOUND → ← INBOUND Local preference 200 AS path as advertised Router APrimary Edge APrimary OUTBOUND → ← INBOUND Local preference 100 AS-path prepend ×3 Router BAlternate Edge BAlternate OUTBOUND · DATA CENTER → REMOTEHigher local preference wins200 beats 100 (example values), so trafficleaves on the primary path. INBOUND · REMOTE → DATA CENTERShorter AS path winsPrepending ×3 lengthens the alternate, sotraffic returns on the primary path. ILLUSTRATIVE
Conceptual illustration with example values: primary and alternate paths where local preference selects the outbound path and AS-path prepending influences the inbound path. It does not depict a specific network.

Evidence we compare

  • Routes received from and advertised to each neighbor, with their attributes
  • Best-path selection on every device that makes a decision for the flow
  • The forwarding path traced in both directions
  • Neighbor state history and changes made around the time behavior shifted
  • Firewall and NAT points the flow crosses, which can make an asymmetric path fail even when routing looks correct
Conceptual enterprise routing model: two edge router appliances at the rear connect to three network domains on separate platforms through arcing blue fiber paths that take different routes around a central open space
Conceptual illustration Edge routers reaching separate network domains over distinct paths. Not a prescribed routing or high-availability design.

Review advertisements and redistribution

What you advertise, and where routes cross between protocols, determines what every other router can do.

We review what each router originates and accepts at every boundary — providers, data centers, branches, routing firewalls and cloud gateways — so filters accept only what a neighbor should send and advertise only what you mean to publish.

Mutual redistribution
Where routes pass from BGP into an IGP and back at more than one point, a route can be re-learned into the domain it came from with a more attractive preference, causing loops or suboptimal paths. Route tags and filters prevent it; fewer redistribution points prevent it more reliably.
Default-route origination
A default route should be advertised only while its originator has a working upstream. Conditional advertisement or tracking, where the platform supports it, stops an edge from attracting traffic it can no longer deliver.
Summarization and more-specifics
Forwarding always follows the longest matching prefix, while BGP attributes only compare paths to the same prefix. A stray more-specific advertisement therefore overrides a carefully tuned summary, whatever its attributes say.
Firewalls in the routing domain
When a firewall peers in BGP or carries static routes, its routing table and its security zones both shape the path. We review them together, an area that overlaps with our Palo Alto Networks consulting work.

Analyze route preference and failover

Path preference and failover are the same policy seen from two sides: what wins normally, and what wins when it is gone.

BGP path selection follows an ordered decision process. In the standard process, local preference is compared before AS-path length, so it governs outbound choice within your own autonomous system, while prepending and MED are only signals to neighbors that apply their own policy first. Vendor-specific steps such as weight, and options that change defaults such as how MED is compared, are confirmed against current documentation for your platforms and versions.

Common preference tools and what they actually influence
Attribute or mechanismScope of influenceCommon misunderstanding
Local preferenceOutbound path choice within your own autonomous systemExpecting it to influence how providers send traffic back to you
AS-path prependingHow other networks may choose inbound paths to your prefixesExpecting it to override a provider’s own local preference, which it generally cannot
MEDA hint to one neighboring AS about which entry point to useExpecting it to be compared across different providers by default

Failover analysis separates detection — hold timers, or BFD where supported — from convergence: how quickly the alternate path is installed everywhere, including firewalls, load balancers and cloud gateways that hold their own state. The high-availability design of the surrounding data center must agree with the routing policy, or a redundant pair can still fail as one.

Validate routing changes

A routing change is validated by comparing state before and after, not by the absence of complaints.

Every proposed change is written as a set of expected outcomes — prefixes advertised and received, paths selected, flows that move — and verified in both directions, including the return path.

  1. Record current routes, attributes and selected paths for the prefixes in scope
  2. Write the expected post-change state, including what should not change
  3. Stage the change so each step can be verified and reversed on its own
  4. Compare post-change state with expectations and trace representative flows in both directions
  5. Exercise failover on the affected paths and confirm withdrawal as well as advertisement

Cloud gateways need the same validation, and their preferences, route limits and propagation behavior differ from a traditional router. In Azure Virtual WAN, hub route tables and propagation settings are part of the routing model; our Azure hybrid connectivity planning guide covers the questions to settle first.

Document the routing model

The routing model is the written explanation of why traffic flows the way it does, short enough that people will read it.

A routing model is not a configuration export. It states the intent — preferred paths and why, where routes are filtered, summarized and redistributed, and how failover should behave — so the next engineer can tell a deliberate policy from an accident.

  • A routing domain diagram showing neighbors, autonomous systems and redistribution points
  • A policy table: per neighbor, what is accepted, what is advertised and which attributes are set
  • A preference and failover matrix for each critical traffic class, in both directions
  • Conventions for communities, route tags and policy naming, where they are used
  • Known exceptions, each with an owner and a reason

When the work began with an outage, the routing model also records the root cause and its evidence. Problems that span firewalls, NAT or cloud services are handled through advanced troubleshooting, and this specialty sits within our wider enterprise network engineering service for LAN/WAN and edge design.

Deliverables

What you receive

  • Intended-versus-observed path analysis

    For each traffic class in scope, the intended and observed paths and the policy or attribute that explains any difference.

  • Advertisement and redistribution review

    Findings on filters, origination, summarization, default routes and redistribution points, with recommended corrections.

  • Failover analysis

    How detection and convergence behave for each critical path, including the return direction and stateful devices along it.

  • Validated change plan

    Staged routing changes with expected state, verification steps and rollback triggers written for your platforms.

  • Routing model document

    Diagrams, policy tables and a preference and failover matrix that explain the design in plain terms.

FAQ

Questions buyers ask

Can you troubleshoot a BGP problem that is happening now?

Yes, as a scoped engagement. Tell us it is time-sensitive in your inquiry and we will say plainly whether and when we can start; we do not offer standby coverage or a committed response time.

Do you cover provider and Azure BGP sessions, or only internal routing?

Both. Provider sessions, internal BGP, firewall routing and Azure gateway routing are reviewed together, because path selection depends on all of them.

How does this differ from enterprise network engineering?

It is a specialty within it. Enterprise network engineering covers LAN/WAN, edge and implementation broadly; this service goes deep on routing policy, path preference and failover.

Start a project

Bring us a routing question

Describe the path behavior you expect and what you are seeing instead. We will follow up to discuss scope; routing tables and configurations are reviewed only once an engagement is agreed.

Start a project

Established 2001 · Over 25 years of infrastructure experience