0% found this document useful (0 votes)
2 views

Net 5

The document provides an overview of Inter-Domain Routing and the Border Gateway Protocol (BGP), detailing how Autonomous Systems (ASs) communicate and exchange routing information. It explains the types of ASs, BGP mechanisms, and the importance of peering and transit relationships in internet connectivity. Key takeaways highlight BGP's role in managing internet traffic and its manual configuration requirements.
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)
2 views

Net 5

The document provides an overview of Inter-Domain Routing and the Border Gateway Protocol (BGP), detailing how Autonomous Systems (ASs) communicate and exchange routing information. It explains the types of ASs, BGP mechanisms, and the importance of peering and transit relationships in internet connectivity. Key takeaways highlight BGP's role in managing internet traffic and its manual configuration requirements.
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/ 40

Summary: Inter-Domain Routing & BGP

1. Overview of Inter-Domain Routing

 The internet is structured into Autonomous Systems (ASs), which are networks under a
single administrative domain.

 Routing is categorized into:

o Intra-domain Routing (Interior Gateway Protocols - IGP): Used within an AS


(e.g., OSPF, RIP, EIGRP).

o Inter-domain Routing (Exterior Gateway Protocol - EGP): Used between ASs


(e.g., BGP).

2. Border Gateway Protocol (BGP)

 Primary inter-domain routing protocol that enables ASs to exchange routing


information.

 Version: BGP-4, optimized for scalability.

 Functions:

o Exchange network reachability information.

o Construct a graph of AS connectivity.

o Support Classless Inter-Domain Routing (CIDR).

o Operates as a Path Vector Protocol (tracks AS paths).

3. Autonomous Systems (AS) Types

 Stub AS: Connected to only one AS; does not provide transit services.

 Transit AS: Connects multiple ASs and allows traffic to pass through.

 Multi-homed AS: Connected to multiple ASs but does not provide transit.

4. BGP Mechanisms

 AS Numbering: Each AS is assigned a unique 16-bit or 32-bit AS number.

 Peering vs. Transit Relationships:

o Peering: ISPs exchange traffic without charge, benefiting from cost savings.

o Transit: One ISP pays another for carrying its traffic.


5. Internet Exchange Points (IXPs)

 IXPs allow multiple ISPs to interconnect and exchange traffic efficiently.

 Ghana Internet Exchange (GIX) is a local example.

6. BGP Routing Process

 BGP neighbors (peers) are manually configured.

 Two types of BGP relationships:

o eBGP (External BGP): Between different ASs.

o iBGP (Internal BGP): Between routers within the same AS.

 BGP messages:

o OPEN: Establishes connection.

o KEEPALIVE: Maintains session.

o UPDATE: Advertises new paths.

o NOTIFICATION: Reports errors.

7. BGP Path Selection

 Key Attributes:

o AS-PATH: List of ASs a route traverses.

o NEXT-HOP: Next router in the path.

 Routing decisions prioritize:

o Shortest AS path.

o Policy-based rules.

8. BGP Implementation in a Router

 BGP setup:

php-template

CopyEdit

router bgp <AS Number>

network <IP Address> mask <Subnet Mask>


neighbor <IP Address> remote-as <AS Number>

 BGP does not auto-discover neighbors; they must be manually defined.

9. Exercises and Example Questions

 The document includes exercises on how routers learn routes through different
protocols (eBGP, iBGP, OSPF, and RIP).

Key Takeaways

 BGP is essential for large-scale internet routing between different ASs.

 Peering and transit relationships affect how ISPs exchange traffic.

 Path selection in BGP is policy-driven rather than just shortest-path.

 BGP is manually configured and relies on TCP (port 179) for stability.

Slide-by-Slide Explanation of Inter-Domain Routing & BGP

Slide 1: Course Introduction

What It Says:

 Course Name: COE 475 – Computer Networking

 Instructor: Charles M. Adrah, Ph.D.

 Topic: Inter-Domain Routing & BGP

 Textbooks:

o Computer Networking: A Top-Down Approach (Kurose & Ross)

o IP Routing: Help for Network Administrators (Malhotra)

o BGP: Building Reliable Networks (Beijnum)

What It Means:

 This lecture will teach how different networks communicate across the internet.

 It will focus on BGP (Border Gateway Protocol), the primary protocol for inter-domain
routing.
 The lecture is based on well-known computer networking textbooks.

Why It Matters:

 The internet is not one giant network—it is made of thousands of independent


networks (ASs).

 BGP ensures these networks communicate properly.

 Without BGP, the internet would not function as we know it today.

Slide 2: Lecture Goals

What It Says:

This lecture will teach:

1. How Autonomous Systems (ASs) interconnect

2. Peering vs. Transit relationships

3. How BGP works & why it's necessary

4. Difference between eBGP and iBGP

5. BGP attributes that affect routing decisions

What It Means:

 The internet is built on many independent networks (ASs) that need to exchange data.

 There are two ways ASs connect:

o Peering: Two networks exchange data for free.

o Transit: One network pays another to carry its data.

 BGP controls how ASs exchange information and determines which paths data takes.

Why It Matters:

 Without a structured system like BGP, internet traffic would not be routed efficiently.

 Understanding eBGP vs. iBGP helps in network design and troubleshooting.

Slide 3: Internet Organization & Hierarchical Routing


What It Says:

 The internet is divided into Autonomous Systems (ASs).

 Routing is hierarchical:

o Intra-domain (IGP): Routing within an AS (e.g., OSPF, RIP).

o Inter-domain (EGP): Routing between ASs (e.g., BGP).

 BGP helps manage external routes while keeping internal routing simple.

What It Means:

 The internet is not one big, connected network. Instead, it’s made up of many smaller
networks (ASs).

 Inside each AS, companies use their own routing protocols (like OSPF or RIP).

 However, when ASs communicate, they need a universal protocol—that’s where BGP
comes in.

Why It Matters:

 This hierarchical approach keeps the internet manageable and scalable.

 BGP reduces complexity by ensuring that each AS only needs to know about the paths
it needs.

Slide 4: Difference Between IGP and EGP

What It Says:

 IGP (Interior Gateway Protocols):

o Used inside an AS (e.g., OSPF, RIP, EIGRP, IS-IS).

 EGP (Exterior Gateway Protocols):

o Used between ASs (e.g., BGP).

What It Means:

 Inside a network (AS), a company can use any routing protocol it likes (OSPF, RIP, etc.).

 But to connect with other networks (ASs), there must be a standardized protocol—BGP.

Why It Matters:
 Every AS has different internal rules, so BGP is necessary to allow communication
between them.

Slide 5: Problems in Inter-Domain Routing

What It Says:

 Challenges when ASs exchange routing information:

1. Different ASs use different internal routing protocols.

2. Different ASs use different routing metrics (cost, speed, security).

3. ASs don’t trust each other completely.

4. The internet routing table is huge (650,000+ routes).

What It Means:

 Each AS has its own rules for routing traffic internally.

 When ASs communicate, they must agree on a common system.

 BGP solves these problems by providing a way to share necessary routing data without
revealing too much.

Why It Matters:

 Without BGP, each AS would have to store every route in the world, which is
impossible.

Slide 6-8: Solution – Border Gateway Protocol (BGP)

What It Says:

 BGP is the main inter-domain routing protocol.

 Current version: BGP-4.

 Optimized for scalability but not for fast updates.

 Uses a Path Vector approach instead of shortest-path routing.

 Works over TCP (port 179) for reliable communication.

What It Means:
 BGP is a “Path Vector Protocol”, meaning it tracks the entire AS path that data takes.

 It is highly scalable (handles thousands of routes) but slow to adapt to changes.

Why It Matters:

 Without BGP, the internet wouldn't work.

 BGP ensures stability even if some networks go offline.

Slide 9: Autonomous System (AS) Identification

What It Says:

 Every AS has a unique AS number (ASN) assigned by organizations like:

o ARIN (North America)

o RIPE NCC (Europe)

o APNIC (Asia-Pacific)

 Types of ASs:

o Stub AS: Connects to only one AS.

o Transit AS: Connects multiple ASs and allows traffic to pass through.

o Multi-homed AS: Connects to multiple ASs but does not allow transit traffic.

What It Means:

 The AS number helps identify networks on the internet.

 Some ASs only connect to one provider (stub AS). Others provide routes to multiple
ASs (transit AS).

Why It Matters:

 Your ISP (like Vodafone Ghana) is an AS.

 Large networks buy transit from bigger ISPs to access the internet.

Summary So Far

 The internet is a network of ASs that must communicate.


 BGP allows ASs to exchange routes while maintaining independence.

 Peering and transit determine how data flows between ASs.

 Hierarchical routing makes the internet scalable and reduces complexity.

Slide-by-Slide Explanation of Inter-Domain Routing & BGP (Part 2)

Slide 10: AS Types

What It Says:

There are three main types of Autonomous Systems (ASs):

1. Stub AS

o An AS that has only one connection to another AS.

o Only carries local traffic (traffic meant for itself).

o Example: A small company connected to one ISP.

2. Transit AS

o An AS that connects multiple ASs and allows traffic to pass through.

o Example: Large ISPs like Vodafone and MTN.

3. Multi-homed AS

o Connected to multiple ASs but does not allow transit traffic.

o Example: A business that connects to two different ISPs for reliability but does
not route traffic for others.

What It Means:

 Stub AS: Think of a house that gets internet from only one ISP.

 Transit AS: Think of a highway that allows multiple cars (data) to pass through.

 Multi-homed AS: Think of a house with two internet connections but does not share
them with others.
Why It Matters:

 Most businesses are stub ASs because they only need one ISP.

 Big ISPs (like MTN) are transit ASs because they carry traffic for other networks.

 Multi-homed ASs provide better reliability in case one ISP fails.

Slide 11-12: AS Types (Detailed Examples)

What It Says:

 Examples of AS types:

o TraderMary, BrotherX, and SisterY are stub ASs because they only connect to
one ISP.

o Local and regional ISPs provide transit services to stub ASs.

o National ISPs and backbone networks provide transit services to smaller ISPs.

What It Means:

 The internet has a hierarchy of ISPs:

o Small businesses connect to local ISPs.

o Local ISPs connect to national ISPs.

o National ISPs connect to global backbone providers.

Why It Matters:

 Understanding this helps visualize how internet traffic moves across the world.

 Helps businesses decide which type of AS they should be for the best performance.

Slide 13: Stub AS Classification

What It Says:

 Stub ASs can be:

1. Singly-homed (only one connection to an ISP).

2. Multi-homed (connected to multiple ISPs).


What It Means:

 Singly-homed AS: Like a home with only one internet connection.

 Multi-homed AS: Like a business with two internet providers for backup.

Why It Matters:

 Multi-homing improves reliability. If one ISP fails, traffic can go through another ISP.

 Businesses use multi-homing to ensure their internet is always available.

Slide 14: Acquiring an AS Number

What It Says:

 Each AS running BGP is assigned a unique AS number (ASN).

 AS numbers are managed by:

o ARIN (North America)

o RIPE NCC (Europe, Middle East, Central Asia)

o APNIC (Asia-Pacific)

 Stub ASs that are singly-homed can use their ISP’s AS number.

 Private AS numbers range from 64,512 to 65,535.

What It Means:

 Every AS must have a unique identifier so that BGP can recognize it.

 Small businesses do not need their own AS number if they only connect to one ISP.

 Large companies that want control over their routing request their own AS number.

Why It Matters:

 If AS numbers were not unique, BGP would not function properly.

 Understanding AS numbering helps network engineers configure BGP correctly.

Slide 15: BGP Functions

What It Says:
 BGP helps set up routing between ASs.

 BGP is used to:

1. Connect client networks to ISPs.

2. Connect ISPs to other ISPs.

What It Means:

 BGP decides the best path for internet traffic.

 Example: When you open a website, BGP figures out the best route from your ISP to the
website’s ISP.

Why It Matters:

 Without BGP, the internet would break down because ASs wouldn’t know how to reach
each other.

 BGP is critical for businesses, ISPs, and cloud services.

Slide 16: Customer-Provider Relationship

What It Says:

 ISPs sell internet access to businesses and individuals.

 ISPs compete on price, speed, and reliability.

 They also cooperate with each other to maintain global connectivity.

 Two forms of interconnection:

1. Peering (free exchange of traffic between ISPs).

2. Transit (one ISP pays another for internet access).

What It Means:

 The internet is a business. ISPs sell access but also work together to ensure global
connectivity.

 Peering reduces costs while transit allows smaller ISPs to reach the entire internet.

Why It Matters:
 This explains why internet prices differ—some ISPs must pay transit costs while others
don’t.

 It also explains why internet speeds vary depending on ISP agreements.

Slide 17: Internet Service Providers in Ghana

What It Says:

Some ISPs in Ghana include:

 MTN, Vodafone, Glo, Airtel (large ISPs).

 Surfline, Teledata, Busy, KNET, GCNet (smaller ISPs).

What It Means:

 These ISPs provide internet services to businesses and individuals.

 Some of them peer at the Ghana Internet Exchange (GIX) to reduce costs.

Why It Matters:

 If local ISPs did not peer, internet costs would be much higher.

 Peering at GIX keeps Ghana’s internet affordable.

Slide 18: Gluing Networks Together (Internet Exchange Points - IXPs)

What It Says:

 ISPs connect at IXPs to exchange traffic directly.

 IXPs reduce dependency on upstream providers and improve efficiency.

What It Means:

 Instead of paying a third party to route traffic, ISPs exchange data directly at an IXP.

 Example: If MTN and Vodafone peer at GIX, traffic between their customers stays in
Ghana instead of traveling internationally.

Why It Matters:

 IXPs reduce internet costs and improve speeds.

 Countries with strong IXPs have better local internet performance.


Slide 19: Ghana Internet Exchange (GIX) Point

What It Says:

 Ghana Internet Exchange (GIX) is located at the Ghana-India Kofi Annan Centre of
Excellence.

 GIX allows ISPs in Ghana to exchange traffic locally instead of routing it through foreign
networks.

What It Means:

 Without GIX, local internet traffic would be expensive because it would have to go
through Europe or the U.S.

 GIX allows faster, cheaper internet for Ghana.

Why It Matters:

 Local businesses benefit from lower latency (faster connections).

 Ghana’s internet is more independent from international networ

Slide-by-Slide Explanation of Inter-Domain Routing & BGP (Part 3)

Slide 20: Peering

What It Says:

 Peering is a business relationship where ISPs agree to exchange traffic for free.

 Peering allows ISPs to directly send traffic to each other’s customers without using a
third-party transit provider.

 Example:

o WestNet and USNet have a peering relationship.

o USNet announces reachability of its customers to WestNet.

o WestNet does the same for USNet.


What It Means:

 Peering is a win-win situation where ISPs agree to exchange traffic without charging
each other.

 Instead of paying another ISP for transit, they send data directly to each other.

Why It Matters:

 Peering lowers costs for ISPs, which means cheaper internet for customers.

 It also improves speed by reducing the number of network hops.

 Many large ISPs and tech companies (Google, Facebook, Amazon) use peering to
improve their global network performance.

Slide 21: Benefits of Peering

What It Says:

 Peering gives ISPs lower operating costs because they don’t pay transit fees.

 Peering reduces delay (latency) because data is sent directly between ISPs.

 Choosing a peering partner depends on:

o Traffic volume

o Business agreements

 Some ISPs choose not to peer due to:

o Asymmetry in cost (one ISP sends more traffic than the other).

o Loss of revenue from transit (an ISP may prefer to charge for transit instead of
peering).

What It Means:

 Peering is not always free—sometimes one ISP sends more traffic than it receives,
making it unfair for the other ISP.

 Some ISPs prefer to charge for transit rather than give away free access.

Why It Matters:

 Understanding peering agreements helps explain why internet speeds and prices differ
across regions.
 Some ISPs refuse to peer with others, which can increase internet costs for customers.

Slide 22: Peering Through a Central Point

What It Says:

 Peering can happen at a central peering point (Internet Exchange Point - IXP).

 Example:

o AS 200 and AS 400 exchange traffic for free at an IXP.

o Traffic to the rest of the internet still requires transit via AS 100.

What It Means:

 Instead of setting up private connections with every ISP, companies connect to an IXP
where multiple ISPs peer together.

 This simplifies connections and reduces costs.

Why It Matters:

 Most ISPs prefer peering at IXPs rather than setting up multiple direct connections.

 IXPs make local internet faster and cheaper by keeping traffic inside a country instead
of routing it internationally.

Slide 23: Private Peering (Direct Connection)

What It Says:

 Two ISPs can set up a private peering connection instead of using an IXP.

 This is more expensive but provides better security and faster speeds.

What It Means:

 Private peering is like a private road between two companies instead of using a public
highway.

 Companies with high traffic volume prefer private peering to avoid congestion.

Why It Matters:
 Large cloud providers (Google, Amazon, Microsoft) use private peering for faster and
more reliable connections.

 Private peering costs more but improves performance.

Slide 24: Transit

What It Says:

 If two ISPs do not peer, they must use a transit provider (a larger ISP).

 Transit ISPs charge for carrying traffic.

 Example:

o AS 200 wants to send traffic to AS 400.

o Since they don’t peer, the traffic goes through AS 100 (a transit provider).

o AS 200 must pay AS 100 for transit.

What It Means:

 Transit is like a toll road—you must pay another provider to carry your traffic.

 Smaller ISPs must buy transit from larger ISPs to access the full internet.

Why It Matters:

 Internet costs depend on transit agreements—if an ISP must pay high transit fees,
customers get higher prices and lower speeds.

 Some ISPs avoid transit costs by using peering instead.

Slide 25: Why Do ISPs at the Same Level Peer?

What It Says:

 Two ISPs at the same level in the internet hierarchy often peer instead of using transit.

 Why?

o Saves money (no need to pay a transit ISP).

o Improves speed (fewer network hops).


 If ISPs do not peer, they must send traffic through a third-party provider (increasing
cost).

What It Means:

 ISPs peer to avoid paying higher transit fees.

 However, some ISPs refuse to peer if they think they can make more money from transit
fees.

Why It Matters:

 This explains why some internet routes are expensive—some ISPs force traffic through
paid transit instead of peering.

 Countries without strong peering agreements pay more for internet access.

Slide 26: Starting BGP

What It Says:

 BGP is manually configured on a router.

 Command:

bash

CopyEdit

router bgp <AS Number>

 The network administrator manually defines BGP peers.

What It Means:

 Unlike other routing protocols, BGP does not automatically discover neighbors.

 The network engineer must manually configure BGP peers for security reasons.

Why It Matters:

 BGP is more secure and flexible than automatic routing protocols.

 Incorrect BGP configurations can cause internet-wide failures (like the 2008 YouTube
hijacking incident).
Slide 27: Neighbor Discovery in BGP

What It Says:

 BGP does not automatically discover neighbors.

 The network administrator must define BGP neighbors manually using:

bash

CopyEdit

neighbor <IP Address> remote-as <AS Number>

 BGP neighbors exchange routing information over a TCP connection.

What It Means:

 BGP requires manual configuration to ensure secure and controlled routing updates.

 Only trusted routers can be added as BGP peers.

Why It Matters:

 BGP hijacking is a real security threat—if a malicious AS is added as a peer, it can steal
or reroute internet traffic.

Slide-by-Slide Explanation of Inter-Domain Routing & BGP (Part 4)

Slide 28: Two Types of BGP Neighbors

What It Says:

BGP has two types of neighbor relationships:

1. External BGP (eBGP) – When BGP routers are in different ASs.

o Used to exchange routes between ASs.

o Example: A company’s AS connects to an ISP’s AS.

2. Internal BGP (iBGP) – When BGP routers are in the same AS.

o Used to share external routes within an AS.

o Example: Large organizations with multiple routers use iBGP to share BGP routes
internally.
What It Means:

 eBGP connects different networks together (like ISPs exchanging routes).

 iBGP ensures that all routers inside an AS know the best external routes.

Why It Matters:

 Without eBGP, ASs wouldn’t be able to communicate over the internet.

 Without iBGP, routers in an AS wouldn’t share the best routes efficiently.

Slide 29: eBGP and iBGP Connections

What It Says:

 eBGP peers MUST be directly connected (BGP messages travel between physically
connected routers).

 iBGP routers can be multiple hops away, but all must share the same routing
information.

 If an AS has multiple eBGP routers, iBGP helps them maintain a consistent routing
table.

What It Means:

 eBGP routers talk directly to their neighbors in other ASs.

 iBGP routers inside an AS communicate indirectly, making sure all routers in the AS
have the same information.

Why It Matters:

 Ensures the AS has a unified routing policy.

 If iBGP is not used, routers inside an AS may not know about the best external routes.

Slide 30: Why Do We Need iBGP?

What It Says:

 If an AS has multiple eBGP routers, they must share routing information to maintain a
consistent policy.

 iBGP allows all BGP routers inside an AS to have the same external routes.
What It Means:

 Imagine an AS with three routers connected to different ISPs.

 Without iBGP, each router might have different route information, leading to
inconsistent traffic paths.

Why It Matters:

 iBGP ensures that all routers in an AS agree on the best routes.

 Without iBGP, traffic could be routed inefficiently or even lost.

Slide 31: BGP Path Advertisement

What It Says:

 BGP is a path vector protocol—it advertises paths, not just destination addresses.

 Example:

o AS3 advertises a path (AS3, X) to AS2.

o AS2 accepts the path and advertises (AS2, AS3, X) to AS1.

What It Means:

 BGP keeps track of which ASs a route has passed through.

 Routers can see the full AS path and choose the best one.

Why It Matters:

 This prevents routing loops (where traffic endlessly circulates).

 ISPs can set policies to avoid certain ASs based on the AS path.

Slide 32: BGP Messages

What It Says:

BGP exchanges four types of messages over a TCP connection:

1. OPEN – Establishes a BGP session between neighbors.

2. UPDATE – Advertises new paths and withdraws old ones.


3. KEEPALIVE – Ensures the connection is still active.

4. NOTIFICATION – Reports errors or session terminations.

What It Means:

 BGP does not send continuous updates—it only sends changes when routes are added
or removed.

 KEEPALIVE messages prevent timeouts if no updates occur.

Why It Matters:

 Reduces unnecessary traffic on the internet.

 Ensures routers stay synchronized and detect failures quickly.

Slide 33: Summary of BGP Steps

What It Says:

1. Start BGP on a router using an AS number.

2. Manually configure neighbors (BGP does not auto-discover them).

3. Routers exchange full BGP tables initially, then only incremental updates.

4. KEEPALIVE messages maintain sessions.

What It Means:

 BGP requires manual setup to ensure only trusted routers exchange routing data.

 Only updates are exchanged after the initial setup, reducing bandwidth usage.

Why It Matters:

 Improves security by preventing unauthorized routing updates.

 Prevents unnecessary traffic from flooding the internet.

Slide 34: How Does a Router Choose the Best Path?

What It Says:

BGP uses attributes to select the best path:


 AS-PATH: Prefers the shortest path (fewest ASs).

 NEXT-HOP: Checks the next-hop router.

 Local Preference: Internal AS preference for routes.

What It Means:

 BGP doesn’t just pick the fastest route—it picks the route based on policy decisions.

 ASs can set rules to prefer certain paths (e.g., avoiding expensive transit providers).

Why It Matters:

 BGP allows ISPs and businesses to control how their traffic flows.

 It’s not just about speed—it’s about cost, security, and policy.

Slide 35: Path Attributes in BGP

What It Says:

 BGP attributes influence route selection:

o AS-PATH: Shows all ASs a route has traveled.

o NEXT-HOP: Identifies the next router to reach the destination.

o Multi-Exit Discriminator (MED): Helps an AS decide which link to use when


multiple connections exist.

What It Means:

 ISPs can manipulate these attributes to control routing decisions.

 For example: An ISP might prefer a cheaper route over a faster one.

Why It Matters:

 Businesses and ISPs can influence traffic flow using BGP attributes.

 BGP allows precise control over routing policies.

Slide 36: BGP as a Path Vector Protocol

What It Says:
 BGP builds a path of ASs for each destination.

 Each router selects the best path based on BGP attributes.

What It Means:

 BGP is different from shortest-path protocols like OSPF.

 Instead of just distance, BGP considers business policies and security concerns.

Why It Matters:

 Ensures ISPs have control over how their data is routed.

 Prevents routing loops and improves stability.

Slide 37: How Routes Are Entered in the Forwarding Table

What It Says:

 When a router learns a new BGP route, it adds an entry in the forwarding table.

 The router checks:

o Destination IP prefix.

o AS-PATH and NEXT-HOP.

o Chooses the best route and updates the forwarding table.

What It Means:

 The forwarding table is how a router actually sends data to the correct destination.

 BGP ensures the best path is chosen based on policies and attributes.

Why It Matters:

 Ensures routers make efficient routing decisions.

 BGP provides flexibility in choosing the best route based on policies.

Final Summary

1. BGP is the backbone of the internet, ensuring ASs can exchange routes.

2. It uses policies, not just shortest paths, to decide how data flows.
3. Peering reduces costs, while transit provides global connectivity.

4. BGP attributes (AS-PATH, NEXT-HOP, MED) influence routing decisions.

5. BGP requires manual configuration and careful planning to ensure security and
stability.

Slide-by-Slide Explanation of Inter-Domain Routing & BGP (Part 5)

Slide 1: Course Introduction

What It Says:

 Course Name: COE 475 – Computer Networking

 Instructor: Charles M. Adrah, Ph.D.

 Topic: Inter-Domain Routing (BGP) - Part 2

 Main References:

o Computer Networking: A Top-Down Approach (Kurose & Ross)

o IP Routing: Help for Network Administrators (Malhotra)

o BGP: Building Reliable Networks (Beijnum)

What It Means:

 This lecture is a continuation of BGP topics, focusing on protocol interaction and BGP
attributes.

 The goal is to deepen understanding of how BGP operates in real-world internet routing.

Why It Matters:

 BGP is the backbone of the internet, and knowing its attributes helps network
engineers design and optimize routing.

Slide 2: Lecture Goals

What It Says:
This lecture covers:

1. Protocol interaction (how BGP communicates with other protocols).

2. BGP attributes (rules that affect route selection).

What It Means:

 Understanding how BGP interacts with other protocols like OSPF, RIP, and IGP is crucial.

 BGP attributes determine how routers select the best path for internet traffic.

Why It Matters:

 BGP must work alongside other routing protocols to ensure a smooth flow of data
across networks.

Slide 3: Originating Routes in BGP

What It Says:

 After establishing BGP neighbor relationships, routers start advertising prefixes.

 There are three ways to add routes into the BGP table:

1. Network statement: Manually add a route.

bash

CopyEdit

network IPAddress [mask A.B.C.D]

2. Redistribute static command: Advertise static routes.

3. Redistribute IGP into BGP:

bash

CopyEdit

redistribute ospf 10

 BGP routers also advertise routes they learn from their peers.

What It Means:

 BGP doesn’t automatically learn all routes; it must be told which ones to advertise.
 Redistribution allows routes from other protocols (OSPF, static routes) to be shared in
BGP.

Why It Matters:

 Ensures that BGP can communicate with other routing protocols, improving
interoperability.

Slide 4: Incremental BGP Updates

What It Says:

 The internet has around 512,000 prefixes, making full updates expensive.

 BGP only exchanges the full prefix table once when neighbors connect.

 After that, only changes (new routes or withdrawals) are announced.

 BGP maintains a table of all learned prefixes from different neighbors.

What It Means:

 Instead of repeating the same information, BGP only sends updates when needed.

 This reduces bandwidth use and improves performance.

Why It Matters:

 Efficient routing updates prevent internet congestion.

 Incremental updates allow BGP to scale globally without overwhelming routers.

Slide 5-6: Redistribution of Updates in BGP

What It Says:

 If a router receives a route from an eBGP neighbor, it forwards it to both iBGP and
eBGP peers.

 If a router receives a route from an iBGP neighbor, it only forwards it to eBGP peers,
NOT other iBGP peers.

Example:

1. Router R learns a new route from an eBGP neighbor → It sends the route to all iBGP
and eBGP neighbors.
2. Router S learns a route from an iBGP neighbor → It only sends the route to eBGP
neighbors.

What It Means:

 eBGP updates are shared widely, but iBGP updates are limited to prevent routing
loops.

Why It Matters:

 Prevents iBGP loops, ensuring BGP routing is stable and efficient.

Slide 7: Route Reflectors (RRs)

What It Says:

 Full iBGP mesh is required for a consistent BGP table.

 To reduce complexity, networks use Route Reflectors (RRs):

o The network is divided into clusters.

o Each cluster has an RR router that distributes routes.

o RR clients only talk to the RR, not every other router.

What It Means:

 Instead of connecting every router to every other router, the RR handles updates
efficiently.

Why It Matters:

 Reduces the number of BGP connections, improving scalability.

 Prevents unnecessary route flooding in large networks.

Slide 8: Confederations

What It Says:

 Confederations split a large AS into sub-ASs, reducing the number of iBGP connections.

 Each sub-AS runs iBGP internally, and eBGP runs between sub-ASs.

 Can be used with Route Reflectors for even better scaling.


What It Means:

 Instead of treating a large AS as one unit, it's divided into smaller ASs to improve
efficiency.

Why It Matters:

 Used by large ISPs to manage routing complexity.

 Improves BGP scalability in global networks.

Slide 9: Intra- vs. Inter-domain Routing

What It Says:

 Intra-domain (IGP) protocols (e.g., OSPF, RIP) use simple metrics (hop count,
bandwidth).

 Inter-domain (BGP) uses policies and attributes to choose the best route across
multiple ASs.

What It Means:

 IGP finds the best path inside an AS (e.g., shortest distance).

 BGP finds the best path across ASs based on business policies.

Why It Matters:

 BGP is not just about speed—it follows business agreements and policies.

Slide 10: BGP Attributes Overview

What It Says:

BGP attributes fall into four categories:

1. Well-Known Mandatory (must be in all BGP updates):

o AS-PATH

o NEXT-HOP

o ORIGIN

2. Well-Known Discretionary (not required in every update):


o LOCAL_PREF

o ATOMIC_AGGREGATE

3. Optional Transitive (can be passed to other ASs):

o Aggregator

o Community

4. Optional Non-Transitive (used only inside the AS):

o MED (Multi-Exit Discriminator)

What It Means:

 These attributes influence how BGP selects routes.

 Some attributes are shared globally, while others stay inside the AS.

Why It Matters:

 BGP attributes give ISPs control over traffic flow.

 Knowing these attributes helps in troubleshooting and route optimization.

🔥 To Be Continued...

So far, we’ve covered:


✅ How BGP originates and distributes routes
✅ How BGP handles updates efficiently
✅ How Route Reflectors and Confederations help scale BGP
✅ The difference between intra-domain and inter-domain routing
✅ How BGP attributes shape routing decisions

💡 Coming next:

 Deep dive into AS-PATH, NEXT-HOP, MED, LOCAL_PREF, and other key attributes.

 Explanation of BGP decision-making and real-world routing scenarios.

Would you like me to continue in this same detailed format, or do you want me to focus on
specific slides? 😊

Slide-by-Slide Explanation of Inter-Domain Routing & BGP (Part 6)


Slide 11-12: BGP Attributes Overview (Continued)

What It Says:

BGP attributes are categorized into:

1. Well-Known Attributes

o Mandatory: Must be included in all BGP route updates.

o Discretionary: May or may not be included in every update.

2. Optional Attributes

o Transitive: Can be passed between ASs.

o Non-Transitive: Only relevant inside a single AS.

Category Examples

Well-Known Mandatory AS-PATH, NEXT-HOP, ORIGIN

Well-Known Discretionary LOCAL_PREF, ATOMIC_AGGREGATE

Optional Transitive Aggregator, Community

Optional Non-Transitive MED (Multi-Exit Discriminator)

What It Means:

 Mandatory attributes are required for BGP routing to work.

 Some attributes help ISPs enforce their business policies (e.g., controlling preferred
routes).

 Transitive attributes get passed between ASs, while non-transitive attributes stay
inside an AS.

Why It Matters:

 Understanding BGP attributes helps in configuring networks properly and


troubleshooting routing issues.

Slide 13: ORIGIN Attribute (Type Code 1)

What It Says:
 The ORIGIN attribute tells how a route was introduced into BGP.

 Possible values:

o 0 (IGP): The route originated within the AS via a BGP network statement.

o 1 (EGP): The route was learned via an older Exterior Gateway Protocol (EGP).

o 2 (Incomplete): The route was redistributed from another protocol (e.g., OSPF,
static routes).

 Routes with lower ORIGIN values are preferred (IGP > EGP > Incomplete).

What It Means:

 If a route was injected directly into BGP (IGP), it’s more trusted than one learned from
another protocol.

 Incomplete origin means the real source isn’t clear, so BGP gives it lower priority.

Why It Matters:

 The ORIGIN attribute affects route selection—knowing this helps optimize network
routing.

Slide 14: AS-PATH Attribute (Type Code 2)

What It Says:

 AS-PATH lists all the AS numbers a route has traveled through.

 Each AS prepends its number before passing the route to an eBGP peer.

 The shortest AS-PATH is usually preferred.

Example:

A router in AS 100 receives:

 Route 180.10.0.0/16 from AS 300 via AS 200:

pgsql

CopyEdit

AS-PATH: 300 200 100

 Route 170.10.0.0/16 from AS 300 via AS 400:


pgsql

CopyEdit

AS-PATH: 300 400 100

👉 The router prefers the first route (shorter AS-PATH: 300 → 200 → 100).

What It Means:

 BGP avoids long AS paths, preferring shorter routes.

 Each AS can see the full route history, which improves routing decisions.

Why It Matters:

 AS-PATH helps prevent routing loops.

 It also helps ISPs set policies, like avoiding certain ASs for political or business reasons.

Slide 15: AS-PATH Loop Prevention

What It Says:

 A router will not accept a route if its own AS number is already in the AS-PATH.

 This prevents routing loops where traffic could circulate endlessly.

Example:

 AS 500 receives a route from AS 100 with AS-PATH:

pgsql

CopyEdit

AS-PATH: 500 300 200 100

 AS 500 rejects the route because its own AS number (500) is already in the path.

What It Means:

 BGP uses AS-PATH to automatically prevent loops.

 If a router sees its own AS number in a route, it knows the route has already passed
through its network and should not accept it.

Why It Matters:
 Prevents infinite routing loops, which would overload the network.

 Ensures traffic follows logical, one-way paths between ASs.

Slide 16: AS-PATH Aggregation

What It Says:

 An ISP can aggregate multiple prefixes into a single route to reduce BGP table size.

 Example:

o ISP-B aggregates two prefixes (1001 and 1002) into one: 180.180.1.0/24.

What It Means:

 Instead of advertising many small routes, ISPs can combine them into a larger block.

 This improves efficiency and speeds up routing decisions.

Why It Matters:

 Helps reduce the size of the global BGP table.

 Improves performance by reducing the number of routes routers must process.

Slide 17: NEXT-HOP Attribute (Type Code 3)

What It Says:

 NEXT-HOP is the IP address of the first router outside the AS.

 Routers prefer the lowest-cost path to the NEXT-HOP.

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

Example:

Router 1b learns that it can send traffic to destination X via router 2a or 3d.

 It picks the shortest path to the NEXT-HOP (router 2a).

What It Means:

 The NEXT-HOP isn’t always the next router—it’s the next AS gateway.
 Hot Potato Routing gets traffic out of the AS as fast as possible to minimize internal
network load.

Why It Matters:

 ISPs use NEXT-HOP and Hot Potato Routing to optimize network performance.

 Choosing the right NEXT-HOP can reduce congestion inside an AS.

Slide 18: Multi-Exit Discriminator (MED) (Type Code 4)

What It Says:

 MED influences which connection an AS prefers when multiple links exist.

 A lower MED value is preferred.

Example:

 AS 2 connects to AS 1 via two links (X → A and Y → B).

 AS 1 sets MED to prefer traffic via X → A.

What It Means:

 MED is like a "hint" to tell other ASs which path to prefer.

 It only affects inbound traffic.

Why It Matters:

 ISPs use MED to balance traffic between multiple links.

 This prevents overloading one connection while the other sits idle.

Slide 19: LOCAL_PREF (Type Code 5)

What It Says:

 LOCAL_PREF decides which outbound path is preferred.

 A higher LOCAL_PREF value is preferred.

 Unlike MED, LOCAL_PREF is shared only within an AS.

Example:
 AS 1 has two connections to AS 2.

 It sets LOCAL_PREF = 200 for one route and LOCAL_PREF = 100 for the other.

 Routers in AS 1 prefer the path with LOCAL_PREF = 200.

What It Means:

 LOCAL_PREF allows an AS to control which routes its routers use.

Why It Matters:

 Prevents suboptimal routing by ensuring all routers in an AS agree on the best path.

 ISPs use LOCAL_PREF to prioritize traffic through cheaper or faster connections.

🔥 To Be Continued...

We’ve now covered:


✅ How BGP attributes influence routing
✅ How AS-PATH prevents loops
✅ How NEXT-HOP and MED control traffic flow
✅ How ISPs use LOCAL_PREF for policy-based routing

💡 Next, we’ll dive into Aggregator, Community, BGP route selection, and policy control.

Would you like me to continue in this same detailed format, or do you want me to focus on any
specific topics? 😊

Slide-by-Slide Explanation of Inter-Domain Routing & BGP (Part 7)

Slide 20: Atomic Aggregate Attribute (Type Code 6)

What It Says:

 Atomic Aggregate is set when an AS aggregates multiple prefixes into a single route.

 This helps reduce the number of routes advertised.

 However, aggregation may cause loss of some routing information.


 If an AS propagates an aggregate prefix without listing all original AS-PATHs, it must set
the Atomic Aggregate attribute to indicate this loss.

Example:

 ISP-B receives two prefixes (11.0.0.0/8 and 11.1.0.0/16) with different AS-PATH
attributes.

 Instead of advertising both, ISP-B advertises only 11.0.0.0/8 to ISP-Europe.

 This means ISP-Europe loses details of the 11.1.0.0/16 prefix.

What It Means:

 BGP allows ISPs to simplify routing by combining multiple smaller routes into a larger
block.

 But if detailed routing information is lost, the Atomic Aggregate attribute must be set.

Why It Matters:

 Aggregation reduces the number of routes in BGP tables, making internet routing
more efficient.

 However, too much aggregation can cause routing issues, such as suboptimal paths.

Slide 21: Aggregator Attribute (Type Code 7)

What It Says:

 The Aggregator attribute identifies the AS and router that performed the route
aggregation.

 It contains:

o AS number of the aggregator.

o BGP router ID of the aggregating router.

Example:

 ISP-X aggregates prefixes from Uncle-P and Uncle-Q.

 ISP-X adds the Aggregator attribute to specify the AS number and router ID.

What It Means:

 This attribute helps track which AS performed the aggregation.


 It provides transparency in BGP route advertisements.

Why It Matters:

 Prevents confusion when troubleshooting BGP aggregation issues.

 Allows ISPs to verify where an aggregated route originated.

Slide 22-23: Community Attribute

What It Says:

 The Community attribute allows routers to tag routes into groups for special handling.

 Communities help ISPs apply routing policies efficiently.

 A router can filter or modify routes based on their Community values.

Example:

 ISP-Finland assigns Community 999 to all routes learned from its clients (SisterY).

 ISP-Finland then advertises only these Community 999 routes to other ISPs.

 This prevents other ISPs from misusing ISP-Finland as a transit AS.

What It Means:

 Instead of managing thousands of individual routes, ISPs use Community tags to group
them.

 Communities can indicate:

o Traffic priorities

o Route filtering policies

o Peering agreements

Why It Matters:

 Community tags simplify routing policies and increase efficiency.

 ISPs use them to prevent unwanted traffic and enforce custom routing rules.

Slide 24-25: BGP Route Selection Algorithm


What It Says:

BGP does not always choose the shortest path. Instead, it follows a step-by-step selection
process:

1. Choose the path with the highest Weight (Cisco only).

2. Choose the path with the highest LOCAL-PREF.

3. Prefer the path that originated from an IGP.

4. Choose the path with the shortest AS-PATH.

5. Choose the path with the lowest ORIGIN type (IGP > EGP > Incomplete).

6. Choose the path with the lowest MED value.

7. Prefer an eBGP-learned path over an iBGP-learned path.

8. Choose the path with the lowest IGP metric to the NEXT-HOP.

9. Choose the path advertised by the router with the lowest router ID.

What It Means:

 BGP does not simply choose the fastest route—it follows policies and rules.

 LOCAL_PREF and AS-PATH have a stronger impact than metrics like link speed.

Why It Matters:

 Understanding these rules helps network engineers predict and influence routing
behavior.

 ISPs manipulate attributes like LOCAL_PREF and MED to control traffic flow.

Slide 26-28: BGP Route Decision Examples

What It Says:

 BGP selects routes based on multiple attributes.

 Example (Comparing AS-PATH length):

o Route 1: AS-PATH = (65534 65212 65419)

o Route 2: AS-PATH = (65412 65112)

o BGP prefers Route 2 (shorter AS-PATH).


 Example (Comparing Next-Hop IP Address):

o Route 1: NEXT-HOP = 10.1.4.4

o Route 2: NEXT-HOP = 10.1.3.3

o BGP prefers Route 2 (lower NEXT-HOP IP).

 Example (Comparing LOCAL_PREF):

o Route 1: LOCAL_PREF = 110

o Route 2: LOCAL_PREF = 100

o BGP prefers Route 1 (higher LOCAL_PREF).

What It Means:

 BGP prefers routes with a shorter AS-PATH and higher LOCAL_PREF.

 If AS-PATHs are equal, it compares additional attributes like NEXT-HOP and


LOCAL_PREF.

Why It Matters:

 BGP decisions can be influenced by adjusting LOCAL_PREF, MED, and AS-PATH.

 Understanding this process helps in optimizing routing for performance and cost.

Slide 29: Synchronization of BGP with IGP (Black Holes)

What It Says:

 A black hole occurs when a router advertises a BGP route but does not have a valid
path in the IGP.

 The BGP synchronization rule prevents this by ensuring BGP routes are only advertised
if all routers in the AS have learned the route via IGP.

Example:

 ISP-A-3 learns a route via iBGP but ISP-A-4 has not yet learned it via IGP.

 If ISP-A-3 forwards traffic to ISP-A-4, the packets will be lost (black hole).

What It Means:

 BGP relies on IGP for internal reachability.


 Without synchronization, traffic can be dropped inside an AS.

Why It Matters:

 Disabling BGP synchronization allows faster convergence, but requires proper IGP
configuration.

 Misconfigured BGP can lead to dropped packets and routing failures.

Slide 30-31: BGP Routing Policy

What It Says:

 BGP enforces policies to control how traffic flows through ASs.

 Example (Provider-Customer Relationship):

o Customer X connects to two ISPs (A and B).

o X does not want to carry traffic between A and B.

o X uses BGP policies to prevent A from routing traffic to B through X.

What It Means:

 BGP allows ASs to reject certain paths to avoid carrying unwanted traffic.

 ISPs use this to enforce business agreements and traffic engineering.

Why It Matters:

 BGP policy enforcement ensures ISPs are not used as free transit.

 It helps control costs and optimize network performance.

Final Summary

✅ BGP attributes determine how routes are selected and advertised.


✅ ISPs use LOCAL_PREF, AS-PATH, and MED to influence routing.
✅ Black holes occur when BGP and IGP are not synchronized.
✅ BGP policies prevent ASs from being used as unwanted transit

You might also like