Net 5
Net 5
The internet is structured into Autonomous Systems (ASs), which are networks under a
single administrative domain.
Functions:
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
o Peering: ISPs exchange traffic without charge, benefiting from cost savings.
BGP messages:
Key Attributes:
o Shortest AS path.
o Policy-based rules.
BGP setup:
php-template
CopyEdit
The document includes exercises on how routers learn routes through different
protocols (eBGP, iBGP, OSPF, and RIP).
Key Takeaways
BGP is manually configured and relies on TCP (port 179) for stability.
What It Says:
Textbooks:
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:
What It Says:
What It Means:
The internet is built on many independent networks (ASs) that need to exchange 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.
Routing is hierarchical:
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:
BGP reduces complexity by ensuring that each AS only needs to know about the paths
it needs.
What It Says:
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.
What It Says:
What It Means:
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.
What It Says:
What It Means:
BGP is a “Path Vector Protocol”, meaning it tracks the entire AS path that data takes.
Why It Matters:
What It Says:
o APNIC (Asia-Pacific)
Types of ASs:
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:
Some ASs only connect to one provider (stub AS). Others provide routes to multiple
ASs (transit AS).
Why It Matters:
Large networks buy transit from bigger ISPs to access the internet.
Summary So Far
What It Says:
1. Stub AS
2. Transit AS
3. Multi-homed AS
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.
What It Says:
Examples of AS types:
o TraderMary, BrotherX, and SisterY are stub ASs because they only connect to
one ISP.
o National ISPs and backbone networks provide transit services to smaller ISPs.
What It Means:
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.
What It Says:
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.
What It Says:
o APNIC (Asia-Pacific)
Stub ASs that are singly-homed can use their ISP’s AS number.
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:
What It Says:
BGP helps set up routing between ASs.
What It Means:
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.
What It Says:
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.
What It Says:
What It Means:
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.
What It Says:
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:
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.
Why It Matters:
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:
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.
Many large ISPs and tech companies (Google, Facebook, Amazon) use peering to
improve their global network performance.
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.
o Traffic volume
o Business agreements
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.
What It Says:
Peering can happen at a central peering point (Internet Exchange Point - IXP).
Example:
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.
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.
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.
What It Says:
If two ISPs do not peer, they must use a transit provider (a larger ISP).
Example:
o Since they don’t peer, the traffic goes through AS 100 (a transit provider).
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.
What It Says:
Two ISPs at the same level in the internet hierarchy often peer instead of using transit.
Why?
What It Means:
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.
What It Says:
Command:
bash
CopyEdit
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:
Incorrect BGP configurations can cause internet-wide failures (like the 2008 YouTube
hijacking incident).
Slide 27: Neighbor Discovery in BGP
What It Says:
bash
CopyEdit
What It Means:
BGP requires manual configuration to ensure secure and controlled routing updates.
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.
What It Says:
2. Internal BGP (iBGP) – When BGP routers are in the same AS.
o Example: Large organizations with multiple routers use iBGP to share BGP routes
internally.
What It Means:
iBGP ensures that all routers inside an AS know the best external routes.
Why It Matters:
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:
iBGP routers inside an AS communicate indirectly, making sure all routers in the AS
have the same information.
Why It Matters:
If iBGP is not used, routers inside an AS may not know about the best external routes.
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:
Without iBGP, each router might have different route information, leading to
inconsistent traffic paths.
Why It Matters:
What It Says:
BGP is a path vector protocol—it advertises paths, not just destination addresses.
Example:
What It Means:
Routers can see the full AS path and choose the best one.
Why It Matters:
ISPs can set policies to avoid certain ASs based on the AS path.
What It Says:
What It Means:
BGP does not send continuous updates—it only sends changes when routes are added
or removed.
Why It Matters:
What It Says:
3. Routers exchange full BGP tables initially, then only incremental updates.
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:
What It Says:
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.
What It Says:
What It Means:
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.
What It Says:
BGP builds a path of ASs for each destination.
What It Means:
Instead of just distance, BGP considers business policies and security concerns.
Why It Matters:
What It Says:
When a router learns a new BGP route, it adds an entry in the forwarding table.
o Destination IP prefix.
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:
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.
5. BGP requires manual configuration and careful planning to ensure security and
stability.
What It Says:
Main References:
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.
What It Says:
This lecture covers:
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.
What It Says:
There are three ways to add routes into the BGP table:
bash
CopyEdit
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.
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.
What It Means:
Instead of repeating the same information, BGP only sends updates when needed.
Why It Matters:
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:
What It Says:
What It Means:
Instead of connecting every router to every other router, the RR handles updates
efficiently.
Why It Matters:
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.
Instead of treating a large AS as one unit, it's divided into smaller ASs to improve
efficiency.
Why It Matters:
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:
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.
What It Says:
o AS-PATH
o NEXT-HOP
o ORIGIN
o ATOMIC_AGGREGATE
o Aggregator
o Community
What It Means:
Some attributes are shared globally, while others stay inside the AS.
Why It Matters:
🔥 To Be Continued...
💡 Coming next:
Deep dive into AS-PATH, NEXT-HOP, MED, LOCAL_PREF, and other key attributes.
Would you like me to continue in this same detailed format, or do you want me to focus on
specific slides? 😊
What It Says:
1. Well-Known Attributes
2. Optional Attributes
Category Examples
What It Means:
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:
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.
What It Says:
Each AS prepends its number before passing the route to an eBGP peer.
Example:
pgsql
CopyEdit
CopyEdit
👉 The router prefers the first route (shorter AS-PATH: 300 → 200 → 100).
What It Means:
Each AS can see the full route history, which improves routing decisions.
Why It Matters:
It also helps ISPs set policies, like avoiding certain ASs for political or business reasons.
What It Says:
A router will not accept a route if its own AS number is already in the AS-PATH.
Example:
pgsql
CopyEdit
AS 500 rejects the route because its own AS number (500) is already in the path.
What It Means:
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.
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.
Why It Matters:
What It Says:
Example:
Router 1b learns that it can send traffic to destination X via router 2a or 3d.
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.
What It Says:
Example:
What It Means:
Why It Matters:
This prevents overloading one connection while the other sits idle.
What It Says:
Example:
AS 1 has two connections to AS 2.
It sets LOCAL_PREF = 200 for one route and LOCAL_PREF = 100 for the other.
What It Means:
Why It Matters:
Prevents suboptimal routing by ensuring all routers in an AS agree on the best path.
🔥 To Be Continued...
💡 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? 😊
What It Says:
Atomic Aggregate is set when an AS aggregates multiple prefixes into a single route.
Example:
ISP-B receives two prefixes (11.0.0.0/8 and 11.1.0.0/16) with different AS-PATH
attributes.
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.
What It Says:
The Aggregator attribute identifies the AS and router that performed the route
aggregation.
It contains:
Example:
ISP-X adds the Aggregator attribute to specify the AS number and router ID.
What It Means:
Why It Matters:
What It Says:
The Community attribute allows routers to tag routes into groups for special handling.
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.
What It Means:
Instead of managing thousands of individual routes, ISPs use Community tags to group
them.
o Traffic priorities
o Peering agreements
Why It Matters:
ISPs use them to prevent unwanted traffic and enforce custom routing rules.
BGP does not always choose the shortest path. Instead, it follows a step-by-step selection
process:
5. Choose the path with the lowest ORIGIN type (IGP > EGP > Incomplete).
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.
What It Says:
What It Means:
Why It Matters:
Understanding this process helps in optimizing routing for performance and cost.
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:
Why It Matters:
Disabling BGP synchronization allows faster convergence, but requires proper IGP
configuration.
What It Says:
What It Means:
BGP allows ASs to reject certain paths to avoid carrying unwanted traffic.
Why It Matters:
BGP policy enforcement ensures ISPs are not used as free transit.
Final Summary