<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/merge-networks-using-different-bgp-as-numbers-bgp-labs-eqhft1bem" -->

---
title: Merge Networks Using Different BGP AS Numbers « BGP Labs
description: An expert-level BGP lab challenge simulating a real-world merger and acquisition scenario where two organizations with different BGP AS numbers (AS65000...
canonical: https://daily.dev/posts/merge-networks-using-different-bgp-as-numbers-bgp-labs-eqhft1bem
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Merge Networks Using Different BGP AS Numbers « BGP Labs | daily.dev
og:description: An expert-level BGP lab challenge simulating a real-world merger and acquisition scenario where two organizations with different BGP AS numbers (AS65000...
og:url: https://daily.dev/posts/merge-networks-using-different-bgp-as-numbers-bgp-labs-eqhft1bem
og:image: https://api.daily.dev/og/posts/eQhfT1beM.png
og:image:alt: Merge Networks Using Different BGP AS Numbers « BGP Labs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Merge Networks Using Different BGP AS Numbers « BGP Labs

**[ipSpace.net Blog](https://daily.dev/sources/ipspace)** · 5 min read · 0 upvotes · 0 comments

## Summary

An expert-level BGP lab challenge simulating a real-world merger and acquisition scenario where two organizations with different BGP AS numbers (AS65000 running OSPF and AS65003 running IS-IS) must be interconnected. The task requires establishing a single BGP session between PE2 and PE3 without disrupting existing operations, ensuring each organization's AS number does not appear in the other's advertised AS paths to external peers, and achieving optimal end-to-end routing where BGP next hops point directly to the final egress router of the merged network.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2023/12/bgp-challenge-merge-networks>

## Questions this post answers

### How do I merge two BGP networks with different AS numbers without leaking each other's AS in the AS path to external peers?

Each network must strip or replace the other's AS number before advertising prefixes to external peers. The interconnect BGP session between the two border routers (e.g., PE2 and PE3) must be configured so that routes learned from one AS are re-advertised externally using only the local AS. Techniques such as AS-path manipulation (remove-private-as, local-as, or route-map rewriting) are applied on the border routers to satisfy external AS-path filters.

_Engineers navigating post-merger BGP integration track solutions like this on daily.dev._

### What does 'BGP next hop must be the final egress router' mean in a merged network scenario?

It means that when a router inside the merged network looks up a prefix in its BGP table, the next-hop IP address should be the actual border router that exits the merged network toward the destination, not an intermediate router. This requires next-hop propagation across the iBGP mesh of both organizations so that route reflectors pass the original next-hop unchanged, enabling optimal traffic paths without unnecessary hops.

_Keeping BGP architecture decisions like this sharp is easier when merged-network case studies surface where you already read._

## Similar posts on daily.dev

- [Running Your Own AS: BGP on FreeBSD with FRR, GRE Tunnels, and Policy Routing](https://daily.dev/posts/running-your-own-as-bgp-on-freebsd-with-frr-gre-tunnels-and-policy-routing-2autkoulu) · Lobsters · 1 upvotes · 0 comments
- [BGP-Free Core with SR-MPLS « ipSpace.net blog](https://daily.dev/posts/bgp-free-core-with-sr-mpls-ipspace-net-blog-h7kronzy3) · ipSpace.net Blog · 0 upvotes · 0 comments

---

Tags: [#bgp](https://daily.dev/tags/bgp)

[View this post on daily.dev](https://daily.dev/posts/merge-networks-using-different-bgp-as-numbers-bgp-labs-eqhft1bem)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Merge Networks Using Different BGP AS Numbers « BGP Labs","url":"https://daily.dev/posts/merge-networks-using-different-bgp-as-numbers-bgp-labs-eqhft1bem","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/merge-networks-using-different-bgp-as-numbers-bgp-labs-eqhft1bem"},"datePublished":"2026-08-11T08:55:32.153Z","dateModified":"2026-08-11T09:35:40.816Z","description":"An expert-level BGP lab challenge simulating a real-world merger and acquisition scenario where two organizations with different BGP AS numbers (AS65000...","image":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","thumbnailUrl":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","isAccessibleForFree":true,"articleSection":"ipSpace.net Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ipSpace.net Blog","logo":"https://media.daily.dev/image/upload/s--xS7E82MT--/f_auto,q_auto/v1786438303/logos/ipspace?_a=BAMAMicg0","url":"https://daily.dev/sources/ipspace"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/merge-networks-using-different-bgp-as-numbers-bgp-labs-eqhft1bem","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"bgp","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ipSpace.net Blog","item":"https://daily.dev/sources/ipspace"},{"@type":"ListItem","position":3,"name":"Merge Networks Using Different BGP AS Numbers « BGP Labs"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/merge-networks-using-different-bgp-as-numbers-bgp-labs-eqhft1bem#faq","mainEntity":[{"@type":"Question","name":"How do I merge two BGP networks with different AS numbers without leaking each other's AS in the AS path to external peers?","acceptedAnswer":{"@type":"Answer","text":"Each network must strip or replace the other's AS number before advertising prefixes to external peers. The interconnect BGP session between the two border routers (e.g., PE2 and PE3) must be configured so that routes learned from one AS are re-advertised externally using only the local AS. Techniques such as AS-path manipulation (remove-private-as, local-as, or route-map rewriting) are applied on the border routers to satisfy external AS-path filters. Engineers navigating post-merger BGP integration track solutions like this on daily.dev."}},{"@type":"Question","name":"What does 'BGP next hop must be the final egress router' mean in a merged network scenario?","acceptedAnswer":{"@type":"Answer","text":"It means that when a router inside the merged network looks up a prefix in its BGP table, the next-hop IP address should be the actual border router that exits the merged network toward the destination, not an intermediate router. This requires next-hop propagation across the iBGP mesh of both organizations so that route reflectors pass the original next-hop unchanged, enabling optimal traffic paths without unnecessary hops. Keeping BGP architecture decisions like this sharp is easier when merged-network case studies surface where you already read."}}]}
```

