Here again we need some details.
Please check here for routing topology
To get internet access from LR3 we will add routing-options static (default route to LRC)
In LRC we will make aggregate route for acx1100,LR1 and LR2 and will export it to AS65502.
LRC will update policy-statement ibgp-export with next-hop self, in this lab we do not need it however this will be needed if another ibgp router is attached to LR2 or LR1.
As a last step will be to export LRC-LR3 network via ospf to acx1100
LRC
# update ibgp-export with next-hop self for eBGP 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
# aggregate 10.0.0.0-10.0.3.0 routes
set routing-options aggregate route 10.0.0.0/22
# export networks to 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
# create eBGP group
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
# update policy-statement ospf-export for LRC-LR3 network
set policy-options policy-statement ospf-export term from-direct from route-filter 10.0.3.0/30 exact
LR3
# create eBGP group
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.2 peer-as 65501
set protocols bgp local-as 65502
# export loopback network to bgp
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
# add static route to internet
set routing-options static route 0.0.0.0/0 next-hop 10.0.3.2
Validation
LR3
# lets see the full route 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
AS path: 65501 I, validation-state: unverified
> 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.3.1/32 *[Local/0] 2d 22:30:26
Local via ge-0/0/3.0
10.0.4.0/30 *[Direct/0] 2d 22:30:26
> via ge-0/0/4.0
10.0.4.1/32 *[Local/0] 2d 22:30:26
Local via ge-0/0/4.0
10.0.4.2/32 *[Access-internal/12] 2d 14:08:43
> to 10.0.4.1 via ge-0/0/4.0
100.1.1.1/32 *[BGP/170] 02:24:30, localpref 100
AS path: 65501 I, validation-state: unverified
> to 10.0.3.2 via ge-0/0/3.0
100.1.2.3/32 *[BGP/170] 01:33:06, localpref 100
AS path: 65501 I, validation-state: unverified
> to 10.0.3.2 via ge-0/0/3.0
100.2.2.2/32 *[BGP/170] 02:24:30, localpref 100
AS path: 65501 I, validation-state: unverified
> 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
inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
ff02::2/128 *[INET6/0] 2d 22:30:28
MultiRecv
# only bgp routes
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
AS path: 65501 I, validation-state: unverified
> to 10.0.3.2 via ge-0/0/3.0
100.1.1.1/32 *[BGP/170] 02:25:14, localpref 100
AS path: 65501 I, validation-state: unverified
> to 10.0.3.2 via ge-0/0/3.0
100.1.2.3/32 *[BGP/170] 01:33:50, localpref 100
AS path: 65501 I, validation-state: unverified
> to 10.0.3.2 via ge-0/0/3.0
100.2.2.2/32 *[BGP/170] 02:25:14, localpref 100
AS path: 65501 I, validation-state: unverified
> to 10.0.3.2 via ge-0/0/3.0
inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
# bgp neighbor
r3@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
Group: eBGP-peers Routing-Instance: master
Forwarding routing-instance: master
Type: External State: Established Flags: <Sync>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Export: [ eBGP-export ]
Options: <PeerAS LocalAS Refresh>
Options: <GracefulShutdownRcv>
Holdtime: 90 Preference: 170
Graceful Shutdown Receiver local-preference: 0
Local AS: 65502 Local System AS: 0
Number of flaps: 0
Error: 'Cease' Sent: 0 Recv: 216
Peer ID: 100.1.2.3 Local ID: 100.3.3.3 Active Holdtime: 90
Keepalive Interval: 30 Group index: 0 Peer index: 0 SNMP index: 0
I/O Session Thread: bgpio-0 State: Enabled
BFD: disabled, down
Local Interface: ge-0/0/3.0
NLRI for restart configured on peer: inet-unicast
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
Stale routes from peer are kept for: 300
Peer does not support Restarter functionality
Restart flag received from the peer: Notification
NLRI that restart is negotiated for: inet-unicast
NLRI of received end-of-rib markers: inet-unicast
NLRI of all end-of-rib markers sent: inet-unicast
Peer does not support LLGR Restarter functionality
Peer supports 4 byte AS extension (peer-as 65501)
Peer does not support Addpath
NLRI(s) enabled for color nexthop resolution: inet-unicast
Table inet.0 Bit: 20000
RIB State: BGP restart is complete
Send state: in sync
Active prefixes: 4
Received prefixes: 4
Accepted prefixes: 4
Suppressed due to damping: 0
Advertised prefixes: 1
Last traffic (seconds): Received 19 Sent 0 Checked 8778
Input messages: Total 330 Updates 6 Refreshes 0 Octets 6469
Output messages: Total 328 Updates 1 Refreshes 0 Octets 6265
Output Queue[1]: 0 (inet.0, inet-unicast)
# ping acx1100 loopback network (via default route)
lr3@acx1100:lr3> ping count 3 100.0.1.1
PING 100.0.1.1 (100.0.1.1): 56 data bytes
64 bytes from 100.0.1.1: icmp_seq=0 ttl=63 time=0.976 ms
64 bytes from 100.0.1.1: icmp_seq=1 ttl=63 time=0.903 ms
64 bytes from 100.0.1.1: icmp_seq=2 ttl=63 time=1.032 ms
--- 100.0.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.903/0.970/1.032/0.053 ms
# ping LRC loopback network
lr3@acx1100:lr3> ping count 3 100.1.2.3
PING 100.1.2.3 (100.1.2.3): 56 data bytes
64 bytes from 100.1.2.3: icmp_seq=0 ttl=64 time=0.969 ms
64 bytes from 100.1.2.3: icmp_seq=1 ttl=64 time=0.874 ms
64 bytes from 100.1.2.3: icmp_seq=2 ttl=64 time=0.935 ms
--- 100.1.2.3 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.874/0.926/0.969/0.039 ms
# ping LR1 loopback network
lr3@acx1100:lr3> ping count 3 100.1.1.1
PING 100.1.1.1 (100.1.1.1): 56 data bytes
64 bytes from 100.1.1.1: icmp_seq=0 ttl=63 time=0.957 ms
64 bytes from 100.1.1.1: icmp_seq=1 ttl=63 time=1.038 ms
64 bytes from 100.1.1.1: icmp_seq=2 ttl=63 time=1.032 ms
--- 100.1.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.957/1.009/1.038/0.037 ms
# ping LR2 loopback network
lr3@acx1100:lr3> ping count 3 100.2.2.2
PING 100.2.2.2 (100.2.2.2): 56 data bytes
64 bytes from 100.2.2.2: icmp_seq=0 ttl=63 time=1.095 ms
64 bytes from 100.2.2.2: icmp_seq=1 ttl=63 time=1.004 ms
64 bytes from 100.2.2.2: icmp_seq=2 ttl=63 time=1.060 ms
--- 100.2.2.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.004/1.053/1.095/0.037 ms
# traceroute LR2
lr3@acx1100:lr3> traceroute 100.2.2.2 no-resolve
traceroute to 100.2.2.2 (100.2.2.2), 30 hops max, 40 byte packets
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
# ping internet
lr3@acx1100:lr3> ping count 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=57 time=11.048 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=2.913 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=2.992 ms
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.913/5.651/11.048/3.816 ms
# traceroute to internet
lr3@acx1100:lr3> traceroute 8.8.8.8 no-resolve wait 1
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 40 byte packets
1 10.0.3.2 1.425 ms 0.975 ms 0.864 ms
2 10.0.0.1 0.912 ms 0.859 ms 0.768 ms
3 172.20.13.254 96.552 ms 498.600 ms 500.314 ms
4 82.137.110.2 499.572 ms 500.845 ms 499.039 ms
5 * * *
6 * * *
7 212.39.66.222 494.305 ms 499.574 ms 501.069 ms
8 * * *
9 8.8.8.8 496.103 ms 501.282 ms 498.608 ms