In the previous lesson, you established the iBGP session between R2 and R4.
The session is up, and R4 receives the prefix 192.168.1.0/24.However, R4 does not install this route in its routing table.

Figure 1 – iBGP preserves the eBGP next hop
To understand why this happens, examine the Next Hop column in the BGP table on R4:
R4# show ip bgp <output omitted> Network Next Hop Metric LocPrf Weight Path * i 192.168.1.0 10.0.12.1 0 100 0 65001 iLook at the status flags.
The asterisk (*) indicates a valid route. However, the greater-than symbol (>) is missing.
The route is not selected as the best path because R4 cannot reach the Next Hop IP address (10.0.12.1).Why does iBGP preserve the original Next Hop?
By design, eBGP and iBGP handle Next Hop attributes differently:
eBGP: When an eBGP router forwards a route across AS boundaries, it changes the Next Hop address to its own IP address.
iBGP: When an iBGP router forwards a route inside the same AS, it retains the original eBGP Next Hop address.

Figure 2 – Unreachable next hop on R4
R1 sent 192.168.1.0/24 to R2 with Next Hop 10.0.12.1.
When R2 forwarded this route to R4 via iBGP, R2 kept 10.0.12.1 as the Next Hop address.Answer the question below
Which BGP type keeps the original Next Hop address unchanged?
How does Next-Hop reachability fail?
The IP address 10.0.12.1 belongs to the link between R1 and R2 (10.0.12.0/30).
In your core network, OSPF handles internal routing.However, you intentionally excluded external customer links from OSPF.
Because OSPF does not know the 10.0.12.0/30 subnet, R4 has no internal path to reach 10.0.12.1.Check the IP routing table on R4 to confirm:
R4# show ip route bgp R4#The output is empty.
R4 refuses to install the BGP route because a router never installs a BGP path if its Next Hop address is unreachable in the routing table.Answer the question below
Which subnet does R4 have no route to?
You must fix Next-Hop reachability without flooding the core IGP with external subnets.
Thenext-hop-selfcommand solves this issue at the edge router.Why use the next-hop-self command?
Instead of advertising external customer links inside OSPF, you instruct R2 to rewrite the Next Hop address for the updates it sends to R4.

Figure 3 – R2 becomes the next hop
Apply the next-hop-self command on R2 toward R4:
R2# configure terminal R2(config)# router bgp 65002 R2(config-router)# neighbor 4.4.4.4 next-hop-self R2(config-router)# endWhen R2 receives an eBGP route from R1, R2 overwrites the Next Hop with its own loopback (2.2.2.2) before sending the update to R4. OSPF already advertises 2.2.2.2 across the core.
Answer the question below
Which command makes R2 rewrite the Next Hop for iBGP updates?
Verification of the BGP table
Check the BGP table on R4 to verify the update:
R4# show bgp ipv4 unicast <output omitted> Network Next Hop Metric LocPrf Weight Path *>i 192.168.1.0 2.2.2.2 0 100 0 65001 iThe Next Hop address changes to 2.2.2.2.
The > symbol confirms that R4 now selects this route as the best path.Answer the question below
Which address is now the next hop on R4?
How Recursive Lookup operates
R4 needs two lookups to forward a packet toward 192.168.1.0/24.
This two-step process is called Recursive Lookup.
Every BGP next hop must be resolvable in the routing table.
Figure 4 – BGP finds the next hop, OSPF finds the interface
First, ask BGP for the details of the prefix:
R4# show ip bgp 192.168.1.0 BGP routing table entry for 192.168.1.0/24, version 2 Paths: (1 available, best #1, table default) Not advertised to any peer 65001 2.2.2.2 (metric 3) from 2.2.2.2 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, internal, bestBGP provides a destination and a next hop (2.2.2.2), but no exit interface.
The value (metric 3) represents the OSPF cost to reach 2.2.2.2.Second, ask the routing table how to reach that next hop:
R4# show ip route 2.2.2.2 Routing entry for 2.2.2.2/32 Known via "ospf 1", distance 110, metric 3, type intra area Last update from 10.0.34.1 on GigabitEthernet0/2, 00:08:12 ago Routing Descriptor Blocks: * 10.0.34.1, from 2.2.2.2, 00:08:12 ago, via GigabitEthernet0/2 Route metric is 3, traffic share count is 1OSPF resolves 2.2.2.2 to the exit interface GigabitEthernet0/2 via R3.
BGP finds the next hop, and the IGP finds the outgoing interface.The first lookup requires the second lookup to succeed.
Answer the question below
Which protocol resolves 2.2.2.2 on R4?
Final Routing Table Installation
Check the global IP routing table on R4:
R4# show ip route bgp <output omitted> Gateway of last resort is not set B 192.168.1.0/24 [200/0] via 2.2.2.2, 00:00:35The routing table installs the prefix with an Administrative Distance of 200.
The routing table stores the Next Hop address, not the exit interface.
Why not advertise 10.0.12.0/30?
You could advertise it into OSPF to achieve reachability.
However, that breaks a core design principle: customer subnets never enter the IGP.
Thenext-hop-selfcommand keeps customer subnets out of the core while enabling full reachability on R4.Answer the question below
What is the Administrative Distance of the installed route?
Answer the question below
After recursion, to which directly connected IP does R4 send traffic for 192.168.1.0/24?