BGP Remove Private AS


The imperial museum corporation has many museums around the world. All networks are connected and BGP is used as the routing protocol. One of the autonomous systems is a transit AS and has two autonomous systems behind it with private AS numbers. You want to ensure that nobody sees those private AS numbers without having trouble with reachability.


  • All IP addresses have been preconfigured for you.
  • Configure EBGP between AS 1 and AS 2.
  • Configure EBGP between AS 2 and AS 65503.
  • Configure EBGP between AS 2 and AS 65504.
  • Advertise the loopback0 interfaces on router Kaiser and Caesar.
  • Ensure AS 1 doesn’t see the private AS numbers but has connectivity to network /24 and /24.




BGP Remove Private AS

Video Solution:

Configuration Files

You need to register to download the GNS3 topology file. (Registration is free!)

Once you are logged in you will find the configuration files right here.

Opt In Image
Do you want your CCNA or CCNP Certificate?

The How to Master series helps you to understand complex topics like spanning-tree, VLANs, trunks, OSPF, EIGRP, BGP and more.

Written by René Molenaar - CCIE #41726

You May Also Like

About the Author: Rene Molenaar

René - CCIE #41726 is the creator of where he shares CCNA, CCNP and CCIE R&S labs. He also blogs about networking on


  1. good lab

    thot this was good reading:

    really interesting that apparently “remove-private-as” only works with contiguous BGP private AS paths… it does not work with co-mingled/mixed public & private AS numbers.

    “If the AS_PATH includes both private and public AS numbers, BGP doesn’t remove the private AS numbers. This situation is considered a configuration error.”

    added router “Nero” in AS 5 off of router Caesar (AS 65504)… “remove-private-as” still works for Kaiser & Caesar AS paths but not for Nero:

    Emperor#sh ip bgp | b Net
    Network Next Hop Metric LocPrf Weight Path
    *> 0 2 i
    *> 0 2 i
    *> 0 2 65504 5 i

    kool 🙂

Comments are closed.