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

As Path Filtering

Hello,

I am receiving a BGP global routing table. I want to filter all of them and only allow with the following AS Numbers.

example:

1234 1111

1234 2222

1234 3333

1234 4444

1234 5555

1234 6666

Please help me.

2 ACCEPTED SOLUTIONS

Accepted Solutions

As Path Filtering

1234 1111

1234 2222

1234 3333

1234 4444

1234 5555

1234 6666

Sounds like you want to accept only the AS Paths of 1234 and or [1111,2222,3333,4444,5555,6666]

R1---->ISP1

ip as-path 1 permit ^1234_1111$

ip as-path 1 permit ^1234_2222$

ip as-path 1 permit ^1234_3333$

ip as-path 1 permit ^1234_4444$

ip as-path 1 permit ^1234_5555$

ip as-path 1 permit ^1234_6666$

router bgp 1

neighbor x.x.x.x remote-as x

neighbor x.x.x.x route-map FILTERME in

route-map FILTERME permit 10

match as-path 1

As Path Filtering

which is described in case 2 in my post above !

8 REPLIES

As Path Filtering

New Member

As Path Filtering

not much information.

As Path Filtering

Yeah, reading is difficult or would you perhaps like us to write it out for you?

Your issue seems to be about filtering prefixes with a certain path list which is described in the link as follows:

Only Allow Networks That Have Passed Through AS 4 to Enter AS 3
If you want only the networks that have passed through AS 4 to enter AS 3 from Router 3, you can apply an inbound filter on Router 3.

ip as-path access-list 1 permit _4_

router bgp 3
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 route-map foo in

route-map foo permit 10
match as-path 1

As Path Filtering

your question not very specific !

- do you want the AS path to be match based on the existence of the above AS numbers in the path

for example any AS path has 1234 1111 in it

- or do you want to the AS path to be exact match

for example only route with AS path 1234 1111

for case 1 you can use AS path like _1234_1111_

for case 2 you can use AS path like  ^1234_1111$

hope this help

if helpful Rate

As Path Filtering

1234 1111

1234 2222

1234 3333

1234 4444

1234 5555

1234 6666

Sounds like you want to accept only the AS Paths of 1234 and or [1111,2222,3333,4444,5555,6666]

R1---->ISP1

ip as-path 1 permit ^1234_1111$

ip as-path 1 permit ^1234_2222$

ip as-path 1 permit ^1234_3333$

ip as-path 1 permit ^1234_4444$

ip as-path 1 permit ^1234_5555$

ip as-path 1 permit ^1234_6666$

router bgp 1

neighbor x.x.x.x remote-as x

neighbor x.x.x.x route-map FILTERME in

route-map FILTERME permit 10

match as-path 1

New Member

As Path Filtering

Thank you very much. This is what i am looking for.

As Path Filtering

which is described in case 2 in my post above !

As Path Filtering

And even in my post, scenario 4

Only Allow Networks Originated from AS 4, and ASs Directly Attached to AS 4, to Enter Router 1

Thnx4notrating

Leo

560
Views
0
Helpful
8
Replies
CreatePlease login to create content