cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
934
Views
0
Helpful
4
Replies

Filters BGP in ISP

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?

1 Accepted Solution

Accepted Solutions

Philip D'Ath
VIP Alumni
VIP Alumni

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

View solution in original post

4 Replies 4

Philip D'Ath
VIP Alumni
VIP Alumni

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

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!

It would be great if you could rate and mark helpful responses.  :-)

Jason M.
Level 1
Level 1

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.