<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/remove-private-bgp-as-numbers-from-the-as-path-bgp-labs-qsjwrl8xh" -->

---
title: Remove Private BGP AS Numbers from the AS Path « BGP Labs
description: A hands-on BGP lab exercise covering the removal of private AS numbers from the BGP AS path. When ISPs advertise customer prefixes to peers and upstream...
canonical: https://daily.dev/posts/remove-private-bgp-as-numbers-from-the-as-path-bgp-labs-qsjwrl8xh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Remove Private BGP AS Numbers from the AS Path « BGP Labs | daily.dev
og:description: A hands-on BGP lab exercise covering the removal of private AS numbers from the BGP AS path. When ISPs advertise customer prefixes to peers and upstream...
og:url: https://daily.dev/posts/remove-private-bgp-as-numbers-from-the-as-path-bgp-labs-qsjwrl8xh
og:image: https://api.daily.dev/og/posts/QsjWrL8xH.png
og:image:alt: Remove Private BGP AS Numbers from the AS Path « 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.

# Remove Private BGP AS Numbers from the AS Path « BGP Labs

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

## Summary

A hands-on BGP lab exercise covering the removal of private AS numbers from the BGP AS path. When ISPs advertise customer prefixes to peers and upstream providers, private AS numbers (like AS 65000) used internally by customers must be stripped from the AS path. The lab walks through identifying the problem in the BGP table, configuring the 'neighbor remove-private-as' feature on the relevant EBGP session, and verifying the result using FRRouting on a simulated ISP topology with netlab.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2024/02/bgp-labs-remove-private-as>

## Questions this post answers

### How do I remove private AS numbers from the BGP AS path when advertising customer prefixes to upstream peers?

Most BGP implementations support a 'neighbor remove-private-as' command (or equivalent) configured on the EBGP session facing the upstream peer or IX partner. After enabling it, a soft reset of the EBGP session may be needed to force the router to resend routing updates with the modified AS paths. This strips private AS numbers (64512–65535) before the updates leave your autonomous system.

_Network engineers configuring ISP BGP policies track lab exercises and implementation notes like this on daily.dev._

## Similar posts on daily.dev

- [Enforcing the First AS in BGP AS\_PATHs](https://daily.dev/posts/enforcing-the-first-as-in-bgp-as-paths-yx1xiadkj) · Cloudflare · 0 upvotes · 0 comments
- [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
- [A closer look at a BGP anomaly in Venezuela](https://daily.dev/posts/a-closer-look-at-a-bgp-anomaly-in-venezuela-wjsdlj7zk) · Cloudflare · 1 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/remove-private-bgp-as-numbers-from-the-as-path-bgp-labs-qsjwrl8xh)

```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":"Remove Private BGP AS Numbers from the AS Path « BGP Labs","url":"https://daily.dev/posts/remove-private-bgp-as-numbers-from-the-as-path-bgp-labs-qsjwrl8xh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/remove-private-bgp-as-numbers-from-the-as-path-bgp-labs-qsjwrl8xh"},"datePublished":"2026-08-11T08:55:35.914Z","dateModified":"2026-08-11T09:23:22.893Z","description":"A hands-on BGP lab exercise covering the removal of private AS numbers from the BGP AS path. When ISPs advertise customer prefixes to peers and upstream...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","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/remove-private-bgp-as-numbers-from-the-as-path-bgp-labs-qsjwrl8xh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"networking,bgp","timeRequired":"PT4M"}
{"@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":"Remove Private BGP AS Numbers from the AS Path « BGP Labs"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/remove-private-bgp-as-numbers-from-the-as-path-bgp-labs-qsjwrl8xh#faq","mainEntity":[{"@type":"Question","name":"How do I remove private AS numbers from the BGP AS path when advertising customer prefixes to upstream peers?","acceptedAnswer":{"@type":"Answer","text":"Most BGP implementations support a 'neighbor remove-private-as' command (or equivalent) configured on the EBGP session facing the upstream peer or IX partner. After enabling it, a soft reset of the EBGP session may be needed to force the router to resend routing updates with the modified AS paths. This strips private AS numbers (64512–65535) before the updates leave your autonomous system. Network engineers configuring ISP BGP policies track lab exercises and implementation notes like this on daily.dev."}}]}
```

