You work in the enterprise network of AS 65001.
Your goal is simple: allow your local LAN to reach the LAN of your partner in AS 65003.
Figure 1 – Two enterprises, one service provider between them
Your two networks sit in different cities with no direct cable between them.
Between them is your Service Provider: AS 65002.Topology & Router Roles
The topology relies on three router positions:
R1: Sits in AS 65001 and advertises your local LAN.
R2 & R4: Sit at the edges of AS 65002. R2 faces your network, while R4 faces your partner.
R3: Sits in the core of AS 65002, connecting R2 and R4.
To reach your partner, your route must enter the provider at R2 and exit at R4.
eBGP Between Autonomous Systems
R1 is in AS 65001 and R2 is in AS 65002.
Because they are in different Autonomous Systems, they use external BGP (eBGP).
Figure 2 – eBGP runs between two routers in different AS
R1 advertises your LAN, and the route successfully arrives at R2. Then, it stops.
R4 has no idea this network exists, and your partner in AS 65003 will never hear about it.
eBGP only carries routes between different ASes.To move that route across the provider's internal network, we need another mechanism.
Answer the question below
Which router learns your LAN, and then keeps it to itself?
Before R2 can share routes with R4, both routers must be able to reach each other over IP.
That is the job of an Interior Gateway Protocol (IGP), in this case, OSPF.Provider IGP Reachability
OSPF covers the provider's internal links (R2–R3 and R3–R4), and nothing else.

Figure 3 – OSPF runs on the provider's internal links only
Your enterprise link stays out: a provider never runs its IGP with a customer.
Why Not Redistribute BGP into IGP?
Redistributing BGP routes directly into OSPF breaks the network for three main reasons:

Figure 4 – The provider keeps BGP out of OSPF
Too Many Routes: OSPF is built to map internal infrastructure, not hold the global Internet routing table.
Injecting 1,000,000+ prefixes will crash OSPF and run out of router memory.
Loss of BGP Attributes: OSPF only understands link cost.
It drops essential BGP path attributes (like AS-Path, Local Preference, or Communities) needed for traffic engineering.
No Policy Control: OSPF always picks the shortest path based on metric.
BGP needs to select paths based on business agreements, even if the path has a higher cost.
Answer the question below
Which protocol connects the provider routers together?
R2 holds your route, R4 needs it, and both sit inside AS 65002: the session is internal BGP (iBGP).

Figure 5 – One iBGP session between R2 and R4, same AS
Notice that the iBGP session jumps straight over R3.
Key Rule: iBGP peers do not need to be directly connected.
They only need a path to reach each other over IP.eBGP vs iBGP Differences
iBGP is not a separate protocol. It uses the exact same BGP engine, message types, and TCP port 179 as eBGP.
Only the operational rules change, because the peers sit within the same AS:Rule
eBGP
iBGP
Peers
Different AS
Same AS
Administrative distance
20
200
Default TTL
1
255
Table 1 – eBGP vs iBGP
The TTL of 255 lets the BGP session cross R3 without expiring.
The AD of 200 sits above OSPF (110): the provider trusts its own IGP before an iBGP route. eBGP gets 20 because customer routes must enter the AS without being overridden.Answer the question below
What is the administrative distance of an iBGP route?
Answer the question below
With the default iBGP TTL, what TTL does R2's message carry when it reaches R4 through R3?
One session is still missing: R4 to R5, so the provider can send your route to your partner in AS 65003.
Add it, and step back to look at the complete end-to-end design.
Figure 6 – eBGP in, iBGP across, eBGP out
Remember this simple rule: different AS means eBGP, same AS means iBGP.
AS 65002 carries traffic between two other Autonomous Systems. This role is called transit.
Only service providers perform transit routing, enterprise networks never do.The next lesson builds this exact design in CLI: OSPF first, then the iBGP session.
Answer the question below
Which session type carries your route across AS 65002?