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.
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.
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 0.0.0.0 ?
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 18.104.22.168/24
ip prefix-list test permit 22.214.171.124/24
ip prefix-list test permit 126.96.36.199/24
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 188.8.131.52 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.
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.
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.
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!
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 ?
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.
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.