05-18-2016 01:51 PM - edited 03-05-2019 04:02 AM
Hi, I have setup some BGP communities for my customers to change the local_pref which are working however I wanted to know if the following config would work in reference to below config.
Basically I setup a community called 6666 that will backhole a prefix of the customers desire, basically sending it to null0 on my router. Is this the best way to do this ?
route-map customer-communities, permit, sequence 60
Match clauses:
community (community-list filter): 6
Set clauses:
ip next-hop 6.6.6.6
Policy routing matches: 0 packets, 0 bytes
also I would like the customer to do AS prepend via bgp communities but im confused on what AS to prepend or the best away to go about this. I'm assuming that I should be prepending the customer AS and no mine correct? so in order to achieve this I have the following setup, note that im using prepend last-as because I think i will need to prepend their AS# and no mine and this will achieve this.
route-map customer-communities, permit, sequence 40
Match clauses:
community (community-list filter): 4
Set clauses:
as-path prepend last-as 2
Policy routing matches: 0 packets, 0 bytes
route-map customer-communities, permit, sequence 50
Match clauses:
community (community-list filter): 5
Set clauses:
as-path prepend last-as 4
Policy routing matches: 0 packets, 0 bytes
TIA, Paul
05-18-2016 09:48 PM
I don't think I would give customers the ability to random black hole prefixes. Very dangerous.
You could just as easily create a static NULL route yourself, and redistribute that static into BGP.
On the customers CPE, a typical path prepend might look like:
route-map customer-out permit 10
set as-path prepend <ASN> <ASN> <ASN> <ASN>
router bgp <ASN>
neighbor a.b.c.d route-map customer-out out
05-19-2016 07:35 AM
point take on the black hole idea. however i know how to set AS prepend from the customers view using a route-map like you have above. What i want is the customer to just send a predefined community tag that will prepend on my router, the ISP router.
i not sure if this will prepend the customer AS#, im assuming that is what I want to do, prepend the customer AS and not mine and that the set as-path prepend last-as does this.
route-map customer-communities, permit, sequence 50
Match clauses:
community (community-list filter): 5
Set clauses:
as-path prepend last-as 4
Policy routing matches: 0 packets, 0 bytes
05-19-2016 12:12 PM
Wouldn't using MED be much simpler in this case?
I don't know if the route-map given will work or not.
05-19-2016 01:00 PM
Philip, im going with the original config posts, i think its going to work as for the remote blackhole, there is an ip prefix-list in place that will only allow customers to blackhole their own subnets.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide