Net 6
Net 6
Introduction to BGP
BGP (Border Gateway Protocol) is the primary protocol for inter-domain routing in the
internet.
BGP exchanges route updates only when there are changes, minimizing overhead.
Redistribution rules:
o iBGP updates → sent only to eBGP peers (not to other iBGP peers).
2. Confederations:
Divide AS into sub-ASs running iBGP internally and eBGP between them.
IGPs (e.g., OSPF, RIP) use metrics like cost or hop count for routing decisions.
BGP uses routing policies and attributes instead of a single metric.
6. BGP Attributes
Well-Known Attributes:
Optional Attributes:
Origin: Identifies how a route was introduced (IGP = 0, EGP = 1, Incomplete = 2).
BGP selects the best route based on the following criteria (in order):
2. Highest LOCAL-PREF.
4. Shortest AS-PATH.
o A router should not use or advertise a route learned via iBGP until all routers in
the AS learn the route via IGP.
o Avoids "black holes" where some routers lack necessary route information.
Final Thoughts
BGP is a policy-driven, scalable protocol designed for inter-domain routing. Unlike IGPs, which
use simple cost metrics, BGP relies on multiple attributes and routing policies to determine the
best path.
Before routers can exchange routes using BGP, they must first form a connection (called a BGP
neighbor relationship). Once this connection is established, they are ready to advertise
network prefixes (which are basically lists of reachable networks).
There are three main ways to insert routes into the BGP table:
o Example:
nginx
CopyEdit
network 192.168.1.0 mask 255.255.255.0
o This means:
"Hey BGP, if this network (192.168.1.0/24) is already in my routing table, please advertise it to
my BGP neighbors."
o Example:
cpp
CopyEdit
redistribute static
o This means:
"Take all static routes in my routing table and advertise them using BGP."
o If the router is running an Interior Gateway Protocol (IGP) like OSPF, it can inject
those learned routes into BGP.
o Example:
nginx
CopyEdit
redistribute ospf 10
o This means:
"Take all routes learned from OSPF (process 10) and advertise them to my BGP neighbors."
This is similar to how Distance Vector (DV) protocols like RIP work—each router passes
the route information along to others.
2. Those friends then pass the information along to their own contacts.
This is exactly how BGP works—routes spread across the internet like rumors!
BGP is responsible for handling a huge number of internet routes—currently over 512,000
prefixes (individual network entries). Because of this, BGP must be designed to work efficiently
and avoid unnecessary data exchange.
Unlike some other routing protocols that constantly refresh their tables, BGP uses an
incremental update system to reduce overhead:
o When two BGP routers become neighbors for the first time, they exchange their
entire routing tables (all prefixes they know).
o After the initial exchange, BGP does not periodically send updates.
o Instead, BGP only announces new routes or withdraws old routes when changes
occur.
o This makes BGP much more efficient than protocols that regularly flood the
network with updates.
o Every BGP router maintains a BGP table, which contains all the routes learned
from its neighbors.
o When a router needs to decide how to forward traffic, it picks the best route
from this table.
After That: You only share new contacts or remove old ones—you don’t resend the
whole list every day.
BGP works the same way—it keeps things efficient by only sending updates when necessary
instead of constantly refreshing everything.
BGP follows specific rules when redistributing routing updates between peers. These rules
ensure efficient routing without unnecessary loops.
If a BGP router (speaker) receives an update from an external BGP (eBGP) neighbor, it
forwards the update to all of its:
If a BGP speaker receives an update from an iBGP neighbor, it does NOT forward the
update to other iBGP peers.
S forwards the update ONLY to eBGP peer L, but not to U or T (which are also iBGP
peers).
The no iBGP-to-iBGP redistribution rule prevents routing loops and redundant updates in the
network. To ensure all iBGP routers get updates, full-mesh connectivity or Route Reflectors are
used.
In an Autonomous System (AS), routers running Internal BGP (iBGP) must share route updates
with each other to maintain a consistent BGP table. However, iBGP follows a key rule:
iBGP routers do not forward updates received from one iBGP peer to another iBGP peer.
This means that every iBGP router must directly peer with every other iBGP router, forming a
full mesh.
Without a full mesh, some routers may miss route updates, leading to incomplete
routing tables and potential routing failures.
Problems with a Full iBGP Mesh
A full-mesh topology is difficult to scale because every router must have a connection to
every other router.
The number of connections grows as N × (N-1) / 2, which becomes impractical for large
networks.
To avoid the complexity of a full mesh, two common scalable solutions exist:
o Instead of a full-mesh, all routers peer only with the RR, which then forwards
updates.
2. BGP Confederations
o Inside each sub-AS, routers use iBGP, but between sub-ASes, they act like eBGP
peers.
Key Takeaways
Full iBGP mesh ensures all routers in an AS have consistent BGP tables, but it does not
scale well.
Route Reflectors and Confederations help solve this problem by reducing iBGP session
overhead.
Imagine you are in a big classroom where every student (router) needs to share important
updates with everyone else. Normally, each student would have to talk to every other student
directly, which can get very chaotic and inefficient in a large class.
To make things easier, we divide the class into smaller groups (clusters). Each group has a
leader (Route Reflector, RR) who listens to their group members (clients) and passes the
updates to other leaders. The leaders then share those updates with their own group members.
Instead of every router (student) connecting to every other router, we organize them
into clusters.
Each cluster has a Route Reflector (RR), which collects and distributes route updates.
Clients (regular routers) only need to connect to their own RR and not to every other
router.
RRs are connected to each other in a full mesh so they can exchange updates across
different clusters.
Reduces complexity – Without RRs, every router would need a connection to every
other router (which is impractical in large networks).
Saves resources – Fewer connections mean less processing and memory usage.
Imagine you are managing a huge school with thousands of students. If every student had to
communicate directly with every other student, it would be chaotic and inefficient.
To solve this, you decide to divide the school into smaller sections (sub-schools), where each
section manages its own students. Instead of all students talking directly, each sub-school has a
coordinator who handles communication with other sub-schools.
The big network (Autonomous System, AS) is split into smaller sub-ASs.
Within each sub-AS, routers must maintain a full iBGP mesh (meaning all routers inside
a sub-AS must communicate with each other).
Scalability – Helps manage large networks by breaking them into smaller, more
manageable parts.
Reduces complexity – Each sub-AS only needs to maintain full iBGP internally, rather
than across the entire network.
Improves performance – Reduces the number of direct connections, which lowers the
processing and memory load on routers.
Route Reflectors (RRs) simplify iBGP by reducing the number of direct connections
inside an AS.
Confederations break a large AS into multiple smaller sub-ASs, using E-BGP between
them.
Routing protocols help direct data packets across networks, but they fall into two major
categories:
These protocols operate within a single Autonomous System (AS) (e.g., an organization’s
private network). They rely on metrics to determine the best path for data.
OSPF (Open Shortest Path First) → Uses cost (Cost = reference bandwidth / link
bandwidth).
RIP (Routing Information Protocol) → Uses hop count (fewer hops = better path).
These protocols focus on efficiency and fast convergence within a controlled network.
2. Inter-Domain Routing Protocols – Between Multiple Networks
When data needs to travel between different Autonomous Systems (ASs) (e.g., across the
internet), we use BGP-4 (Border Gateway Protocol version 4).
Instead, BGP evaluates multiple attributes (like AS path length, local preference, and
MED) to find the best route while following network policies.
Example:
A company may prefer sending data through a specific ISP even if another path is
technically shorter.
BGP allows enforcing such routing policies, ensuring traffic flows according to business
or security needs.
Decision Metric Hop count (RIP), Cost (OSPF), Composite (EIGRP) Routing attributes & policies
Summary:
IGPs (e.g., OSPF, RIP, EIGRP) help route data within an organization’s network.
BGP-4 controls how data moves between different networks (across the internet).
🚀 Think of IGPs as managing traffic inside a city, while BGP is like handling international flights
between countries!
BGP (Border Gateway Protocol) uses attributes to decide the best path for routing traffic across
different networks (Autonomous Systems, AS). Each advertised network (prefix) in BGP comes
with a set of attributes that influence routing decisions.
Why Do We Need BGP Attributes?
They allow custom routing policies (e.g., preferring one ISP over another).
Every BGP route update must include mandatory attributes, while others are optional.
These attributes are essential for BGP to function properly. They are further divided into:
Discretionary → Might be included but are still recognized by all BGP routers.
Some attributes provide extra features but are not required for basic operation. These are:
Summary Table:
Well-Known Mandatory Must be in every BGP update AS Path, Next Hop, Origin
Multi-Exit Discriminator
Optional Non-Transitive Not required, not forwarded
(MED)
🚀 Analogy:
Think of BGP attributes like travel documents for packets:
Well-Known Attributes are like passports—every country (router) must check them.
Optional Attributes are like visas—some countries require them, others don’t.
Non-Transitive Attributes are like local permits—if a country (router) doesn’t recognize
them, they are ignored.
I see the image contains a diagram explaining BGP attributes. Let me summarize the key points
from it:
BGP attributes are divided into two main categories: Well-known and Optional.
o AS-PATH: Shows the list of Autonomous Systems (AS) a route has passed
through.
o NEXT-HOP: Specifies the next-hop IP address for reaching the advertised route.
The ORIGIN attribute in BGP tells routers how a particular network (IP prefix) was introduced
into BGP. It helps routers decide which path is more reliable when choosing between multiple
routes.
1. 0 - IGP (i)
o This means the route was advertised by an Interior Gateway Protocol (IGP)
inside the Autonomous System (AS) before being shared via BGP.
2. 1 - EGP (e)
o This means the route was learned using the older Exterior Gateway Protocol
(EGP) (a predecessor of BGP).
o Since EGP is rarely used today, this value is uncommon.
3. 2 - Incomplete (?)
o This happens when a route is redistributed into BGP from another protocol
(e.g., OSPF, RIP, or a static route).
o BGP does not know the exact origin of the route, so it marks it as "Incomplete."
o These routes are less preferred than IGP-originated and EGP-learned routes.
Preference Order
When BGP has multiple routes to the same destination, it prefers the route with the lowest
ORIGIN value:
✅ IGP (0) is preferred over EGP (1), which is preferred over Incomplete (2).
This helps ensure that routes coming directly from a known internal network are trusted more
than routes from external sources or unknown origins.
The AS-PATH attribute is like a "travel history" for a network route in BGP. It keeps track of all
the Autonomous Systems (AS) that a route has passed through before reaching a router.
2. When a router advertises a route to an external BGP (eBGP) neighbor, it adds its own
AS number to the front of the AS-PATH.
3. If another router in a different AS receives this update, it does the same—appending its
AS number before sending it to another AS.
4. Inside the same AS (iBGP peers), the AS-PATH does not change.
1. Loop Prevention – If a router sees its own AS number in the AS-PATH of an incoming
route, it knows this route has already passed through its AS and will reject it to prevent
routing loops.
2. Route Selection – BGP prefers routes with shorter AS-PATHs because fewer AS hops
usually mean a faster and more direct path.
Example
AS200 then advertises it to AS100 but adds its own AS number to the AS-PATH.
AS100 receives the route with AS-PATH: 200 300 (meaning the route passed through
AS200 and AS300).
If AS100 has another path to 192.168.1.0/24 through AS400 with AS-PATH 400 500 300, it will
prefer the shorter path (200 300) because it has fewer AS hops.
The image illustrates the AS-PATH loop prevention mechanism in BGP (Border Gateway
Protocol).
1. AS-PATH Tracking:
o Each network prefix carries an AS-PATH that lists the ASes it has traversed.
o For example, 140.10.0.0/16 has an AS-PATH of 300, meaning it originated from
AS 300.
o Similarly, 170.10.0.0/16 has AS-PATH 300 200, meaning it came from AS 300,
then AS 200.
o If AS 100 received its own route back, it would create a loop, causing inefficient
routing or endless data loops.
o If it sees its own AS number in the AS-PATH, it rejects the route to prevent a
loop.
Example Breakdown
But AS 500 notices that AS 100 is the origin of the route and will NOT send it back to AS
100.
This prevents AS 100 from accepting a path that loops back to itself.
Real-World Implication
This mechanism ensures that BGP does not create routing loops, which could overload
networks and cause instability.
The image explains AS-PATH and Prefix Aggregation in BGP (Border Gateway Protocol).
1. Prefix Aggregation:
o Uncle-P (AS 1001) and Uncle-Q (AS 1002) each advertise specific subnets:
o ISP-B (AS 200) aggregates these two prefixes into a single larger prefix:
180.180.1.0/24.
o This reduces the number of entries in the global routing table, making routing
more efficient.
2. AS-PATH Information:
o However, the aggregate came from both AS 1001 and AS 1002, meaning the AS-
PATH should ideally reflect both origins.
Why Aggregation Matters:
Reduces Routing Table Size: Instead of two separate prefixes, a single prefix is
announced.
Can Lose AS-PATH Information: Aggregation may hide details about the original ASes,
which can impact routing decisions.
Takeaway:
ISP-B (AS 200) is performing BGP route aggregation, making routing more scalable while
still ensuring connectivity to AS 1001 and AS 1002.
This diagram explains the NEXT-HOP (Type Code 3) concept in BGP (Border Gateway Protocol),
which is critical for inter-domain routing between different Autonomous Systems (ASes).
o Each AS has multiple routers labeled (e.g., 1a, 1b, 2a, 3a, etc.).
o These represent direct connections between routers inside and across different
ASes.
o The NEXT-HOP is the IP address of the router interface that begins the AS-PATH
to the destination.
o It does not necessarily mean the next physical router, but rather the next AS exit
point.
4. Routing Flow
o If traffic from AS1 (e.g., from 1a) needs to reach AS3, it must pass through AS2.
5. Important Notes
o Routing Decisions: BGP routers use the NEXT-HOP attribute to determine the
best path for forwarding traffic across ASes.
Simplified Explanation
The NEXT-HOP is like the airport in Nigeria where you land before continuing to Kenya.
You may take different flights (routes), but the NEXT-HOP airport is always your
connection point.
Reduces unnecessary routing updates: Instead of storing full paths, routers only store
NEXT-HOP addresses.
Increases efficiency: Helps routers quickly determine the best way to forward packets
between ASes.
This diagram explains Hot Potato Routing in BGP (Border Gateway Protocol) when choosing
among multiple Autonomous Systems (ASes).
What is Hot Potato Routing?
Hot Potato Routing is a strategy where a network offloads traffic as quickly as possible to
another network (Autonomous System) instead of keeping it longer. The goal is to minimize the
cost inside the sending AS.
Step-by-Step Explanation
o To do this, it looks at the cost of reaching the NEXT-HOP routers (2a or 3d).
3. Cost Calculation
1b → 2a costs 2 hops
1b → 3d costs 3 hops
o Since 2a has the lower cost (2 hops vs. 3 hops), AS1 selects router 2a as the
next-hop.
4. Applying Hot Potato Routing
o This means AS1 avoids keeping the packet within its network for longer.
o AS2 now has to forward the packet toward AS3 and ultimately to X.
Key Takeaways
Hot Potato Routing = Get rid of traffic quickly by sending it through the shortest internal
path to another AS.
AS1 prefers router 2a over 3d because it minimizes its own routing cost.
This can lead to suboptimal paths globally, since AS1’s decision is purely based on its
own network cost rather than considering end-to-end performance.
The diagram explains Hot Potato Routing, which is a way for a network (Autonomous System,
AS) to forward packets as quickly as possible to another network. Let's break it down step by
step in simple terms:
What is Hot Potato Routing?
Imagine you have a hot potato in your hand—it’s burning! You want to get rid of it as fast as
possible by passing it to the closest person instead of holding onto it.
In computer networks, some networks (ASes) want to offload traffic quickly rather than
keeping it inside their system. They do this by sending data to the closest exit point to another
network.
o The router learns that a destination (e.g., a website or server) can be reached
through multiple gateways (exits from the network).
o The router looks at its internal routing system (intra-AS protocol) to figure out
the cost of sending data to each gateway.
o The router picks the gateway with the smallest cost (meaning the shortest or
cheapest path within its network).
o It does NOT consider the cost beyond its network—it just wants to pass the
packet as fast as possible.
o The router updates its forwarding table and sends the packet through the least-
cost gateway.
Key Idea
The router only cares about getting the packet out of its own network quickly.
It doesn’t worry about what happens after—whether the final path is long or
expensive.
Example (Real-World Analogy)
So you choose the closest door (least-cost gateway) and hand the package off quickly
instead of carrying it yourself for a longer distance.
Faster Packet Delivery: The network doesn't waste time forwarding packets internally.
Lower Internal Costs: The AS avoids expensive internal routing by handing off packets
quickly.
1. MED is a "hint" sent from one AS to another about the preferred entry point.
2. Lower MED values are preferred—routes with a smaller MED are chosen over routes
with a higher MED.
3. MED only matters between the two ASes; it does not influence routing decisions in
other ASes.
AS 1 prefers the X → A link for receiving traffic because it has the lower MED value (1).
o When Router X and Router Y in AS 2 need to send traffic to AS 1, they check the
MED values.
o Since MED = 1 (X → A) is lower than MED = 10 (Y → B), both X and Y will send
traffic to AS 1 via Router A instead of Router B.
Unlike Local Preference (which is for outbound traffic decisions), MED influences how
other ASes send traffic into your network.
It is only relevant between two directly connected ASes—it does not affect routing
decisions beyond the immediate neighbor.
Lower MED values are preferred—meaning traffic will enter through the link with the
smallest MED.
Since MED = 1 is lower than MED = 10, AS 2 (Routers X and Y) will prefer sending traffic
to AS 1 via Router A.
Even Router Y will forward traffic via Router X instead of using its direct link to Router B
because X → A is the preferred route.
Key Takeaways
The Multi-Exit Discriminator (MED) is a BGP (Border Gateway Protocol) attribute that helps an
AS tell its neighbor which entry point it prefers when there are multiple links between them.
However, it has some limitations and is not always respected by ISPs.
🔹 ISPs often ignore MED → Internet Service Providers (ISPs) usually prefer to offload traffic at
the nearest exit point instead of following MED rules. This is because ISPs aim to optimize their
network performance and reduce costs.
🔹 Used mainly between "friendly" ASes → If two companies or organizations own ASes and
want to control how traffic flows between them, they can use MED. However, in large-scale
public ISP networks, it is not very effective.
Real-World Example
Imagine two offices (AS 1 and AS 2) connected by two roads. AS 2 prefers that visitors from AS 1
enter through Gate A instead of Gate B. They put up a sign (MED) saying "Please use Gate A"
because it has a smoother road. However, if the visitors (traffic) are from a third company (AS
3), they won’t see the sign because it doesn’t apply beyond AS 2.
Similarly, ISPs ignore these signs (MED) because they care more about reaching destinations
quickly than following preferences.
The Weight attribute is a special setting used in Cisco routers to control which path a router
should use when there are multiple ways to reach the same destination.
🔹 Cisco Proprietary → This means that the Weight attribute only works on Cisco devices and is
not part of the standard BGP rules.
🔹 Used only inside a router → Weight is not shared with other routers. It only affects decisions
made by the router where it is set.
🔹 Higher Weight = Preferred Path → The router will always choose the path with the highest
Weight when sending traffic.
🔹 Affects only outgoing traffic → The Weight attribute helps a router decide which path to use
when sending data but does not control how incoming traffic enters the network.
Real-World Example
Imagine you are choosing a route to work and have two roads to get there:
You prefer Road A because it is quicker, so you give it a higher priority (Weight) in your
navigation app. However, your friends (other routers) do not know or follow your preference
because Weight settings are only local to you (your router).
The LOCAL-PREF (Local Preference) attribute is a setting used inside an Autonomous System
(AS) to decide which path to use when sending traffic out of the AS.
🔹 Similar to Weight but shared → Like the Weight attribute, LOCAL-PREF helps decide which
path to use for outgoing traffic, but unlike Weight, it is shared between routers inside the same
AS (iBGP peers).
🔹 Higher LOCAL-PREF = Preferred Path → The router will choose the path with the highest
LOCAL-PREF when sending data out of the AS.
🔹 Used inside an AS → LOCAL-PREF is only used within the same AS and is not shared with
external networks (eBGP peers).
Real-World Example
Imagine you are a company with two internet providers (ISP A and ISP B).
Because ISP A has a higher LOCAL-PREF, all routers in your company’s network will prefer to
send traffic through ISP A instead of ISP B.
Comparing LOCAL-PREF, Weight, and MED - Simple Explanation
These three BGP attributes help decide which paths should be used for routing traffic.
However, they work differently:
✅ Think of Weight as a personal preference—only the router that sets it follows it.
✅ Think of MED as a suggestion to another company—but they don’t have to follow it.
Summary Table
Attribute Scope Shared? Affects Traffic Preference Rule
These three attributes help choose the best path for traffic in BGP routing. Each works
differently:
🔹 Affects only outbound traffic (which path a router uses to send traffic).
🔹 Only matters on the router where it's set—it does not affect other routers.
🔹 Higher Weight = Preferred path.
🔹 Not shared with other routers (neither iBGP nor eBGP).
When an AS (Autonomous System) summarizes multiple routes into a single, broader route, it
might lose some detailed routing information. The Atomic Aggregate attribute is used to
indicate this loss.
Example Scenario
🔻 Problem: ISP-Europe, which receives only the summarized 11.0.0.0/8, loses the original AS-
PATH details for 11.1.0.0/16.
🔹 To warn that routing details have been lost, ISP-B sets the Atomic Aggregate attribute.
🔹 If ISP-B includes all originating ASs using the AS-SET attribute, then it keeps AS-PATH details,
and Atomic Aggregate is not needed.
Key Takeaways
The Aggregator attribute is used in BGP (Border Gateway Protocol) when an AS (Autonomous
System) combines multiple routes into a single, broader route. It records the AS number and
the BGP router ID of the device that performed the aggregation.
Example Scenario
🔹 To indicate where the aggregation happened, ISP-X sets the Aggregator attribute:
Router ID: The IP address of the BGP router in AS-X that performed the aggregation
Airport Analogy ✈️
The Community attribute in BGP is a tag that routers attach to routes. These tags allow network
administrators to group routes and apply policies to them.
An Autonomous System (AS) can assign a Community value to each route it learns.
Routing decisions (such as whether to advertise a route or prefer a specific path) can be
based on this Community tag.
Other ISPs
Routes learned from other ISPs are left untagged or assigned a different value.
👉 Why? To prevent being misused as a transit ISP—meaning ISP-Finland doesn’t want to carry
traffic for other ISPs unless it's from its own customers.
Key Takeaways
Unlike traditional routing protocols (like OSPF or RIP) that use simple metrics (cost or hop
count), BGP selects the best path based on multiple attributes. These attributes allow network
administrators to implement different routing policies depending on their needs.
BGP uses a step-by-step decision-making process to select a single best route to each
destination.
Example Scenario
Imagine a company needs to send traffic to 192.168.1.0/24, and there are two possible paths:
🔹 Path 1: AS-PATH = 65010 65020 (shorter)
🔹 Path 2: AS-PATH = 65010 65030 65040 (longer)
💡 BGP will prefer Path 1 because it has a shorter AS-PATH (fewer AS hops).
BGP Route Selection Process – How BGP Picks the Best Path
BGP often learns multiple paths to the same destination, but it must select only one best path.
The decision is made using a step-by-step process based on several attributes.
🔹 Step 1: Choose the path with the highest Weight (Cisco only)
If set manually, the router follows it first before considering other factors.
This is the most common way for companies and ISPs to control outbound traffic.
✅ Think of LOCAL-PREF as a company-wide rule that tells all routers in an AS which exit point
is preferred.
If a route was learned from an Interior Gateway Protocol (IGP), BGP prefers it over an
External Gateway Protocol (EGP) or a route with an Incomplete origin.
✅ Think of this as trusting local routes more than external or unknown sources.
🔹 Step 4: Choose the path with the shortest AS-PATH
The fewer ASes a route passes through, the better (shorter AS-PATH).
✅ Think of AS-PATH like road tolls—the fewer toll booths you pass through, the better.
IGP (Interior Gateway Protocol) routes are preferred over EGP, which is preferred over
Incomplete routes.
ORIGIN values:
✅ Think of this as trusting officially announced routes more than routes learned indirectly.
🔹 Step 6: Choose the path with the lowest MED (Multi-Exit Discriminator)
If the paths are from the same AS, the route with the lowest MED is preferred.
✅ Think of MED as a road sign saying "Use this highway exit"—you may follow it, but you're
not forced to.
If a router learns a route from both an external BGP (eBGP) neighbor and an internal
BGP (iBGP) neighbor, it will prefer the eBGP route.
✅ Think of eBGP as a trusted message from another company, while iBGP is just an internal
discussion.
🔹 Step 8: Choose the path with the lowest IGP metric to the next hop
If multiple paths are still available, BGP checks which one has the shortest internal
distance inside the AS.
The router uses its internal routing protocol (like OSPF or EIGRP) to measure the
distance to the NEXT-HOP router.
✅ Think of this as choosing the fastest road to reach the highway entrance.
🔹 Step 9: Choose the path from the router with the lowest Router ID (Last Tie-Breaker)
If everything else is still equal, the router with the lowest BGP Router ID wins.
The Router ID is usually the highest IP address on the router or manually configured.
✅ Think of this as "If everything is equal, let the router with the smallest ID win."
🔹 Summary Table
Final Takeaways
✅ BGP does not always choose the "shortest" path based on distance—it considers multiple
factors like business policies, network reliability, and route origin.
✅ Network administrators can control BGP decisions by setting attributes like Weight, LOCAL-
PREF, and MED.
✅ If two paths are completely equal, the router ID is used as the final tie-breaker.
A black hole in networking happens when packets are sent to a destination that is not
reachable because some routers do not know how to forward them. This issue can occur when
BGP and IGP are not synchronized.
In the diagram, ISP-A-3 learns about the route 192.200.200.0/24 through iBGP.
However, ISP-A-4 (another router in the AS) has NOT yet learned this route via IGP.
2️⃣ Packets Are Sent to a Router That Doesn’t Know the Route
If ISP-A-3 forwards traffic to ISP-A-4, ISP-A-4 doesn’t know how to forward it.
The packets get dropped, creating a black hole—traffic disappears instead of reaching
its destination.
BGP advertises routes between ASes, but inside the AS, IGP (like OSPF or EIGRP)
handles routing.
If an IGP hasn’t learned a route yet, routers inside the AS won’t know where to send the
traffic.
Real-World Example
A warehouse (ISP-A-3) learns about a new city (192.200.200.0/24) before its delivery
trucks (ISP-A-4) know how to get there.
If customers send packages immediately, the trucks won’t know where to go, and the
packages will be lost (black hole).
To fix this, the warehouse waits until all trucks have maps (IGP learns the route) before
accepting packages.
Takeaways
✅ Black holes happen when BGP propagates routes before IGP is ready.
✅ BGP synchronization ensures that all routers in an AS know the route before advertising it
externally.
✅ Most modern networks disable BGP synchronization and rely on fully meshed iBGP or Route
Reflectors to prevent this issue.
A router's forwarding table (also called the routing table) is where it stores the best routes for
sending traffic. BGP and other protocols work together to determine the best path before the
router updates its forwarding table.
Step-by-Step Process
🔹 The router learns about a new network (prefix) from BGP route advertisements received
from other routers.
🔹 This means the router knows that a certain IP range (e.g., 192.168.1.0/24) exists somewhere
on the internet.
✅ Think of this as a traveler learning about a new city from a map.
🔹 The router must decide which exit port to use to send traffic to that prefix.
🔹 This happens in two stages:
Inter-AS Routing (BGP Selection) → The router picks the best path between ASes.
Intra-AS Routing (OSPF, EIGRP, etc.) → The router figures out the best path inside its
own AS to reach the BGP-selected exit point.
🔹 The router then maps the prefix to the correct outgoing interface (port).
✅ Think of this as choosing the best airport and flight to reach your destination.
🔹 Once the router selects the best path, it adds an entry to the forwarding table.
🔹 The entry includes:
✅ Think of this as saving the best route in your GPS so you can follow it automatically.
Final Takeaways
✅ Routers don’t immediately add routes to the forwarding table—they first compare paths
using BGP and IGP.
✅ The best route is determined based on multiple factors (BGP attributes, OSPF cost, etc.).
✅ Once selected, the prefix and exit interface are stored in the forwarding table for quick
decision-making.
This diagram explains BGP routing policy and how ASes (Autonomous Systems) manage route
advertisements based on business relationships.
1. Provider Networks:
2. Customer Networks:
o X, W, and Y are customers that rely on provider networks for internet access.
o This means X has redundancy and can route traffic through either B or C.
o This policy ensures that X is not responsible for carrying traffic between two
provider networks (B and C).
Why is this important?
This prevents provider networks from using customer networks as transit, ensuring
that customers don’t pay for traffic that isn’t theirs.
X enforces this by filtering BGP advertisements and not announcing C’s routes to B.
This diagram illustrates another BGP routing policy scenario focusing on provider-customer
relationships and how Autonomous Systems (ASes) control traffic flow based on business
motivations.
1. Path Advertisements:
o No!
BGP is policy-based routing, meaning ASes can filter route advertisements based on
business agreements.
AS B chooses not to propagate BAW to C, ensuring C must route traffic via A instead.