Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

BGP Filter all routes except default route

How do you configure BGP to filter out all routes except the default route that is being advertised by our ISP?

3 REPLIES
New Member

Re: BGP Filter all routes except default route

Re: BGP Filter all routes except default route

Hello,

you can apply an inbound filter based on a prefix-list. The config could look like this (adjust AS, IP addresses nd the like) assuming your official IPs are 1.1.0.0/16:

router bgp 65000

no synchronization

network 1.1.0.0 mask 255.255.0.0

neighbor 1.2.2.1 remote-as 1 !ISP BGP peer

neighbor 1.2.2.1 prefix-list OnlyDef in

neighbor 1.2.2.1 filter-list 1 out

no auto-summary

ip as-path access-list 1 permit ^$

ip prefix-list OnlyDef permit 0.0.0.0/0

ip route 1.1.0.0 255.255.0.0 Null 0 250

Hope this helps! Please rate all posts.

Regards, Martin

Re: BGP Filter all routes except default route

Hello Martin

I believe he's actually asking for the opposite:

"How do you configure BGP to filter out all routes except the default route that is being advertised by our ISP?"

He needs to filter out everything but the default route. (which I think its better to filter out, when you have more than 1 destination, not this case though)

I'd suggest to do the opposite.

Set

neighbor IP prefix-list def-out out

Besides, that your config looks neat.

vlad

1795
Views
0
Helpful
3
Replies
CreatePlease to create content