Juniper Labs Routing eBGP (lrc,lr3)
Explanation
Here we need some details to understand the eBGP step of our multi-protocol lab.
Please check here for routing topology.
- Internet Access on LR3: LR3 will use a static default route pointing to LRC.
- Aggregation on LRC: LRC will aggregate all AS 65501 networks (ACX1100, LR1, LR2) into a single /22 and advertise it into AS 65502.
- Next-Hop Self: We update LRC’s
ibgp-export
policy to set next-hop self for any external (eBGP) routes—needed if additional iBGP clients attach downstream. - OSPF Export: Finally, we export the LRC–LR3 link network into OSPF so ACX1100 learns how to reach LR3.
If everything is configured correctly:
- LR3 has internet via the static route.
- ACX1100 learns the aggregated /22 via eBGP→OSPF.
- All nodes maintain full end-to-end connectivity and Internet access via NAT.
LRC Configuration
# 1. Update ibgp-export: set next-hop self for any external BGP routes
set policy-options policy-statement ibgp-export term nexthop from protocol bgp
set policy-options policy-statement ibgp-export term nexthop from route-type external
set policy-options policy-statement ibgp-export term nexthop then next-hop self
# 2. Aggregate AS 65501 networks into one summary route
set routing-options aggregate route 10.0.0.0/22
# 3. ebgp-export policy: send direct & aggregate networks into eBGP
set policy-options policy-statement ebgp-export term from-direct from protocol direct
set policy-options policy-statement ebgp-export term from-direct from route-filter 100.1.2.3/32 exact
set policy-options policy-statement ebgp-export term from-direct then accept
set policy-options policy-statement ebgp-export term aggregate from protocol aggregate
set policy-options policy-statement ebgp-export term aggregate then accept
# 4. Create eBGP group toward LR3
set protocols bgp group eBGP-peers type external
set protocols bgp group eBGP-peers export ebgp-export
set protocols bgp group eBGP-peers neighbor 10.0.3.1 peer-as 65502
# 5. Export the LRC–LR3 link into OSPF
set policy-options policy-statement ospf-export term from-direct from route-filter 10.0.3.0/30 exact
LR3 Configuration
# 1. Create eBGP group toward LRC
set protocols bgp local-as 65502
set protocols bgp group eBGP-peers type external
set protocols bgp group eBGP-peers neighbor 10.0.3.2 peer-as 65501
set protocols bgp group eBGP-peers export eBGP-export
# 2. Advertise LR3 loopback into eBGP
set policy-options prefix-list eBGP-export 100.3.3.3/32
set policy-options policy-statement eBGP-export term export-lo from prefix-list eBGP-export
set policy-options policy-statement eBGP-export term export-lo then accept
# 3. Add static default route via LRC
set routing-options static route 0.0.0.0/0 next-hop 10.0.3.2
Validation on LR3
1. Full Routing Table
lr3@acx1100:lr3> show route
inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[Static/5] 00:34:28
> to 10.0.3.2 via ge-0/0/3.0
10.0.0.0/22 *[BGP/170] 00:36:49, localpref 100
> to 10.0.3.2 via ge-0/0/3.0
10.0.3.0/30 *[Direct/0] 2d 22:30:26
> via ge-0/0/3.0
10.0.4.0/30 *[Direct/0] 2d 22:30:26
> via ge-0/0/4.0
100.1.1.1/32 *[BGP/170] 02:24:30, localpref 100
> to 10.0.3.2 via ge-0/0/3.0
100.1.2.3/32 *[BGP/170] 01:33:06, localpref 100
> to 10.0.3.2 via ge-0/0/3.0
100.2.2.2/32 *[BGP/170] 02:24:30, localpref 100
> to 10.0.3.2 via ge-0/0/3.0
100.3.3.3/32 *[Direct/0] 2d 22:30:26
> via lo0.3
2. BGP-Only Routes
lr3@acx1100:lr3> show route protocol bgp
inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/22 *[BGP/170] 00:37:33, localpref 100
> to 10.0.3.2 via ge-0/0/3.0
100.1.1.1/32 *[BGP/170] 02:25:14, localpref 100
> to 10.0.3.2 via ge-0/0/3.0
100.1.2.3/32 *[BGP/170] 01:33:50, localpref 100
> to 10.0.3.2 via ge-0/0/3.0
100.2.2.2/32 *[BGP/170] 02:25:14, localpref 100
> to 10.0.3.2 via ge-0/0/3.0
3. eBGP Neighbor Status
lr3@acx1100:lr3> show bgp neighbor 10.0.3.2
Peer: 10.0.3.2+64179 AS 65501 Local: 10.0.3.1+179 AS 65502
Type: External State: Established Flags: <Sync>
Export: [ eBGP-export ]
Active prefixes: 4 Received prefixes: 4 Accepted prefixes: 4
4. Ping Tests
# Internet via default route
lr3@acx1100:lr3> ping count 3 8.8.8.8
64 bytes from 8.8.8.8: icmp_seq=0 ttl=57 time=2.913 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=2.992 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=11.048 ms
# Ping ACX1100 loopback
lr3@acx1100:lr3> ping count 3 100.0.1.1
64 bytes from 100.0.1.1: icmp_seq=0 ttl=63 time=0.976 ms
# Ping LRC loopback
lr3@acx1100:lr3> ping count 3 100.1.2.3
64 bytes from 100.1.2.3: icmp_seq=0 ttl=64 time=0.969 ms
# Ping LR1 & LR2 loopbacks
lr3@acx1100:lr3> ping count 3 100.1.1.1
64 bytes from 100.1.1.1: icmp_seq=0 ttl=63 time=0.957 ms
lr3@acx1100:lr3> ping count 3 100.2.2.2
64 bytes from 100.2.2.2: icmp_seq=0 ttl=63 time=1.095 ms
5. Traceroute
lr3@acx1100:lr3> traceroute 100.2.2.2 no-resolve
1 10.0.3.2 1.428 ms 0.885 ms 0.776 ms
2 100.2.2.2 0.773 ms 0.812 ms 0.783 ms