Junos OS

last person joined: 8 hours ago 

Ask questions and share experiences about Junos OS.
  • 1.  Orginating As in AS-PATH

    Posted 07-12-2011 23:42

    Hello Community

     

    Can some one please tell where do the originating AS exsists in the AS-Path sequence i.e at right most side or at left most side.

     

    For example : AS 65000 AS 65002 AS 65003 (172.16/12)

     

    If my local as is 65000 i will recieve the 172.16/12 subnet from 65003 with AS-Path as follows

     

    172.16/12 AS-Path 65000 65002 65003(Originating As appears at right most side)

                                                         OR

     

    172.16/12 AS-Path 65003 65002 65000(Originating As appears at left most side)

     

    & what if just want to accept only the routes that originate in my adjacent AS wil Regex ".*adjacent As" suffice.

     

    Thanks & Regards

    Malik

     



  • 2.  RE: Orginating As in AS-PATH

    Posted 07-13-2011 00:12

    Hi,

     

    The originating AS is at the right most side.

    If you want to receive prefixes originated only by neighboring AS, than it is as simple as this: "."



  • 3.  RE: Orginating As in AS-PATH

    Posted 07-13-2011 01:03

    Hello Dumitru

     

    Thnak you

     

    Does this Regex for matching neighboring As is wrong

     

    ".*Neighbor As Number"

     

    I mean what is wrong with the Regex above.

     

    Regards

     

    Malik



  • 4.  RE: Orginating As in AS-PATH

    Posted 07-13-2011 01:33

    Hello,

     


    If you want to receive prefixes originated only by neighboring AS, than it is as simple as this: "."


    This regex does not allow prepending.

     

    Rgds

    Alex
     



  • 5.  RE: Orginating As in AS-PATH

    Posted 07-13-2011 01:39

    Hi Alex

     

    So what will be the correct regex if i just want to accept routes that originate in my adjacent as

     

    Isn't this regex ".*As #" alright.

     

    Regards

    Malik



  • 6.  RE: Orginating As in AS-PATH

    Posted 07-13-2011 02:41

    Hello,

    If you want to accept routes originated by your adjacent AS, and you don't care how many ASNs are prepended, use this regex:

     

    set policy-options adjacent-as-only "<adjacent AS#>$"

     If you want to accept routes originated by your adjacent AS, and you don't want to accept routes with more than 10 prepends, use this regex:

     

    set policy-options adjacent-as-only-10prepends "<adjacent-AS#>{1,10}$"

    Please PLEASE substitite <adjacent-AS#> with real ASN before using above regex.

    HTH

    Rgds

    Alex



  • 7.  RE: Orginating As in AS-PATH

    Posted 07-13-2011 04:54

     Hi Alex

     

    I think u r getting it wrong as i want to accept the routes that are originated in my adjacent AS.

     

    As the originating AS appears last in the path i.e. at the right most side when i recieve it, so the regex .*65000 say if my adjacent AS is 65000  will be able to match all the routes just originated in 65000 .

     

    It is like stack.

     

    What do you think?

     

    Regards

     

    Malik



  • 8.  RE: Orginating As in AS-PATH
    Best Answer

     
    Posted 07-13-2011 08:01

    Hi Mailik,

     

    In this case you should have as-path regex (assuming your peer AS no as 65000) as below:

     

    policy-options {
        policy-statement import_peer {
            from {
                protocol bgp;
                neighbor 172.10.2.1;
                as-path peer_as;
            }
            then accept;
        }
        as-path peer_as ".* 65000";
    }

     

    Regards

    Surya Prakash



  • 9.  RE: Orginating As in AS-PATH

    Posted 07-13-2011 08:50

    Hello Surya

     

    Thanks & hence this also employs that originating AS appears at the right most side in path.

     

    Regards

     

    Malik



  • 10.  RE: Orginating As in AS-PATH

     
    Posted 07-13-2011 09:01
    Hi,

    Yes, as the AS-PATH attribute are PREPENDED to the existing ones (if any).

    Regards
    Surya Prakash