In the last lesson, you were the customer.
Now you sit inside the provider network (AS 65002) to establish an iBGP session between 2.2.2.2 (R2) and 4.4.4.4 (R4).
Figure 1 – iBGP Lab Topology
Addressing & Autonomous Systems
R1 & R5 (Customer Edge): AS 65001 (192.168.1.0/24) and AS 65003 (192.168.2.0/24).
R2, R3 & R4 (Provider Core): AS 65002 linked via /30 subnets, with Loopback0 (X.X.X.X/32) matching each router ID.
Answer the question below
Which subnet connects R2 to R3?
Start at the entrance of your AS.
R1 is in AS 65001 and R2 is in AS 65002, so this session is external BGP (eBGP).
Figure 2 – iBGP Lab Topology
Prefix Advertisement (R1 to R2)
Play the customer first, on R1:
R1# configure terminal R1(config)# router bgp 65001 R1(config-router)# bgp router-id 1.1.1.1 R1(config-router)# neighbor 10.0.12.2 remote-as 65002 R1(config-router)# network 192.168.1.0 mask 255.255.255.0 R1(config-router)# endThe network statement tells R1 to advertise its LAN into BGP.
Now configure your side of the link on R2:
R2# configure terminal R2(config)# router bgp 65002 R2(config-router)# bgp router-id 2.2.2.2 R2(config-router)# neighbor 10.0.12.1 remote-as 65001 %BGP-5-ADJCHANGE: neighbor 10.0.12.1 Up R2(config-router)# endYour first eBGP session is now active.

Figure 3 – The eBGP session is up
BGP Table Verification on R2
Verify what R2 received over the new session:
R2# show ip bgp BGP table version is 2, local router ID is 2.2.2.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 192.168.1.0 10.0.12.1 0 0 65001 i*> 192.168.1.0: Valid (*) and best path (>), learned directly from customer AS 65001.Next Hop 10.0.12.1: Points to R1's IP address on the eBGP link.
The prefix sits on R2, time to carry it across the provider core.
Answer the question below
Which router advertises 192.168.1.0/24 into BGP?
R2 and R4 sit two hops apart with R3 in between.
Nothing inside AS 65002 tells R2 how to reach R4 yet.
Figure 4 – iBGP Lab Topology
Core Area 0 Configuration
Here, OSPF carries only the provider's internal links and loopbacks into Area 0, customer links stay out.
Core design rule: Never advertise customer-facing subnets (10.0.12.0/30 and 10.0.45.0/30) into your internal IGP.Configure R2:
R2# configure terminal R2(config)# router ospf 1 R2(config-router)# router-id 2.2.2.2 R2(config-router)# network 2.2.2.2 0.0.0.0 area 0 R2(config-router)# network 10.0.23.0 0.0.0.3 area 0 R2(config-router)# endNow configure R3 in the core.
Because it connects both internal links, its adjacency with R2 comes up right away:R3# configure terminal R3(config)# router ospf 1 R3(config-router)# router-id 3.3.3.3 R3(config-router)# network 3.3.3.3 0.0.0.0 area 0 R3(config-router)# network 10.0.23.0 0.0.0.3 area 0 %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/1 from LOADING to FULL, Loading Done R3(config-router)# network 10.0.34.0 0.0.0.3 area 0 R3(config-router)# endFinish with R4 on the far edge:
R4# configure terminal R4(config)# router ospf 1 R4(config-router)# router-id 4.4.4.4 R4(config-router)# network 4.4.4.4 0.0.0.0 area 0 R4(config-router)# network 10.0.34.0 0.0.0.3 area 0 %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/2 from LOADING to FULL, Loading Done R4(config-router)# end
Figure 5 – eBGP at the edge, OSPF in the core
OSPF Convergence Check
R3 sits in the middle. Its routing table proves the provider core converged:
R3# show ip route ospf Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area <output omitted> Gateway of last resort is not set 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/2] via 10.0.23.1, 00:02:14, GigabitEthernet0/1 4.0.0.0/32 is subnetted, 1 subnets O 4.4.4.4 [110/2] via 10.0.34.2, 00:01:09, GigabitEthernet0/2R3 has OSPF routes to both edge loopbacks (
2.2.2.2via R2 and4.4.4.4via R4).[110/2]: Standard OSPF Administrative Distance (110) and cost metric (2 hops).
Both edge loopbacks are in the routing table.
R2 and R4 have full reachability, that is everything BGP needs from the underlay IGP.Answer the question below
What is R3's OSPF cost to reach 4.4.4.4?
R2 holds the customer route, R4 needs it, and both sit in AS 65002.
Because both peers sit in the same Autonomous System, this session is Internal BGP (iBGP).
Figure 6 – iBGP Lab Topology
Loopback Peering & Source IP
R2 and R4 share no physical link, so each router targets the other’s Loopback0 (2.2.2.2 and 4.4.4.4).

Figure 7 – One Loopback0 per router
Peering via loopbacks keeps the session alive during link failures, as long as OSPF finds an alternate path through the core.
However, TCP packet sources must match on both ends:Default behavior (RFC 4271): BGP originates TCP packets from its outbound physical interface.
The issue: If the source IP does not match what the neighbor expects, the peer drops the connection.
The fix: The
update-source loopback0command forces BGP to use the loopback IP as the TCP source.
Configure R2:
R2# configure terminal R2(config)# router bgp 65002 R2(config-router)# neighbor 4.4.4.4 remote-as 65002 R2(config-router)# neighbor 4.4.4.4 update-source loopback0 R2(config-router)# endConfigure R4 on the far edge:
R4# configure terminal R4(config)# router bgp 65002 R4(config-router)# bgp router-id 4.4.4.4 R4(config-router)# neighbor 2.2.2.2 remote-as 65002 %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up R4(config-router)# neighbor 2.2.2.2 update-source loopback0 R4(config-router)# endiBGP Neighbor Status

Figure 8 – eBGP, OSPF and iBGP: all sessions up
Verify the summary table on R4:
R4# show bgp ipv4 unicast summary BGP router identifier 4.4.4.4, local AS number 65002 BGP table version is 1, main routing table version 1 1 network entries using 144 bytes of memory 1 path entries using 84 bytes of memory <output omitted> Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2.2.2.2 4 65002 5 5 1 0 0 00:01:12 1The State/PfxRcd column shows 1, proving R4 successfully received one prefix from R2.
Even though R2 and R4 are two hops apart, the session established seamlessly, iBGP peers do not need to be physically adjacent.Answer the question below
Which AS number does each side declare on an internal session?
The Unreachable Next-Hop Issue
The summary confirms one prefix was received.
Now inspect the actual route in R4's BGP table:R4# show ip bgp BGP table version is 1, local router ID is 4.4.4.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path * i 192.168.1.0 10.0.12.1 0 100 0 65001 ii(Internal): Learned via iBGP.*(Valid): Syntactically valid in the BGP table.Missing
>(Not Best): BGP refuses to select this as the active best route.Next Hop 10.0.12.1: Points to R1's IP address on the customer link.
R4 successfully received the prefix, but will not use it to forward traffic.
In the next lesson, we’ll look closely at that Next Hop column to understand why iBGP behaves this way and fix it with a single command.
Answer the question below
Which marker is missing in front of the route on R4?
Answer the question below
Without update-source loopback0, which source IP does R2 use to open the session to 4.4.4.4?