BGP Routes

Unanswered Question
May 9th, 2007

What's the best way to limit learning inbound prefixes from an ISP. I was going to create a filter-list that would limit learning only the networks I am advertising out, but how would I inject a route besides the ones being advertised out.

Pls advise

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (3 ratings)
mounir.mohamed Wed, 05/09/2007 - 07:56

Dear kcgeorge1218,

Could you clarify more!! are u asking about how to inject more routes into BGP table to be advertised out to your ISP, or you just need to limit the number of routes received from your ISP!

Waiting your clarification.

kcgeorge1218 Wed, 05/09/2007 - 08:06

Hi Mounir - I am advertising 10 subnets to my ISP. When I check learnt routes from my ISP, I am learning more than the 10 advertised routes. I want to limit the routes that I am learning from my ISP. Can I create a filter-list to learn only the routes I am advertising or shd I create an as-path access-list permitting all the learnt routes from my ISP.

My other question is, apart from the 10 routes being advertised, can I put in a default route to my ISP, like ?

mounir.mohamed Wed, 05/09/2007 - 08:17


1st you advertising 10 routes to your ISP that's ok, and you learn other 10 route from you ISP and you want to limit the number of routes received from your ISP, OK this can be done using different way like that:

1-Create prefix-list that contain the routes you need form your ISP (for example default and ISP customers) and apply it on face you ISP peer.

ip prefix-list test permit

ip prefix-list test permit

ip prefix-list test permit

router bgp ASN

neighbor x.x.x.x prefix-list test in

2-using filter-list to only accept routes originated by the ISP ASN or directlly attached peers (not recommedned in ur case)

2nd You can advertise out default route to your ISP by using neighbor default-originate command, BUT sure your ISP will never accept something like that.

also there is no relation between the number of advertised routes and the number of received routes, u may receive full internet routing table from your ISP while u only advertise your own network (Only on Class C ofr example)

If you have more questions go on and post it

Pleae rate helpful posts.

Best Regards,

Mounir Mohamed

kcgeorge1218 Wed, 05/09/2007 - 08:25

How would I route to a network that's not in the 10 routes that I am advertising to my my ISP ? This where I get a bit thrown off..

Pls advise

mounir.mohamed Wed, 05/09/2007 - 08:32

i'm still can not understand your needs!

But as far as i Understood, u can route one network to null0 and inject it to the BGP table by redistribute or network command.

If you share you topology and your problem in details i will be grateful.

kcgeorge1218 Wed, 05/09/2007 - 09:30

I am sorry, shd have phrased the question clearly.

There are 2 Internet routers,Rtr-1 peers with ISP-A and Rtr-2 peers with ISP-B. Both are advertising 10 subnets out but learning full Internet routing tables from their respective ISPs. Plan to restrict the full internet routes that I am learning from my ISPs, which I can by using prefix-filters.

My question after doing that, will I be able to get to an external network outside the range of the original 10 subnets advertised to my ISPs.

bjornarsb Wed, 05/09/2007 - 09:44


Now I think I have understood your case.

If your providers dont send a default route to you, you must ask them to. (or just configure a static one)

If the do, accept the incomming default route.

You probably have done this, but check

if you receive the default route by issuing

sh ip bgp nei x.x.x.x rec rout.


sh ip bgp nei x.x.x.x. rout

Using this to CMD's you will be able to compare what you have received with what you have learned!




kcgeorge1218 Wed, 05/09/2007 - 09:55

My received routes and learned routes show up to be the same. Going back to yr suggestion on static, can I add a default route pointing to my ISP as next hop ?

mounir.mohamed Wed, 05/09/2007 - 23:20

Dear kcgeorge1218,

what do you mean by (able to get to an external network outside the range of original 10 subnets advertised to my ISPs)

BTW, you can advertise any number of subnets as soon as this subnets belong to your range (Registered in RIP/Afrinic/ARIN..etc) and as your provider updated the filtering to accept that.

Best Regards,

Mounir Mohamed

bjornarsb Wed, 05/09/2007 - 08:01


I quess you want this ?

To control how many prefixes can be received from a neighbor, use the neighbor maximum-prefix command in router configuration mode.



mounir.mohamed Wed, 05/09/2007 - 08:04

You also guess :) that's why i asking for more details to replay with the applicable solution, BTW we waiting for his feed back.


This Discussion