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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

How to block a incomplete origin code route in BGP

Hi Fellow Networkers,

I was trying to block a BGP route with incomplete origin code(?) but got no luck.

i tried route-map but there is no match statement for origin code, i also tried regular expression but still it didn,t work...

Routers are connected in below mentioned fashin.

R1 <---> R2 <---> R3

BGP route is coming from R1 and i am stopping it on R3.

any help really appreciated.

3 REPLIES
Hall of Fame Super Silver

Re: How to block a incomplete origin code route in BGP

Hello Mohinder,

? is a special character in reg exp.

try to use \? to say you want match exactly char '?'

Hope to help

Giuseppe

New Member

Re: How to block a incomplete origin code route in BGP

Hi Guisiar,

Thanks for the reply.

but how to stop the incomplete route..normally regular expression we use with as-path acccess list. but we have to stop a route with incomplete origin code so we can,t use regular expression.

do you know any method to block origin code with regular expression.

Mahi

Hall of Fame Super Silver

Re: How to block a incomplete origin code route in BGP

Hello Mahi,

what you write inside an as path list is actually a regular expression

define an as path list that matches ? at the end of as path

\?$

use the as-path access-list inside a route-map

route-map stop-incomplete deny 10

match as-path X

match ip address

route-map stop-incomplete permit 20

empty block to permit all other routes

apply the route-map inbound on R3 on the BGP session with R2 and you should get the result.

Hope to help

Giuseppe

463
Views
0
Helpful
3
Replies