Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 12
Next »
#vMX1
delete interfaces em1.0 family inet dhcp
set interfaces em1.0 family inet address 10.11.13.11/24
set interfaces lo0.0 family inet address 11.11.11.11/32
#OSPF
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface em1.0
set protocols ospf area 0.0.0.0 interface em2.0
set protocols ospf area 0.0.0.0 interface em3.0
## static routes
delete interfaces em2 unit 0 family inet dhcp
set interfaces em2.0 family inet address 10.12.0.1/24
set interfaces em3.0 family inet address 10.13.0.1/24
set routing-options static route 0/0 next-hop 10.12.0.2
set routing-options static route 0/0 next-hop 10.13.0.2
##BGP configuration
set routing-options autonomous-system 65100
set protocols bgp group iBGP type internal
set protocols bgp group iBGP neighbor 12.12.12.12
set protocols bgp group iBGP local-address 11.11.11.11
#inject routes to BGP from static
set policy-options policy-statement injectpolicy1 term injectterm1 from protocol static
set policy-options policy-statement injectpolicy1 term injectterm1 then accept
set protocols bgp group iBGP export injectpolicy1
#inject routes to BGP from OSPF
#set policy-options policy-statement injectpolicy1 term injectterm1 from protocol ospf
#set policy-options policy-statement injectpolicy1 term injectterm1 from area 0.0.0.
#vMX2
delete interfaces em1.0 family inet dhcp
set interfaces em1.0 family inet address 10.11.13.12/24
set interfaces lo0.0 family inet address 12.12.12.12/32
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface em1.0
set routing-options autonomous-system 65100
set protocols bgp group iBGP type internal
set protocols bgp group iBGP neighbor 11.11.11.11
set protocols bgp group iBGP local-address 12.12.12.12
delete interfaces em2 unit 0 family inet dhcp
set interfaces em02.0 family inet address 12.11.10.1/24
set interfaces em03.0 family inet address 12.12.10.1/24
set policy-options policy-statement injectpolicy1 term injectterm1 from protocol direct
set policy-options policy-statement injectpolicy1 term injectterm1 then accept
set protocols bgp group iBGP export injectpolicy1
set protocols bgp traceoptions flag state detail
set protocols bgp traceoptions file bgp-trace world-readable
#deactivate protocols bgp traceoptions
#view the log file
show log bgp-trace
root@vRR1> show route advertising-protocol bgp 12.12.12.12 detail
inet.0: 14 destinations, 17 routes (14 active, 0 holddown, 0 hidden)
* 0.0.0.0/0 (1 entry, 1 announced)
BGP group iBGP type Internal
Nexthop: 10.12.0.2
Localpref: 100
AS path: [65100] I
root@vRR1> show route receive-protocol bgp 12.12.12.12
inet.0: 14 destinations, 17 routes (14 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
10.11.13.0/24 12.12.12.12 100 I
* 12.11.10.0/24 12.12.12.12 100 I
* 12.12.10.0/24 12.12.12.12 100 I
12.12.12.12/32 12.12.12.12 100 I
192.168.0.0/24 12.12.12.12 100 I
inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)