Routing

last person joined: 4 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  AS Path Regular Expression

    Posted 03-12-2011 22:25

    Hi

     

    My scenario is like this. My AS (65000) is connected to other AS like this. My AS (65000)->AS1(65001)->AS2(65002)->AS3 (Any no)->  and so on.

     

    In My AS I want to filter the routes coming from AS1 but generated in AS3 or next AS no (not in AS1 and AS2). What would be the regular expression for this.

     

    Thanks



  • 2.  RE: AS Path Regular Expression
    Best Answer

    Posted 03-13-2011 05:11

    How about having multiple terms? Define , as-path AS1 and AS2 for routes originated from AS1 and AS2

    as-path AS1 ".* 65001"

    as-path AS2 ".* 65002"

     

    then reject routes matching as-path AS1 and AS2

     

    term reject-AS {

      from {

         as-path AS1

         as-path AS2

      }

     then reject

    }

     

    You can match another AS-Path which will accept the routes generated from AS3 and above..

     



  • 3.  RE: AS Path Regular Expression

    Posted 03-13-2011 06:03

    Thanks. I tested if we accept the routes originating from the AS using these regular expression then in second term we can change the attributes of other routes.

     

     



  • 4.  RE: AS Path Regular Expression

    Posted 12-11-2018 18:19

    Hello,

     

    I am doing research and come across this, and would like to seek for advice or idea about my case. I have as-path from Cisco XR config as below and what is the equivalent on Junos?

    as-path-set CUST1
         ios-regex '_12345_',
         ios-regex '_12345$',
         ios-regex '_12367$'
    end-set

     

    Thanks in advance,



  • 5.  RE: AS Path Regular Expression



  • 6.  RE: AS Path Regular Expression

    Posted 12-11-2018 18:57

    Hi,

     

    Because 3 different lines of Cisco config is 3 different condition, So I dont think single line of "as-path" is equal. Do you think as-path-group is the correct one? Would you mind provide an example?

     

    Appreciate your input,



  • 7.  RE: AS Path Regular Expression

     
    Posted 12-11-2018 19:33

    show policy-options
    as-path-group CUST1 {
    as-path 1 ".* 12345 .*";
    as-path 2 ".* 2345";
    as-path 3 ".* 12367";
    }



  • 8.  RE: AS Path Regular Expression

    Posted 12-14-2018 17:22

    Awesome, thank you very much for your input.