[j-nsp] AS Path regular expression for Null AS

Ricardo Tavares curupas at gmail.com
Mon Jun 21 20:14:08 EDT 2010


Hi,

Everything in the junos doc works as expected and I have tried a lot
of combs, if you are using this procedure to select only local BGP
routes do not forget to reject everything else too, because the
default accept policy in the junos BGP, not sure if this is the
problem.

Below a Juniper example that worked fine for me:

[edit policy-options]
null-as "()";
policy-statement only-my-routes {
term just-my-as {
from {
protocol bgp;
as-path null-as;
}
then accept;
}
term nothing-else {
then reject;
}
}
protocol {
bgp {
neighbor 10.2.2.6 {
export only-my-routes;
}
}
}


On Mon, Jun 21, 2010 at 7:39 PM, Judah Scott <judah.scott.iam at gmail.com> wrote:
> Just a guess but try "^ $" to match beginning and end with nothing in
> between.  Or you can match against "^ 1234{0,1} $" which matches the
> null as or a single occurrence of only AS 1234 (just insert any unused
> AS).
>
> -J Scott
>
> On Mon, Jun 21, 2010 at 3:10 PM, Leah Lynch <leah.lynch at clearwire.com> wrote:
>> I cannot seem to get any of the regular expressions that I know of for null AS to work. I have tried "()" and <*> and neither expression returns any results. Does anyone out there have a known working expression for this on M/MX routers?
>>
>> Leah
>>
>>
>> This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
>>
>> _______________________________________________
>> juniper-nsp mailing list juniper-nsp at puck.nether.net
>> https://puck.nether.net/mailman/listinfo/juniper-nsp
>>
>
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
>



-- 
Rio de Janeiro Ciclopata! Coração Brasiliense e Floripano!
Twitter: http://www.twitter.com/curupas
Orkut: http://www.orkut.com.br/Main#Profile?rl=mp&uid=6915582353112941469
Vai Encarar? http://www.vaiencarar.com.br



More information about the juniper-nsp mailing list