[j-nsp] as-path filtering

Samit janasamit at wlink.com.np
Thu Jun 25 01:32:58 EDT 2009


Works..!

Thanks for you help.

Samit


Nalkhande Tarique Abbas wrote:
> Try this..
> 
> 
> set policy-options as-path a ".*1234"
> set policy-options as-path b ".*5678"
> 
>  
> Thanks & Regards,
> Tarique A. Nalkhande
> 
> 
> -----Original Message-----
> From: Samit [mailto:janasamit at wlink.com.np] 
> Sent: Monday, June 22, 2009 10:47 AM
> To: Nalkhande Tarique Abbas
> Cc: juniper-nsp
> Subject: Re: [j-nsp] as-path filtering
> 
> Thanks Scott/Tarique, changed the rule as per your advice but for some
> reason it is not working...and could not figure out either.
> 
> protocols {
>      bgp {
>          group "ebgp-test" {
>              type external;
>              import test-in;
>              peer-as 200;
>              neighbor 192.168.0.1
>              }
>          }
> 
> policy-options {
>      policy-statement test-in {
>              from as-path [a b];
>              then reject;
>          }
>          as-path a "_1234$";
>          as-path b "_5678$";
>      }
> }
> 
> 
> Still seeing routes originated from AS1234 and 5678 in the routing
> table.
> 
> Regards,
> Samit
> 
> 
> Nalkhande Tarique Abbas wrote:
>> Pls make appropriate changes as below & it should work !
>>
>>
>> lab# show | compare
>> [edit policy-options]
>> +   policy-statement test {
>> +       from as-path [ test test1 ];
>> +       then reject;
>> +   }
>> [edit policy-options]
>> +   as-path test "_1234$";
>> +   as-path test1 "_5678$";
>>  
>>
>>
>> Thanks & Regards,
>> Tarique A. Nalkhande
>>
>>
>> -----Original Message-----
>> From: juniper-nsp-bounces at puck.nether.net
>> [mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Samit
>> Sent: Sunday, June 21, 2009 6:47 PM
>> To: juniper-nsp
>> Subject: [j-nsp] as-path filtering
>>
>> Hi,
>>
>> How to do this in junos?
>>
>> Cisco config example:
>>
>> ip as-path access-list 1 deny _1234$
>> ip as-path access-list 1 deny _5678$
>> ip as-path access-list 1 permit .*
>>
>> router bgp 100
>> neighbor 192.168.0.1 remote-as 200
>> neighbor 192.168.0.1 des ebgp-test
>> neighbor 192.168.0.1 filter-list 1 in
>>
>> Tried.... but not working..
>>
>> protocols {
>>     bgp {
>>         group "ebgp-test" {
>>             type external;
>>             import test-in;
>>             peer-as 200;
>>             neighbor 192.168.0.1 {
>>             }
>>         }
>> policy-options {
>>     policy-statement test-in {
>>         term 1 {
>>             from as-path-group test;
>>             then reject;
>>         }
>>         term 2 {
>>             then accept;
>>         }
>>     }
>>     as-path-group test {
>>         as-path a "_1234$";
>>         as-path b "_5678$";
>>     }
>> }
>>
>>
>> Regards,
>> Samit
>>
>> _______________________________________________
>> juniper-nsp mailing list juniper-nsp at puck.nether.net
>> https://puck.nether.net/mailman/listinfo/juniper-nsp
>>
>>
> 
> 


More information about the juniper-nsp mailing list