06-04-2016 02:59 PM - edited 03-05-2019 04:09 AM
HI everyone. I have to configure filters in bgp routers to deny all /30 routes and routes with the ORIGIN incomplete( redistribute on bgp). How can i made that with access-list? or i have to used prefix-list?
Solved! Go to Solution.
06-04-2016 11:53 PM
I'm not completely sure of the answer.
I always use prefix lists. I think a prefix like this would probably work to block /30's and /31's (it will only accept a prefix length of 29 or less). In this case, I am matching what I want, and relying on the default "deny" to drop everything else.
ip prefix-list block_30_31 seq 5 permit 0.0.0.0/0 le 29
I'm not sure how to match "origin incomplete", but you can use the route-map command "match source-protocol". So if you match every source protocol you expect to use, that should automatically result in unknown origins being dropped.
(config-route-map)#match source-protocol ?
bgp Border Gateway Protocol (BGP)
connected Connected
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
isis ISO IS-IS
lisp Locator ID Separation Protocol (LISP)
mobile Mobile routes
ospf Open Shortest Path First (OSPF)
ospfv3 OSPFv3
rip Routing Information Protocol (RIP)
static Static routes
06-04-2016 11:53 PM
I'm not completely sure of the answer.
I always use prefix lists. I think a prefix like this would probably work to block /30's and /31's (it will only accept a prefix length of 29 or less). In this case, I am matching what I want, and relying on the default "deny" to drop everything else.
ip prefix-list block_30_31 seq 5 permit 0.0.0.0/0 le 29
I'm not sure how to match "origin incomplete", but you can use the route-map command "match source-protocol". So if you match every source protocol you expect to use, that should automatically result in unknown origins being dropped.
(config-route-map)#match source-protocol ?
bgp Border Gateway Protocol (BGP)
connected Connected
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
isis ISO IS-IS
lisp Locator ID Separation Protocol (LISP)
mobile Mobile routes
ospf Open Shortest Path First (OSPF)
ospfv3 OSPFv3
rip Routing Information Protocol (RIP)
static Static routes
06-05-2016 12:46 PM
The first answer works perfect,thanks!. The second one doesn't work because when i use match source-protocol, the routes with origin incomplete have source protocol bgp.
I found that i can use match origin igp and egp, so i can accept routes with those origins and discard the incomplete.
Thanks for the help!
06-05-2016 01:43 PM
It would be great if you could rate and mark helpful responses. :-)
06-05-2016 04:10 PM
It's pretty easy to do in XR using a route policy but I'm assuming you're talking about IOS. Would it be possible for you to tag the routes during redistribution or add a community to them? If so, you can just match those with a route map.
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