0% found this document useful (0 votes)
1 views45 pages

Net 6

BGP (Border Gateway Protocol) is the main protocol for inter-domain routing on the internet, allowing different Autonomous Systems to exchange routing information efficiently. It utilizes a variety of attributes and policies for route selection, maintaining a large routing table and minimizing unnecessary updates. Key features include the use of Route Reflectors and Confederations to manage iBGP connections, ensuring scalability and preventing routing loops.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views45 pages

Net 6

BGP (Border Gateway Protocol) is the main protocol for inter-domain routing on the internet, allowing different Autonomous Systems to exchange routing information efficiently. It utilizes a variety of attributes and policies for route selection, maintaining a large routing table and minimizing unnecessary updates. Key features include the use of Route Reflectors and Confederations to manage iBGP connections, ensuring scalability and preventing routing loops.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 45

1.

Introduction to BGP

 BGP (Border Gateway Protocol) is the primary protocol for inter-domain routing in the
internet.

 It enables routing between different Autonomous Systems (AS).

 BGP exchanges route updates only when there are changes, minimizing overhead.

2. Originating Routes in BGP

 Routes enter the BGP table through:

1. Network statement (manual entry).

2. Redistribution of static routes.

3. Redistribution of an IGP (e.g., OSPF) into BGP.

 BGP operates like a Distance Vector (DV) protocol—propagating updates to peers.

3. BGP Updates & Redistribution

 BGP maintains a large routing table (~512,000 prefixes).

 Updates are incremental, announcing only new or withdrawn routes.

 Redistribution rules:

o eBGP updates → sent to both iBGP & eBGP peers.

o iBGP updates → sent only to eBGP peers (not to other iBGP peers).

4. iBGP Full Mesh, Route Reflectors, and Confederations

 iBGP peers must be fully connected to avoid routing loops.

 Solutions to avoid full mesh:

1. Route Reflectors (RRs):

 Divide AS into clusters, each with an RR forwarding updates to clients.

2. Confederations:

 Divide AS into sub-ASs running iBGP internally and eBGP between them.

5. BGP vs. Intra-domain Routing

 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:

o Mandatory: AS-PATH, NEXT-HOP, ORIGIN.

o Discretionary: Atomic Aggregate.

 Optional Attributes:

o Transitive: Aggregator, Community.

o Non-transitive: LOCAL-PREF, MED (Multi-Exit Discriminator).

7. Important BGP Attributes

 Origin: Identifies how a route was introduced (IGP = 0, EGP = 1, Incomplete = 2).

 AS-PATH: Lists AS numbers a route passes through (prevents loops).

 NEXT-HOP: Specifies the IP address of the next AS in the route.

 LOCAL-PREF: Used within an AS to prefer certain routes (higher value preferred).

 Weight (Cisco-specific): Local router preference (higher value preferred).

 MED: Suggests preferred entry points to an AS (lower value preferred).

 Community: Groups routes for easier policy enforcement.

8. BGP Route Selection Algorithm

BGP selects the best route based on the following criteria (in order):

1. Highest Weight (Cisco-only).

2. Highest LOCAL-PREF.

3. Route originated from IGP in local AS.

4. Shortest AS-PATH.

5. Lowest ORIGIN value (IGP > EGP > Incomplete).

6. Lowest MED (if same AS).

7. Prefer eBGP routes over iBGP routes.

8. Lowest IGP metric to NEXT-HOP.


9. Lowest BGP router ID.

9. Routing Policy & Traffic Control

 Hot Potato Routing: Send packets out of an AS as quickly as possible.

 BGP Synchronization Rule:

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.

10. BGP Routing Policies in Provider Networks

 ISPs control traffic flow using local policies.

 Example: A customer AS may prevent transit traffic through it.

 ISPs often do not advertise routes unless necessary for revenue.

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.

Understanding BGP Route Origination in Simple Terms

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).

How Does a Route Get Into BGP?

There are three main ways to insert routes into the BGP table:

1. Network Statement (Manual Entry)

o This method tells BGP to announce a specific network.

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."

2. Redistribute Static Routes

o If a network was manually configured as a static route, it can be added to BGP.

o Example:

cpp

CopyEdit

redistribute static

o This means:

"Take all static routes in my routing table and advertise them using BGP."

3. Redistribute an IGP (e.g., OSPF) into 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."

How Does BGP Share Routes?

 Once a router learns a route, it automatically advertises it to its BGP neighbors.

 This is similar to how Distance Vector (DV) protocols like RIP work—each router passes
the route information along to others.

Analogy: The "Rumor" Effect

Imagine a group chat where people share news:


1. If one person learns about a new job opportunity, they tell their friends.

2. Those friends then pass the information along to their own contacts.

3. Eventually, everyone in the chat group knows about the job.

This is exactly how BGP works—routes spread across the internet like rumors!

Understanding Incremental BGP Updates in Simple Terms

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.

How Does BGP Handle Updates?

Unlike some other routing protocols that constantly refresh their tables, BGP uses an
incremental update system to reduce overhead:

1. Initial Route Exchange (One-Time Full Update)

o When two BGP routers become neighbors for the first time, they exchange their
entire routing tables (all prefixes they know).

o This happens only once when the connection is established.

2. Incremental Updates (Only When Needed)

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.

3. BGP Table Stores All Routes

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.

Analogy: Updating a Contact List


Imagine you and your friends keep a shared contact list:

 First Time: You all exchange your entire list of contacts.

 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.

Understanding Redistribution of BGP Updates

BGP follows specific rules when redistributing routing updates between peers. These rules
ensure efficient routing without unnecessary loops.

1. When an Update Comes from an eBGP Peer

 If a BGP router (speaker) receives an update from an external BGP (eBGP) neighbor, it
forwards the update to all of its:

o Internal BGP (iBGP) peers

o External BGP (eBGP) peers

Example from the Image:

 Router R receives an update from an eBGP peer (K).

 R redistributes the update to its:

o iBGP peers (S, T, U)

o Other eBGP peers (K, L)


2. When an Update Comes from an iBGP Peer

 If a BGP speaker receives an update from an iBGP neighbor, it does NOT forward the
update to other iBGP peers.

 Instead, it only forwards the update to eBGP peers.

Example from the Image:

 Router S receives an update from iBGP peer R.

 S forwards the update ONLY to eBGP peer L, but not to U or T (which are also iBGP
peers).

Why This Rule Exists?

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.

Understanding Full iBGP Mesh and Its Alternatives

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.

Full iBGP Mesh Requirement

 Router R must establish iBGP relationships with S, T, and U.

 Similarly, S, T, and U must establish iBGP relationships with each other.

 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.

Alternatives to Full iBGP Mesh

To avoid the complexity of a full mesh, two common scalable solutions exist:

1. Route Reflectors (RRs)

o Designate one or more routers as Route Reflectors to redistribute iBGP updates.

o Instead of a full-mesh, all routers peer only with the RR, which then forwards
updates.

o Reduces the number of iBGP connections significantly.

2. BGP Confederations

o Divide a large AS into multiple smaller sub-ASes (confederations).

o Inside each sub-AS, routers use iBGP, but between sub-ASes, they act like eBGP
peers.

o This reduces the number of iBGP sessions required.

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.

Understanding Route Reflectors (RR) in Simple Terms

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.

How Route Reflectors Work in BGP:

 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.

Why Use Route Reflectors?

 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.

 Ensures efficient route distribution – Updates get shared effectively without


overwhelming routers with unnecessary connections.

Understanding Confederations in Simple Terms

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.

How Confederations Work in BGP:

 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).

 Communication between different sub-ASs happens using External BGP (E-BGP).


 Confederations can also work with Route Reflectors (RRs) to further simplify
management.

Why Use Confederations?

 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.

Key Difference Between Route Reflectors (RRs) and Confederations:

 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.

Intra-Domain vs. Inter-Domain Routing Protocols Explained

Routing protocols help direct data packets across networks, but they fall into two major
categories:

1. Intra-Domain Routing Protocols (IGPs) – Inside a Single Network

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.

Common IGPs and Their Metrics:

 OSPF (Open Shortest Path First) → Uses cost (Cost = reference bandwidth / link
bandwidth).

 RIP (Routing Information Protocol) → Uses hop count (fewer hops = better path).

 EIGRP (Enhanced Interior Gateway Routing Protocol) → Uses a composite metric


(bandwidth, delay, load, and reliability).

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).

 BGP doesn’t rely on simple metrics like OSPF or RIP.

 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.

Key Differences at a Glance:

Feature Intra-Domain (IGP) Inter-Domain (BGP-4)

Scope Inside one AS Between multiple ASs

Examples RIP, OSPF, EIGRP BGP-4

Decision Metric Hop count (RIP), Cost (OSPF), Composite (EIGRP) Routing attributes & policies

Focus Fast convergence, efficiency Policy control, scalability

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).

 BGP focuses on policy-based routing, while IGPs optimize for efficiency.

🚀 Think of IGPs as managing traffic inside a city, while BGP is like handling international flights
between countries!

BGP Attributes Explained Simply

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.

Categories of BGP Attributes

1. Well-Known Attributes (Must Be Recognized by All BGP Routers)

These attributes are essential for BGP to function properly. They are further divided into:

 Mandatory → Must always be included in BGP updates.

 Discretionary → Might be included but are still recognized by all BGP routers.

2. Optional Attributes (Not All BGP Routers Need to Support Them)

Some attributes provide extra features but are not required for basic operation. These are:

 Transitive → If a router doesn’t understand the attribute, it still forwards it to other


routers.

 Non-Transitive → If a router doesn’t understand the attribute, it ignores it and doesn’t


pass it along.

Summary Table:

Category Definition Example Attributes

Well-Known Mandatory Must be in every BGP update AS Path, Next Hop, Origin

Well-Known May be included but must be


Local Preference
Discretionary recognized

Optional Transitive Not required, but passed to others Community

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.

 Transitive Attributes are like international stamps—if a country (router) doesn’t


recognize them, they still get passed along.

 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 Classification

BGP attributes are divided into two main categories: Well-known and Optional.

1. Well-Known Attributes (Recognized by All BGP Routers)

 Mandatory (Must be present in every BGP update)

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.

o ORIGIN: Indicates the source of the route (IGP, EGP, or Incomplete).

 Discretionary (May or may not be included but must be recognized)

o Atomic Aggregate: Indicates route summarization to avoid unnecessary path


details.

2. Optional Attributes (Not required for all BGP routers)

 Transitive (Passed along even if a router doesn’t support them)

o Aggregator: Identifies the AS that performed route aggregation.

o Community: Used for tagging routes for specific policies.

 Non-Transitive (Ignored if unsupported and not forwarded)

o Local-Pref: Used within an AS to prioritize preferred exit points.

o MED (Multi-Exit Discriminator): Influences inbound traffic by suggesting a


preferred entry point into an AS.

BGP ORIGIN Attribute (Type Code 1) – Explained Simply

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.

BGP assigns one of three values to the ORIGIN attribute:

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.

o It usually happens when a network administrator uses the network command to


inject a route into BGP.

o Routers prefer IGP-originated routes over the other types.

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.

BGP AS-PATH Attribute (Type Code 2) – Explained Simply

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.

How AS-PATH Works

1. Each route (prefix) in a BGP update message comes with an AS-PATH.

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.

Why is AS-PATH Important?

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

Imagine three ASes: AS100 → AS200 → AS300.

 AS300 advertises a network 192.168.1.0/24 to AS200.

 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).

Key Takeaways from the Diagram

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.

2. Loop Prevention Rule:

o AS 500 does NOT announce 180.10.0.0/16 back to AS 100.

o Why? Because AS 500 sees that AS 100 is already in the AS-PATH.

o If AS 100 received its own route back, it would create a loop, causing inefficient
routing or endless data loops.

3. How BGP Prevents Loops:

o When an AS receives an update, it checks the AS-PATH.

o If it sees its own AS number in the AS-PATH, it rejects the route to prevent a
loop.

Example Breakdown

 AS 100 originally advertises 180.10.0.0/16.

 AS 500 learns this route and would normally advertise it further.

 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).

Key Concepts from the Diagram

1. Prefix Aggregation:

o Uncle-P (AS 1001) and Uncle-Q (AS 1002) each advertise specific subnets:

 Uncle-P (AS 1001) advertises 180.180.1.64/26.

 Uncle-Q (AS 1002) advertises 180.180.1.128/26.

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 The aggregate prefix (180.180.1.0/24) is announced to ISP-Europe.

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.

 Improves Network Efficiency: Less overhead in routing updates.

 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).

Key Elements in the Diagram


1. Autonomous Systems (ASes)

o There are three ASes shown:

 AS1 (on the left)

 AS2 (in the middle)

 AS3 (on the right)

o Each AS has multiple routers labeled (e.g., 1a, 1b, 2a, 3a, etc.).

2. Physical Links (Black Lines)

o These represent direct connections between routers inside and across different
ASes.

3. NEXT-HOP Concept (Red Labels)

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.

o The diagram highlights two NEXT-HOP points in red where inter-AS


communication happens.

4. Routing Flow

o If traffic from AS1 (e.g., from 1a) needs to reach AS3, it must pass through AS2.

o AS1 selects a NEXT-HOP in AS2, forwarding traffic towards 2a or 2b.

o Similarly, AS2 forwards it toward 3a in AS3.

5. Important Notes

o NEXT-HOP ≠ Next Router: The next-hop is an IP address of the next AS border


router, not necessarily the next immediate router.

o Routing Decisions: BGP routers use the NEXT-HOP attribute to determine the
best path for forwarding traffic across ASes.

Simplified Explanation

Imagine you're traveling across three countries:


 AS1 = Ghana, AS2 = Nigeria, AS3 = Kenya.

 To travel from Ghana to Kenya, you must pass through Nigeria.

 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.

Why This Matters in BGP?

 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.

Breaking Down the Diagram

The diagram consists of three ASes:

1. AS1 (on the left)

2. AS2 (in the middle)

3. AS3 (on the right)

The destination X is inside AS3.

Step-by-Step Explanation

1. Learning Routes (BGP Updates)

o The router 1b in AS1 learns about two possible paths to reach X:

 Path 1: Via router 2a in AS2

 Path 2: Via router 3d in AS3 (direct connection)

2. Inter-AS Routing (Selecting Next-Hop)

o AS1 needs to decide which path is cheaper to forward packets.

o To do this, it looks at the cost of reaching the NEXT-HOP routers (2a or 3d).

o The cost is measured as the number of links traversed.

3. Cost Calculation

o The diagram states:

 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 AS1 offloads traffic to AS2 as fast as possible by choosing router 2a.

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.

How Does It Work?

1. Learn About Routes

o The router learns that a destination (e.g., a website or server) can be reached
through multiple gateways (exits from the network).

o These routes are provided by the inter-AS protocol (like BGP).

2. Check Internal Network Costs

o The router looks at its internal routing system (intra-AS protocol) to figure out
the cost of sending data to each gateway.

3. Choose the Cheapest 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.

4. Forward the Packet

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)

 Imagine you are a delivery person in a big warehouse (your AS).

 You have a package that needs to be sent out.

 There are multiple exits (gateways).

 Your boss tells you:


"Use the nearest exit, don’t worry about what happens once it’s outside."

 So you choose the closest door (least-cost gateway) and hand the package off quickly
instead of carrying it yourself for a longer distance.

Why is This Useful?

 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.

 Efficient Load Distribution: Traffic is balanced across different exits


This diagram illustrates how the Multi-Exit Discriminator (MED) attribute works in BGP (Border
Gateway Protocol) when there are multiple links between two Autonomous Systems (ASes).

Key Points About MED:

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.

Understanding the Diagram

 AS 1 and AS 2 are connected by two links:

o Router X ⟶ Router A (MED = 1)

o Router Y ⟶ Router B (MED = 10)

 AS 1 prefers the X → A link for receiving traffic because it has the lower MED value (1).

 How AS 2 Handles Outbound Traffic:

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.

Why is This Important?

 Helps control inbound traffic to an AS.

 Allows an AS to balance load by signaling preferred paths.

 Unlike Local Preference (which is for outbound traffic decisions), MED influences how
other ASes send traffic into your network.

Simplified Explanation of MED


 MED is used to influence inbound traffic: It tells a neighboring AS which path is
preferred when multiple paths exist between two ASes.

 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.

How It Works in the Diagram

 AS 1 and AS 2 have two links connecting them:

o Router X → Router A with MED = 1

o Router Y → Router B with MED = 10

 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

✅ MED helps ASes control how they receive traffic.


✅ Lower MED = More preferred route.
✅ It only applies between two neighboring ASes, not globally.
✅ Outbound traffic from AS 1 to AS 2 is NOT affected by MED—other BGP attributes control
that.

Multi-Exit Discriminator (MED) - Simple Explanation

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.

Key Points Explained Simply


🔹 MED is non-transitive → This means that MED only works between two directly connected
ASes. If AS 2 sends a route to AS 3, the MED value is reset to 0 and is no longer considered.

🔹 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.

BGP Weight Attribute - Simple Explanation

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.

Key Points Explained Simply

🔹 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:

 Road A (faster but toll required)

 Road B (slower but free)

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).

BGP LOCAL-PREF Attribute - Simple Explanation

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.

Key Points Explained Simply

🔹 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).

🔹 Default value is 100 → If no LOCAL-PREF is set, the router assumes it is 100.

Real-World Example

Imagine you are a company with two internet providers (ISP A and ISP B).

 ISP A has LOCAL-PREF = 200

 ISP B has LOCAL-PREF = 150

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:

1️⃣ Weight (Cisco Proprietary - Local to One Router)

🔹 Used only on a single router (not shared).


🔹 Higher Weight = Preferred path (outgoing traffic).
🔹 Only affects the local router’s decision—not shared with other routers.
🔹 Not exchanged in BGP updates (iBGP or eBGP).

✅ Think of Weight as a personal preference—only the router that sets it follows it.

2️⃣ LOCAL-PREF (Used Inside an AS - iBGP Only)

🔹 Shared between routers within the same AS (iBGP peers).


🔹 Higher LOCAL-PREF = Preferred path (outgoing traffic).
🔹 Used to choose which exit point to use when multiple paths are available to reach another
AS.

✅ Think of LOCAL-PREF as a company-wide rule—all routers inside the AS follow it.

3️⃣ MED (Multi-Exit Discriminator - Between ASs, Inbound Traffic)

🔹 Used between two ASs (not inside an AS).


🔹 Lower MED = Preferred path (inbound traffic).
🔹 Used by one AS to suggest which link should be used to send traffic into it (but the other AS
can ignore it).
🔹 Not transitive—other ASs reset or ignore 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

Weight Local to one router ❌ No Outbound Higher is better

LOCAL-PREF Inside an AS ✅ Yes (iBGP) Outbound Higher is better

MED Between ASs ✅ Yes (eBGP) Inbound Lower is better

Simplified Explanation of LOCAL-PREF, Weight, and MED

These three attributes help choose the best path for traffic in BGP routing. Each works
differently:

1️⃣ Weight (Local to One Router - Cisco Only)

🔹 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).

✅ Think of Weight like a personal preference on a single router.

2️⃣ LOCAL-PREF (Shared Within an AS - iBGP)

🔹 Affects outbound traffic (which exit point the AS should use).


🔹 Shared between routers inside the same AS (iBGP).
🔹 Higher LOCAL-PREF = Preferred path.
🔹 Controls routing decisions across the whole AS.

✅ Think of LOCAL-PREF like a company-wide policy—all routers in the AS follow it.

3️⃣ MED (Used Between ASs - Affects Inbound Traffic)

🔹 Tells another AS which path is preferred for incoming traffic.


🔹 Lower MED = Preferred path.
🔹 Only relevant between two ASs—it’s a suggestion, and the other AS can ignore it.
🔹 Not passed beyond the neighboring AS (i.e., it resets beyond that AS).
✅ Think of MED like a polite suggestion to another company—it might be followed, but it
doesn’t have to be.

Key Differences Table

Attribute Scope Shared? Affects Traffic Preference Rule

Weight One router only ❌ No Outbound Higher is better

LOCAL-PREF Entire AS (iBGP) ✅ Yes Outbound Higher is better

MED Between ASs (eBGP) ✅ Yes Inbound Lower is better

Simplified Explanation of Atomic Aggregate (Type Code 6)

What is Atomic Aggregate?

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

Imagine you have two specific routes:


🔹 11.0.0.0/8 (AS-PATH: [AS1 → AS2 → ISP-B])
🔹 11.1.0.0/16 (AS-PATH: [AS3 → ISP-B])

ISP-B combines them into one summarized route:


🔹 11.0.0.0/8 (AS-PATH: [ISP-B])

🔻 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.

When Not to Use Atomic Aggregate?

🔹 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

✅ Atomic Aggregate = "Warning! Some routing info is missing!"


✅ Helps prevent routing loops and ensures ISPs know they have incomplete data.
✅ Only applies when summarizing (aggregating) routes.
✅ If AS-SET is used (which preserves AS info), then Atomic Aggregate is unnecessary.

Simplified Explanation of Aggregator (Type Code 7)

What is the Aggregator Attribute?

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

🔹 Uncle-P advertises 11.1.0.0/16 to ISP-X.


🔹 Uncle-Q advertises 11.2.0.0/16 to ISP-X.
🔹 ISP-X combines both prefixes and announces a single summarized route:

 11.0.0.0/8 (instead of two separate /16 routes).

🔹 To indicate where the aggregation happened, ISP-X sets the Aggregator attribute:

 AS Number: AS-X (e.g., 65001)

 Router ID: The IP address of the BGP router in AS-X that performed the aggregation

Why is the Aggregator Attribute Important?

✅ Records who performed route aggregation


✅ Helps in troubleshooting and debugging BGP routes
✅ Used only when summarizing prefixes

Understanding the BGP Community Attribute


The Community attribute in BGP is like an immigration officer at an airport. It helps routers
categorize and handle incoming routes efficiently.

Airport Analogy ✈️

Imagine New York's airport receiving flights from different countries:


🔹 Nairobi
🔹 Naples
🔹 New Delhi
🔹 London

To manage the flow of passengers, immigration officers assign categories like:


✅ U.S. Citizens
✅ Permanent Residents
✅ Diplomats
✅ Military Personnel
✅ Political Refugees

Each category determines how a person is processed:


✔️U.S. Citizens → Allowed in quickly
✔️Refugees → Sent for extra screening
✔️Diplomats → Special processing

How This Relates to BGP

Routers tag routes with a Community value (like an immigration category).


💡 This helps ISPs and network admins group and control traffic flows.

Examples of BGP Community tags:


✅ Local Preference (Give higher priority to certain routes)
✅ Traffic Engineering (Direct traffic through a preferred path)
✅ Route Filtering (Prevent certain routes from being advertised)

Why is BGP Community Useful?

✅ Simplifies routing decisions


✅ Allows flexible traffic policies
✅ Improves network management
Understanding the BGP Community Attribute in Simple Terms

What is the Community Attribute?

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.

How Does It Work?

 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.

Example Scenario – ISP-Finland 🇫🇮

1️⃣ ISP-Finland receives prefixes from different sources:

 Clients (e.g., SisterY)

 Other ISPs

2️⃣ Assigning Community Tags:

 Routes learned from SisterY (clients) get a Community value of 999.

 Routes learned from other ISPs are left untagged or assigned a different value.

3️⃣ Applying Routing Policies:

 ISP-Finland advertises routes with Community 999 to other ISPs.

 ISP-Finland does NOT advertise routes learned from other ISPs.

👉 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

✅ Community allows route grouping and flexible control


✅ Can be used for filtering, traffic engineering, or preference settings
✅ Helps ISPs prevent being used as unwanted transit networks
How Does BGP Find the "Shortest" Path?

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.

How BGP Determines the Best Path

BGP uses a step-by-step decision-making process to select a single best route to each
destination.

Key BGP Attributes Used in Route Selection:

1️⃣ Weight (Cisco-specific) → Higher is better


2️⃣ Local Preference (LOCAL-PREF) → Higher is better
3️⃣ Originated from IGP → Preferred over EGP or Incomplete
4️⃣ AS-PATH → Shorter AS-PATH is better
5️⃣ Origin Type → IGP is better than EGP, which is better than Incomplete
6️⃣ Multi-Exit Discriminator (MED) → Lower is better
7️⃣ Prefer eBGP over iBGP → External routes are preferred
8️⃣ IGP Metric to NEXT-HOP → Lower is better
9️⃣ Router ID → Lowest is preferred (last tie-breaker)

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).

Why Does BGP Use Attributes Instead of a Simple Metric?

✅ More flexibility – Allows administrators to define custom routing policies.


✅ Better control – Can prioritize paths based on business agreements, performance, or
reliability.
✅ Scalability – Works better for global networks where simple metrics like "hop count" wouldn't
be enough.

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.

How BGP Selects the Best Path (Step-by-Step)

🔹 Step 1: Choose the path with the highest Weight (Cisco only)

 Weight is a Cisco-specific attribute that applies only on the local router.

 The higher the Weight, the better.

 If set manually, the router follows it first before considering other factors.

✅ Think of Weight as a personal favorite route that a router prefers.

🔹 Step 2: Choose the path with the highest LOCAL-PREF

 LOCAL-PREF is used inside an AS (shared among iBGP peers).

 The higher the LOCAL-PREF, the better.

 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.

🔹 Step 3: Prefer routes that originated from an IGP

 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).

 This prevents unnecessary detours across multiple networks.

✅ Think of AS-PATH like road tolls—the fewer toll booths you pass through, the better.

🔹 Step 5: Prefer the lowest ORIGIN value

 IGP (Interior Gateway Protocol) routes are preferred over EGP, which is preferred over
Incomplete routes.

 ORIGIN values:

o IGP (0) → Best

o EGP (1) → Okay

o Incomplete (2) → Worst

✅ 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.

 MED is a suggestion from another AS about which entry point is better.

✅ Think of MED as a road sign saying "Use this highway exit"—you may follow it, but you're
not forced to.

🔹 Step 7: Prefer eBGP over iBGP paths

 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.

 eBGP routes are considered more direct and reliable.

✅ 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

Step Criteria Preference Rule

1️⃣ Weight (Cisco only) Higher is better

2️⃣ LOCAL-PREF Higher is better

3️⃣ Originated from IGP IGP > EGP > Incomplete

4️⃣ AS-PATH length Shorter is better

5️⃣ Origin Type IGP > EGP > Incomplete

6️⃣ MED (Multi-Exit Discriminator) Lower is better

7️⃣ eBGP over iBGP eBGP is preferred

8️⃣ IGP metric to NEXT-HOP Lower is better

9️⃣ Router ID Lowest ID wins (last tie-breaker)

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.

BGP and IGP Synchronization – Understanding Black Holes

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.

How Does the Black Hole Occur?

1️⃣ iBGP Learns a Route First

 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.

3️⃣ Why Does This Happen?

 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.

BGP Synchronization Rule (Fixing the Issue)

To prevent black holes, BGP follows this synchronization rule:


✅ Do NOT advertise an iBGP-learned route to an external AS (eBGP) until all routers inside the
AS have learned it via IGP.
This ensures that:
✔️All routers in the AS know how to forward packets.
✔️No packets get lost due to missing routes.

Real-World Example

Imagine a package delivery system:

 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.

How Does an Entry Get Into the Forwarding Table?

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

1️⃣ Router Becomes Aware of the Prefix

🔹 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.

2️⃣ Determine the Best Route and Output Port

🔹 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.

3️⃣ Enter Prefix-Port Entry in the Forwarding Table

🔹 Once the router selects the best path, it adds an entry to the forwarding table.
🔹 The entry includes:

 The destination prefix (e.g., 192.168.1.0/24).

 The next-hop IP address (where the packet should be sent).

 The outgoing port/interface (which exit point to use).

✅ 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.

Key Points from the Diagram:

1. Provider Networks:

o A, B, and C are provider networks that offer connectivity services.

2. Customer Networks:

o X, W, and Y are customers that rely on provider networks for internet access.

3. Dual-Homed Network (X):

o X is connected to both B and C, making it a dual-homed customer.

o This means X has redundancy and can route traffic through either B or C.

4. Routing Policy Restriction:

o X does not want to act as a transit between B and C.

o X will not advertise to B a route to C, preventing B from using X to reach 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.

Key Takeaways from the Diagram:

1. Path Advertisements:

o A → B: AS A advertises the path AW to AS B.

o B → X: AS B then advertises the learned path BAW to AS X.

2. Should B Advertise BAW to C?

o No!

 AS B has no financial incentive to provide a transit path for AS C.


 Neither W nor C are paying customers of B.

3. B’s Routing Policy Strategy:

o B forces C to use A if it wants to reach W.

o B only wants to route to/from its own customers to maximize revenue.

Why Does BGP Allow This?

 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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy