01-12-2012 12:37 PM - edited 03-04-2019 02:53 PM
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.
Solved! Go to Solution.
01-13-2012 07:58 AM
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
01-13-2012 03:22 PM
which is described in case 2 in my post above !
01-12-2012 12:49 PM
You may find the following link useful:
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094a92.shtml
regards,
Leo
01-12-2012 12:56 PM
not much information.
01-12-2012 01:05 PM
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
01-12-2012 07:41 PM
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
01-13-2012 07:58 AM
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
01-13-2012 10:21 AM
Thank you very much. This is what i am looking for.
01-13-2012 03:22 PM
which is described in case 2 in my post above !
01-13-2012 11:58 PM
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
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