Hello,
I'm fairly new to BGP and I want to make sure that these sorts of filters are what I'm looking for. Here's my scenario. I have a router with a lot of internal addresses and other sorts of routes that I don't want advertised upstream. On my peer configuration I have redistribute-static=no, redistribute-connected=no and all other redistribute options set to no. Currently, I have some "test" routers upstream that do receive my blocks correctly. I accomplished this by using network statements and configuring a routing filter as follows:
0 chain=ISP1 prefix=X.X.X.0/21 prefix-length=21-32 invert-match=no action=accept set-bgp-prepend=5
1 chain=ISP1 prefix=Y.Y.Y.0/21 prefix-length=21-32 invert-match=no action=accept set-bgp-prepend=5
2 chain=ISP1 invert-match=no action=discard
3 chain=ISP2 prefix=X.X.X.0/21 prefix-length=21-32 invert-match=no action=accept
4 chain=ISP2 prefix=Y.Y.Y.0/21 prefix-length=21-32 invert-match=no action=accept
5 chain=ISP2 invert-match=no action=discard
We have two upstream providers, and I want our path to "ISP1" to be seen as not preferred, and have ISP2 be the more attractive route to routers upstream. Am I correct in that these filters will suitably prevent any routes from being advertised by my router that do not fall under my x.x.x.0/21 and y.y.y.0/21 blocks, and that "ISP1" will have our AS number prepended 5 times to the AS path list?
Also, is the correct way to apply a BGP filter or am I taking the wrong approach?
Thank you in advance for any assistance.