Juniper bgp as path prepend

#juniper#bgp#as#path#prepend

set policy-options prefix-list ISP-INT-OUT 172.16.0.0/24
set policy-options prefix-list ISP-INT-OUT 172.16.1.0/24
set policy-options prefix-list ISP-INT-OUT 172.16.2.0/24
set policy-options prefix-list ISP-INT-OUT 172.16.3.0/24

set policy-options prefix-list ISP-INT-OUT-AS-PREPEND 172.16.4.0/24
set policy-options prefix-list ISP-INT-OUT-AS-PREPEND 172.16.5.0/24

set policy-options policy-statement ISP-INTERNET-OUT term 1 from prefix-list ISP-INT-OUT
set policy-options policy-statement ISP-INTERNET-OUT term 1 then accept
set policy-options policy-statement ISP-INTERNET-OUT term 2 from prefix-list ISP-INT-OUT-AS-PREPEND
set policy-options policy-statement ISP-INTERNET-OUT term 2 then as-path-expand “65001 65001 65001 65001”
set policy-options policy-statement ISP-INTERNET-OUT term 2 then accept
set policy-options policy-statement ISP-INTERNET-OUT term 3 then reject

set policy-options policy-statement import_bgp_default term DEFAULT from route-filter 0.0.0.0/0 exact
set policy-options policy-statement import_bgp_default term DEFAULT then accept
set policy-options policy-statement import_bgp_default term OTHER-DENY then reject

set protocols bgp group ISP-INT-OUT preference 20
set protocols bgp group ISP-INT-OUT local-address 172.16.0.2
set protocols bgp group ISP-INT-OUT import import_bgp_default
set protocols bgp group ISP-INT-OUT export ISP-INTERNET-OUT
set protocols bgp group ISP-INT-OUT peer-as 65002
set protocols bgp group ISP-INT-OUT neighbor 172.16.0.1

 

Juniper bgp as path prepend

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *