BGP as-path prepending
Hi Gurus,
Appreciate someone can give scenarios on import & export policies for as-path prepending in JUNOS
Thanks
regards,
Appreciate someone can give scenarios on import & export policies for as-path prepending in JUNOS
Thanks
regards,
Comments
-
networker050184 Mod Posts: 11,962 ModAre you looking for configuration examples or scenarios when you could use AS path prepend?An expert is a man who has made all the mistakes which can be made.
-
chongch01 Member Posts: 41 ■■□□□□□□□□networker050184 wrote: »Are you looking for configuration examples or scenarios when you could use AS path prepend?
Both, in export & import -
cybernet005 Member Posts: 7 ■□□□□□□□□□Both, in export & import
For example:
policy-statement AS1492-In {
term P1 {
from {
protocol bgp;
as-path-group AS1492;
}
then {
community delete All-Comm;
community add Peer-Comm;
as-path-prepend "64512 64512";
accept;
}
}
}
-> prepend as-path when import
Export policy:
policy-statement AS65222-Out {
term P1 {
from {
protocol [ isis bgp ];
route-filter 10.0.0.0/8 exact;
route-filter 192.168.0.0/22 exact;
route-filter 172.16.40.0/29 exact;
}
then accept;
}
term P2 {
from community [ Cust-Comm Transit-Comm Peer-Comm ];
then accept;
}
term P3 {
then reject;
}
}
Apply:
group eBGP {
type external;
import [ Damping BOGONS AS65222-In ];
export [ S2B AS65222-Out ];
neighbor 172.16.0.14 {
peer-as 65222;
}
neighbor 172.16.0.18 {
peer-as 65222;
}
} -
chongch01 Member Posts: 41 ■■□□□□□□□□Thanks Cybernet
means import is for prepending incoming as-path. (any other usage?)
export is to prepend AS for local subnets towards outgoing direction so remote will not prefer this longer as-path. (any other scenario?)
Thanks a lot -
cybernet005 Member Posts: 7 ■□□□□□□□□□Import policy to add community for manipulating routes in your AS
- Add or clear bgp community
- Add prepend. set LP...etc
- Filter number of routes in
Export: Advertise routes what you want to, add prepend as-path....
Filter routes out.Thanks Cybernet
means import is for prepending incoming as-path. (any other usage?)
export is to prepend AS for local subnets towards outgoing direction so remote will not prefer this longer as-path. (any other scenario?)
Thanks a lot -
chongch01 Member Posts: 41 ■■□□□□□□□□thanks & appreciate the reply
Done as-prepend on real network environment last 2 days in my customer environment. Now have more idea about it