cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1206
Views
0
Helpful
8
Replies

As Path Filtering

Cisco-Spider
Level 1
Level 1

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

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

View solution in original post

which is described in case 2 in my post above !

View solution in original post

8 Replies 8

lgijssel
Level 9
Level 9

not much information.

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

Marwan ALshawi
VIP Alumni
VIP Alumni

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

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

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

which is described in case 2 in my post above !

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card