###ASBR
set routing-options router-id 5.5.5.5
set routing-options autonomous-system 2345
set protocols bgp export ADVERTISE_ROUTES
set protocols bgp group eBGP type external
set protocols bgp group eBGP neighbor 192.168.56.6 peer-as 6
set protocols bgp group iBGP type internal
set protocols bgp group iBGP local-address 5.5.5.5
set protocols bgp group iBGP export ADVERTISE_ROUTES
set protocols bgp group iBGP export NHS
set protocols bgp group iBGP neighbor 7.7.7.7
set policy-options policy-statement ADVERTISE_ROUTES term 1 from protocol direct
set policy-options policy-statement ADVERTISE_ROUTES term 1 from route-filter 5.5.5.5/32 exact
set policy-options policy-statement ADVERTISE_ROUTES term 1 then accept
set policy-options policy-statement NHS term 1 from protocol bgp
set policy-options policy-statement NHS term 1 from route-type external
set policy-options policy-statement NHS term 1 then next-hop self
### eBGP
set routing-options router-id 1.1.1.1
set routing-options autonomous-system 1
set protocols bgp group eBGP type external
set protocols bgp group eBGP export ADVERTISE_ROUTES
set protocols bgp group eBGP peer-as 2345
set protocols bgp group eBGP neighbor 192.168.12.2
set protocols bgp group eBGP neighbor 192.168.13.3
set protocols lldp interface all
set policy-options policy-statement ADVERTISE_ROUTES term 1 from protocol direct
set policy-options policy-statement ADVERTISE_ROUTES term 1 from route-filter 1.1.1.1/32 exact
set policy-options policy-statement ADVERTISE_ROUTES term 1 then accept
###RR
vMXvCP-RR:
set routing-options router-id 7.7.7.7
set routing-options autonomous-system 2345
set protocols bgp group iBGP local-address 7.7.7.7
set protocols bgp group iBGP cluster 7.7.7.7
set protocols bgp group iBGP peer-as 2345
set protocols bgp group iBGP neighbor 2.2.2.2
set protocols bgp group iBGP neighbor 3.3.3.3
set protocols bgp group iBGP neighbor 4.4.4.4
set protocols bgp group iBGP neighbor 5.5.5.5
set protocols bgp advertise-inactive
BGP's path selection Juniper:
Prefer the highest local-preference value. (100)
Prefer the shortest AS-path length.
Prefer the lowest origin value. (i)
Prefer the lowest MED value. (0)
Prefer routes learned from an EBGP peer over an IBGP peer.
Prefer best exit from AS.
For EBGP-received routes, prefer the current active route.
Prefer routes from the peer with the lowest Router ID.
Prefer paths with the shortest cluster length.
Prefer routes from the peer with the lowest peer IP address. Steps 2, 6 and 12 are the RPD criteria.
#Cisco Origin Code
Network i = IGP
Redistribute Incomplete
Juniper = export Policy (i)
### Local Preference
vMXvCP-6:
cli
configure
set protocols bgp group eBGP neighbor 192.168.56.5 import LP_FROM_R5
set policy-options policy-statement LP_FROM_R5 term 1 from protocol bgp
set policy-options policy-statement LP_FROM_R5 term 1 from route-filter 1.1.1.1/32 exact
set policy-options policy-statement LP_FROM_R5 term 1 from route-filter 2.2.2.2/32 exact
set policy-options policy-statement LP_FROM_R5 term 1 then local-preference 99
set protocols bgp group eBGP neighbor 192.168.46.4 import LP_FROM_R4
set policy-options policy-statement LP_FROM_R4 term 1 from protocol bgp
set policy-options policy-statement LP_FROM_R4 term 1 from route-filter 3.3.3.3/32 exact
set policy-options policy-statement LP_FROM_R4 term 1 then local-preference 99
commit
## AS-PATH
vMXvCP-6:
cli
configure
set protocols bgp group eBGP neighbor 192.168.56.5 import AS-PATH
set policy-options policy-statement AS-PATH term 1 from protocol bgp
set policy-options policy-statement AS-PATH term 1 from route-filter 1.1.1.1/32 exact
set policy-options policy-statement AS-PATH term 1 from route-filter 2.2.2.2/32 exact
set policy-options policy-statement AS-PATH term 1 then as-path-prepend "2345 2345 2345"
commit
vMXvCP-4:
cli
configure
set protocols bgp group eBGP neighbor 192.168.46.6 export AS-PATH
set protocols bgp group eBGP neighbor 192.168.46.6 export ADVERTISE_ROUTES
set policy-options policy-statement AS-PATH term 1 from protocol bgp
set policy-options policy-statement AS-PATH term 1 from route-filter 3.3.3.3/32 exact
set policy-options policy-statement AS-PATH term 1 then as-path-expand "2345 2345 2345"
commit
R5->R6
R5 como out - se ve el as-path en el neighbor R6
R6 como in - no se ve el as-path
No hay comentarios
COMENTA CON TU PERFIL DEFACEBOK