I have multiple AS path to prepend depending on the IP address matched in my prefix list.
The idea is to match incoming IP addresses against my prefix list and prepend the AS number accordingly. I have done a quick search online for BGP prepend samples but i am not certain how it should be when there is multiple values involved.
Please advise if i am on the right track.
This is what I have as of now.
prefix-list normal-as-path {
100.66.11.220/32;
100.66.11.221/32;
111.102.0.22/32;
111.101.145.220/32;
100.66.11.92/28;
}
prefix-list long-as-path {
200.12.111.123/28;
}
term prependterm1 {
from {
prefix-list long-as-path;
}
then {
as-path-prepend "65 65 65";
accept;
}
}
term prependterm2 {
from {
prefix-list normal-as-path;
}
then accept;
}
group prependpolicy {
type external;
import prependpolicy;
}