[j-nsp] as-path filtering

Samit janasamit at wlink.com.np
Mon Jun 22 01:16:55 EDT 2009


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