[Xorp-users] How to AS prepend ?
Sébastien Namèche
seb at anet.fr
Thu Jun 25 13:43:22 PDT 2009
Bruce,
Le 25 juin 09 à 18:32, Bruce Simpson a écrit :
> The routes redistributed from OSPF into BGP are not going to have an
> AS-attribute to begin with, so prepend will be prepending to what is
> essentially an empty list.
I understand.
> Sébastien Namèche wrote:
>> The prefix "X.Y.Z.0/23" is announced to my peer since I know it
>> from my OSPF neighbor. But the AS path seen by my BGP peer is
>> (only) "64512".
>>
>> I have carefully read the doc, crawled other Google and made
>> several tests with several configurations (and also played with
>> "as-path- expand"). But still can't find how to do it. Now, I have
>> a terrible headache ;o)
>>
>> What am I doing wrong ?
>>
>
> I'm surprised 64512 works at all -- as-path-prepend is specified to
> take a 'txt' value in the configuration, I would have thought the
> value would have required quotes.
Nop, it's a "u32" (at least for 1.6). Seeing in 1.6 source code :
./docs/user_manual/policy.tex
124: as-path-prepend: u32;
And "xorpsh" refuses a string.
> Is this not your desired result? Your local-as is clearly set to
> 64512.
Yes, but this is not exactly what we want. We would like to prepend
our AS to one of the prefix distributed from OSPF to BGP.
Actually, the piece of configuration I sent was simplified in order to
isolate the problem.
The configuration we want to run will be something like :
-----
policy-statement "ospf_to_bgp" {
term ip1 {
from {
protocol: "ospf4"
network4: X.Y.Z.0/23
}
}
term ip2 {
from {
protocol: "ospf4"
network4: X.Y.W.0/23
}
then {
as-path-prepend: 64512
}
}
}
-----
Our goal is to announce the first prefix to this peer so that the
route through this router will be the best. At the same time, we also
want to announce another prefix, but this router will act as a
"backup" route for "X.Y.W.0/23". This prefix will be announced by
another router with a shortest path. So we need to prepend our AS to
the path of the second prefix for this router.
Regards,
--
Seb
More information about the Xorp-users
mailing list