CCNANetwork+Advanced13 min read

What Does iBGP Mean?

Also known as: Internal BGP, Internal Border Gateway Protocol, iBGP

Reviewed byJohnson Ajibi· Senior Network & Security Engineer · MSc IT Security

This page mentions older exam versions. See the Current Exam Context and Legacy Exam Context sections below for the updated mapping.

On This Page

Quick Definition

iBGP, or Internal Border Gateway Protocol, is a variant of BGP designed for exchanging routing information between routers that belong to the same autonomous system (AS). Unlike eBGP, which operates between different ASes, iBGP ensures that all routers within an AS have consistent knowledge of external routes learned via BGP. It is essential for maintaining loop-free path selection and policy control within large enterprise or service provider networks. iBGP sessions are typically established between routers using loopback interfaces for stability, and they require a full mesh of TCP connections or route reflectors to scale. iBGP does not modify the AS_PATH attribute, which prevents routing loops within the AS.

Must Know for Exams

On the CCNA exam (200-301), iBGP is tested under Domain 3.0: IP Connectivity, specifically in the context of BGP concepts and configuration. Key focus areas include: (1) Understanding the difference between iBGP and eBGP, especially that iBGP operates within the same AS and does not modify AS_PATH.

(2) The BGP split-horizon rule: routes learned via iBGP are not advertised to other iBGP neighbors, requiring a full mesh or route reflectors. (3) Administrative distance: iBGP routes have an AD of 200, making them less preferred than eBGP (AD 20) or OSPF (AD 110). (4) The requirement for iBGP sessions to use loopback interfaces for stability and the need for an IGP (like OSPF) to provide reachability between loopbacks.

(5) The concept of next-hop reachability: iBGP does not change the next-hop attribute, so the next-hop must be reachable via an IGP. For Network+ (N10-008), iBGP is covered under Domain 1.0: Networking Fundamentals, focusing on comparing routing protocols (distance vector vs.

link-state vs. path-vector) and understanding BGP's role in connecting autonomous systems. Exam questions often ask candidates to identify iBGP characteristics, such as its use of TCP port 179 and its role in internal route distribution.

Simple Meaning

Imagine a large company with multiple branch offices, each having its own local manager. The CEO (representing an external network) sends a memo to one branch manager. For all branch managers to know the memo's contents, they must share it among themselves.

iBGP is like the internal memo-sharing system: it ensures every router inside the same company (autonomous system) knows about external routes learned from outside. Without iBGP, only the router that directly receives the external route would know about it, leaving others in the dark. This internal sharing is critical for consistent routing decisions and preventing traffic black holes within the organization.

Full Technical Definition

iBGP (Internal Border Gateway Protocol) is a routing protocol defined in RFC 4271 that operates at the Application Layer (Layer 7) of the OSI model, though it is used to exchange network layer (Layer 3) reachability information. It runs over TCP port 179. iBGP is used to distribute BGP routes among routers within the same autonomous system (AS).

A key technical property is that iBGP does not change the AS_PATH attribute; routes learned via iBGP retain the same AS_PATH as when they were learned via eBGP. This behavior prevents routing loops because a router will not accept a route that contains its own AS number in the AS_PATH. However, it also means that iBGP requires a full mesh of TCP sessions (or the use of route reflectors or confederations) to ensure all routers receive all routes, since the BGP split-horizon rule prohibits advertising iBGP-learned routes to other iBGP neighbors.

iBGP uses the same path selection algorithm as eBGP, but the administrative distance for iBGP routes is 200 (vs. 20 for eBGP), making eBGP routes preferred. iBGP is critical for carrying Internet routes within an ISP or large enterprise, enabling policy-based routing and traffic engineering.

Real-Life Example

Consider a medium-sized ISP with three core routers in different cities: Router A in New York, Router B in Chicago, and Router C in Los Angeles. The ISP has a single AS number 65001. Router A establishes an eBGP session with an upstream provider and learns a route to the Internet prefix 8.

8.8.0/24. Without iBGP, only Router A would know this route. To share it, Router A establishes iBGP sessions with Router B and Router C using their loopback interfaces (e.g., 10.0.0.

1, 10.0.0.2, 10.0.0.3). The iBGP updates include the same AS_PATH (e.g., 64500 64501) as received from the eBGP peer. Router B and Router C now have the route to 8.8.8.0/24 and can forward traffic accordingly.

If Router B later learns a different path to the same prefix via another eBGP peer, it will compare the routes using BGP path selection and choose the best one. This ensures all three routers have consistent routing tables and can handle traffic efficiently.

Why This Term Matters

Understanding iBGP is crucial for IT professionals because it is the backbone of internal route distribution in BGP-based networks. Without iBGP, external routes learned by one router would not propagate to others, leading to routing black holes and inconsistent forwarding. iBGP also introduces unique challenges like the full mesh requirement and split-horizon rule, which are common exam topics and real-world design considerations.

Mastery of iBGP is essential for network engineers designing scalable ISP or enterprise networks, and it directly impacts troubleshooting scenarios involving missing routes or suboptimal path selection. On exams like CCNA and Network+, iBGP questions test your ability to distinguish it from eBGP and understand its operational constraints.

How It Appears in Exam Questions

1. **Comparison Questions**: 'Which of the following is true about iBGP compared to eBGP?' Wrong answers often claim iBGP has a lower administrative distance or modifies AS_PATH. The correct answer highlights that iBGP operates within the same AS and does not change AS_PATH.

2. **Split-Horizon Questions**: 'A router learns a route via iBGP. To which of the following can it advertise this route?' Wrong answers include 'all iBGP neighbors' or 'eBGP neighbors only.'

The correct answer is 'eBGP neighbors only' because of the split-horizon rule. 3. **Design Questions**: 'What is required for iBGP to function correctly in a network with multiple routers?'

Wrong answers suggest using static routes or a single session. The correct answer is a full mesh of iBGP sessions or route reflectors. 4. **Troubleshooting Questions**: 'A router is not receiving an external route that its iBGP peer has.

What is the most likely cause?' Wrong answers include 'MTU mismatch' or 'AS_PATH loop.' The correct answer is that the next-hop IP is not reachable via an IGP.

Practise iBGP Questions

Test your understanding with exam-style practice questions.

Practise

Example Scenario

Step 1: Router R1 in AS 65001 establishes an eBGP session with an ISP router and learns the route 10.10.10.0/24. Step 2: R1 has an iBGP session with R2 (same AS) using loopback addresses 1.

1.1.1 and 2.2.2.2. Step 3: R1 sends an iBGP update to R2 containing the route 10.10.10.0/24 with next-hop set to the ISP router's IP (e.g., 192.168.1.1). Step 4: R2 receives the update but checks if the next-hop (192.

168.1.1) is reachable via its routing table. Since R2 has no route to 192.168.1.1 (no IGP), it marks the route as invalid. Step 5: The network engineer configures OSPF on both routers, advertising the loopback and the link to the ISP.

Now R2 can reach 192.168.1.1, and the iBGP route becomes valid. R2 can now forward traffic to 10.10.10.0/24.

Common Mistakes

Students think iBGP has a lower administrative distance than eBGP.

Actually, eBGP has an AD of 20, while iBGP has an AD of 200. eBGP routes are preferred because they come from outside the AS and are considered more trustworthy.

Remember: eBGP (external) = 20, iBGP (internal) = 200. External is more trusted.

Students believe iBGP modifies the AS_PATH attribute when advertising routes.

iBGP does not change the AS_PATH. Only eBGP prepends its own AS number. If iBGP modified AS_PATH, it could create loops within the AS.

iBGP is like a photocopy: it passes the original AS_PATH unchanged. Only eBGP adds a stamp.

Students think iBGP routes can be advertised to other iBGP neighbors freely.

The BGP split-horizon rule prohibits advertising iBGP-learned routes to other iBGP neighbors. This prevents routing loops within the AS.

iBGP split-horizon: 'Don't tell your iBGP friends what you learned from another iBGP friend.'

Exam Trap — Don't Get Fooled

{"trap":"The most dangerous trap is that candidates select 'iBGP has a lower administrative distance than eBGP' because they think internal routes should be preferred. The correct answer is that eBGP has AD 20 and iBGP has AD 200, so eBGP is preferred.","why_learners_choose_it":"Learners intuitively think that routes within the same organization should be more trusted than external routes, leading them to believe iBGP has a lower AD.

They also confuse administrative distance with metrics like hop count.","how_to_avoid_it":"Memorize the AD values: eBGP=20, iBGP=200. Use the mnemonic 'External is Excellent (20), Internal is Inferior (200)'.

On exam day, if you see a question about preference between eBGP and iBGP, always choose eBGP."

Commonly Confused With

iBGPvseBGP (External Border Gateway Protocol)

eBGP exchanges routes between different autonomous systems, modifies the AS_PATH by prepending its own AS number, and has an administrative distance of 20. iBGP operates within the same AS, does not modify AS_PATH, and has an AD of 200.

Use eBGP when connecting your company's AS to an ISP; use iBGP to distribute the ISP's routes among your internal routers.

iBGPvsOSPF (Open Shortest Path First)

OSPF is an interior gateway protocol (IGP) that uses link-state algorithms and cost metrics to find the best path within an AS. iBGP is an exterior gateway protocol (EGP) used to distribute external routes within an AS. OSPF does not use TCP; iBGP uses TCP port 179.

Use OSPF to route within your campus network; use iBGP to share Internet routes learned from your ISP across your core routers.

Step-by-Step Breakdown

1

Step 1 — Establish iBGP Peering

Two routers within the same AS configure iBGP neighbor statements using their loopback interfaces. This requires TCP connectivity on port 179. The routers exchange OPEN messages to negotiate capabilities and establish the session.

2

Step 2 — Exchange BGP Routes

Once the session is up, the routers exchange their entire BGP routing tables via UPDATE messages. Routes learned via eBGP are included. The AS_PATH attribute remains unchanged from the eBGP-learned value.

3

Step 3 — Apply Split-Horizon Rule

If a router learns a route via iBGP, it will not advertise that route to any other iBGP neighbor. This prevents routing loops but means that for all routers to learn all routes, a full mesh of iBGP sessions is required.

4

Step 4 — Check Next-Hop Reachability

The router checks if the next-hop IP address in the iBGP update is reachable via its routing table (usually via an IGP). If not, the route is marked as invalid and not installed in the routing table.

5

Step 5 — Install Best Path

The router runs the BGP path selection algorithm (e.g., highest weight, highest local preference, shortest AS_PATH) and installs the best iBGP route into the routing table if it has a lower administrative distance than other protocols (iBGP AD is 200).

Practical Mini-Lesson

iBGP (Internal Border Gateway Protocol) is a path-vector routing protocol used to exchange BGP routes between routers within the same autonomous system (AS). Its core purpose is to ensure that all routers in an AS have consistent knowledge of external routes learned via eBGP. Unlike eBGP, which modifies the AS_PATH by prepending its own AS number, iBGP does not change the AS_PATH.

This behavior prevents routing loops because a router will reject a route that contains its own AS number. However, it also creates a challenge: the BGP split-horizon rule states that a route learned via iBGP cannot be advertised to another iBGP neighbor. This means that for all routers to learn all routes, a full mesh of iBGP sessions is required.

In a network with n routers, this requires n(n-1)/2 sessions, which becomes unscalable. To solve this, route reflectors and confederations are used. A route reflector allows iBGP routes to be advertised to other iBGP neighbors, reducing the number of sessions.

iBGP uses TCP port 179 and typically runs between loopback interfaces for stability. The administrative distance for iBGP is 200, making it less preferred than eBGP (AD 20) and most IGPs. For iBGP to work, the next-hop IP address (often an eBGP peer) must be reachable via an IGP (like OSPF or EIGRP).

Key takeaway: iBGP is essential for internal route distribution in BGP networks, but it requires careful design to overcome its full mesh and next-hop reachability constraints.

Memory Tip

Think 'I' for 'Internal' and 'I' for 'Inside' — iBGP stays inside the same AS. Remember: 'iBGP does not change the AS_PATH' — it's like an internal memo that keeps the original sender's stamp. Also, 'iBGP split-horizon: don't tell your iBGP friends what you learned from another iBGP friend.'

Covered in These Exams

Current Exam Context

Current exam versions that test this topic — use these objectives when studying.

Legacy Exam Context

Older materials may mention these exam versions, but learners should use the current objectives for their target exam.

N10-008N10-009(current version)

Related Glossary Terms

Frequently Asked Questions

Why do I need iBGP if I already have OSPF running inside my AS?

OSPF is an IGP that handles internal routing within your AS, but it cannot carry external BGP routes. iBGP is needed to distribute those external routes (e.g., Internet routes) among your routers so they all know how to reach destinations outside your AS.

What is the difference between iBGP and eBGP?

iBGP operates within the same AS, does not modify the AS_PATH, and has an administrative distance of 200. eBGP operates between different ASes, prepends its own AS number to the AS_PATH, and has an AD of 20. eBGP routes are preferred over iBGP routes.

Can I use a single iBGP session to share routes with multiple routers?

No, because of the BGP split-horizon rule, a router cannot advertise iBGP-learned routes to other iBGP neighbors. To share routes with multiple routers, you need either a full mesh of iBGP sessions or use route reflectors/confederations.

Why does iBGP require a full mesh?

The BGP split-horizon rule prevents a router from advertising iBGP-learned routes to other iBGP neighbors. Without a full mesh, some routers would not receive all routes. Route reflectors solve this by allowing selective re-advertisement.

What happens if the next-hop for an iBGP route is not reachable?

The router will mark the route as invalid and will not install it in the routing table. This is a common troubleshooting issue. The solution is to ensure that the next-hop IP is reachable via an IGP (e.g., OSPF) or by using the 'next-hop-self' command on the eBGP router.

Summary

1. iBGP (Internal BGP) is used to exchange BGP routes between routers within the same autonomous system, ensuring all routers have consistent external route information. 2. Its key technical property is that it does not modify the AS_PATH attribute, and it enforces a split-horizon rule that prevents advertising iBGP-learned routes to other iBGP neighbors, requiring a full mesh or route reflectors.

3. The most important exam fact: iBGP routes have an administrative distance of 200, and the next-hop must be reachable via an IGP for the route to be valid. Remember: iBGP is for internal distribution, not for exchanging routes between different ASes.