Is there any way of having a filter that uses as-path origin and prefix-list together. For example I want to accept updates from origin of AS 5745 and prefix-list is say 189.150.20.X/24. Any other prefix from origin AS 5745 will be denied.


  • Are you directly connected to AS 5745?
    – Ron Maupin
    Jul 20 '19 at 22:53
  • No, it is few hops away. Jul 20 '19 at 22:54
  • I forgot to mention AS 5745 here originator Jul 20 '19 at 22:57

For Cisco IOS, You can have more than one match criteria, and they will be processed as a logical AND.

For example

Route-map mymap permit 10
 Match as-path access-list abc
 Match ip prefix-list def

The route map will only match prefixes that match abc AND def.

For IOS-XR, there is a more flexible method than route- maps called RPL.

  • Thanks for the answer, I tested it and got it working. Do you know if it possible to apply more than one route maps to the same neighbor? Jul 20 '19 at 23:50
  • or is it possible to process matching criterias as a logical or? Jul 20 '19 at 23:58
  • Yes you can add another stanza: route-map mymap permit 20
    – Ron Trunk
    Jul 21 '19 at 0:04
  • But how do I apply them to the same peer? It looks like last route map is overriding the earlier ones when multiple route map is applied. Or is there anything like match route-map filter to combine multiple route-maps under the single one, so I can apply this to peer? Jul 21 '19 at 0:19
  • If the prefix doesn’t match mymap 10, it will try it against mymap 20. You can add as many stanzas as you like.
    – Ron Trunk
    Jul 21 '19 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.