Cisco Support Community
Community Member

BGP Using Private AS Numbers

HI Sir/ Madam,

This is my first posting in this forum.

I have couple of queries, and will be thank ful for replying to them.

I am using a using a Private AS Number and i have a Public IP address in 195.X.X.X/24 range registered from Ripe.

We planned to shift the existing ISP and have suscribed to a new ISP. The new ISP has given a subnet in range 212.X.X.X/24 for my use.

I have asked the new ISP to advertise 195.X.X.X/24 through them. By default they were advertising 212.X.X.X/24 through them.

We have configured BGP between the ISP and my router and i am using a private As 65202.

I had only a default route towards the ISP and there are no distribute lists in my router.

When i was using 212.X.X.X/24 in my LAN which is the IP range given by the ISP to me, i was able to reach all over the internet.

However, when i tried with my old Subnet 195.X.X.X/24 i was able to reach some part of the internet while some very famous sites such as and were not accessable.

After trouble shooting, my ISP said that it takes 24-48 Hours for their upstreams to update their "FILTERS".

After 24-48 hours were passed, i still was not able to reach and from 195.X.X.X/24 network.

When i enquired, they said that there upstream have blocked the Private AS's.

And as a solution, the ISP said that they would hide my Private AS and advertise this 195.X.X.X/24 network as being originated by them.

I would request you to please let me know on the below :

1. What does the " Update of the FILTERS " mentioned above means?.

2. How did my new ISP hide my private AS Numbers?

3. If i have connection from two ISP's (ISP1 and ISP2)and i am using BGP with them, how can i ensure that all traffic to reach me from internet is via ISP1 and incase ISP1 is down, via ISP2....

4. In RIPE Looking glass for some networks i see repeated AS Numbers, for examble...

BGP routing table entry for 199.X.X.0/24

Paths: (7 available, best #5, table Default-IP-Routing-Table)

Not advertised to any peer

16186 16186 16186 16186 16186 3549 4637 23649

Look for the repeated " 16186 " above. How can i configure that my network has a path with my AS repeated. I am told this way, i can make one path preferred than the other. Hence is the question.

Thanks in advance for replying and solving my quries.


Vamsi Krishna


Re: BGP Using Private AS Numbers


A1) an ISP might have a peering contract with another ISP stating something about announced routes. As your IP network is not belonging to your ISP this might have been filtered (BGP update not accepted) by upstream ISPs.

A2) There is a command which says "remove-private-as" when sending BGP updates to a peer. So it is rather simple with a Cisco router, actually one line of configuration.

A3) This is more tricky than it seems at the first look. One answer could be: you can not. In fact every AUTONOMOUS system can influence where they think the best (for them) return path is. All you can do is to give "hints" to the internet. The most reliable situation can be achieved in case your ISP1 and ISP2 are directly peering. Use AS path prepending (longer path is worse) to control return traffic.

A4) Configuring AS path prepending ("repeated AS") is configured like this:

router bgp 65000

neighbor remote-as 65500

neighbor route-map ASprep out

route-map ASprep permit 10

match ip address prefix-list 123

set as-path-prepend 65000 65000 65000 65000

ip prefix-list 123 seq 5 permit 195.X.X.X/24

This way you will insert your AS number 4 times (which should be sufficient for all customers).

Hope this helps! Please rate all posts.

Regards, Martin

Community Member

Re: BGP Using Private AS Numbers

Dear Martin,

Thanks, it was kind of you to answer my queries. Can you please tell me any specific reason why an ISP should block some networks being advertised by its down stream. Since if every ISP is selective in the blocks that it would accpet from down streams, then we might not have a fully reachable internet. And more over, each ISP would then have to contact thier respective UP Streams to update there filters and to what extent will this happen?... Awaiting a response. Please reply. Thanks.

Re: BGP Using Private AS Numbers


good question ... and valid point. Still it depends on the peering contract your ISP has. It is not inevitably so, that he is transit AS for all internet traffic and might only have one upstream ISP at all. You should be able to see this by looking at the whois entry of your ISP AS (go to or

In fact thinking about the specific scenario you described, it might be also that your private AS in the AS path was blocked and thus not reachable.

Hard to tell afterwards.

In case you run into those problems again, I would go to, which has a list of looking glasses and route server, which allow you to investigate different ISP BGP tables. from there you can see your network and what AS path and other settings there are, or where it is missing.

Hope this helps! Please rate all posts.

Regards, Martin

CreatePlease to create content