SlideShare a Scribd company logo
Network Layer
Network layer
● transport segment from sending to receiving host
● on sending side encapsulates segments into datagrams
● on receiving side, delivers segments to transport layer
● network layer protocols in every host, router
● router examines header fields in all IP datagrams passing through it
Two Key Network Layer Functions
forwarding: move packets from router’s input to
appropriate router output
routing: determine route taken by packets from source to
dest. (routing algorithms)
Routing Algorithm
● Goal → Determine good paths (equivalently, routes),
from senders to receivers, through the network of
routers.
● “Good” path is one that has the least cost.
Abstract graph model
Graphs → Used to formulate routing problem
Nodes → routers
Edges → Physical links between routers
Cost → Physical length, link speed, cost
Abstract graph model : Cost
routing algorithm: algorithm that finds that least cost path
cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)
c(x,x’) = cost of link (x,x’) e.g., c(w,z) = 5
key question: what is the least-cost path
between u and z ?
Routing algorithm classification (1)
global:
● all routers have complete topology, link cost info
● “link state” algorithms
decentralized:
● router knows physically- connected neighbors, link costs to neighbors
● iterative process of computation, exchange of info with neighbors
● “distance vector” algorithms
Routing algorithm classification (2)
static:
● routes change slowly over time
dynamic:
● routes change more quickly
● periodic update (in response to link cost changes)
A Link-State Routing Algorithm
Dijkstra’s algorithm
● net topology, link costs known to all nodes
■ accomplished via “link state broadcast”
■ all nodes have same info
● computes least cost paths from one node (‘source”) to all other nodes
■ gives forwarding table for that node
● iterative: after k iterations, know least cost path to k dest.’s
Dijkstra’s algorithm (1)
notation:
c(x,y): link cost from node x to y; = ∞ if not direct neighbors
D(v): current value of cost of path from source to dest. v
p(v): predecessor node along path from source to v
N': set of nodes whose least cost path definitively known
Dijkstra’s algorithm (2)
1 Initialization:
2 N' = {u}
3 for all nodes v
4 if v adjacent to u
5 then D(v) = c(u,v)
6 else D(v) = ∞
7
8 Loop
9 find w not in N' such that D(w) is a minimum
10 add w to N'
11 update D(v) for all v adjacent to w and not in N' :
12 D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to w plus cost from w to v */
15 until all nodes in N'
Dijkstra’s algorithm: example
Dijkstra’s algorithm: example
Distance Vector algorithm
Bellman-Ford: example
5
u
1
2
v
2
x
3
3
1
w
1
y
5
2
z
clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3
B-F equation says:
du(z) = min { c(u,v) + dv(z),c(u,x) + dx(z),c(u,w) + dw(z) }
= min {(2 + 5), (1 + 3), (5 + 3) } = 4
node achieving minimum is next
hop in shortest path, used in forwarding table
Distance Vector algorithm
key idea:
● from time-to-time, each node sends its own distance vector estimate
to neighbors
● when x receives new DV estimate from neighbor, it updates its own DV using
B-F equation:
○ Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N
● under minor, natural conditions, the estimate Dx(y) converge to the actual
least cost dx(y)
Hierarchical routing
Scale (with 600 million destinations)
● can’t store all dest’s in routing tables!
● routing table exchange would swamp links!
Administrative autonomy
● internet = network of networks
● each network admin may want to control routing in its own network
Hierarchical routing
● aggregate routers into regions, “autonomous systems” (AS)
● routers in same AS run same routing protocol
■ “intra-AS” routing protocol
■ routers in different AS can run different intra- AS routing protocol
gateway router:
● at “edge” of its own AS
● has link to router in another AS
Interconnected ASes
● forwarding table configured by
both intra- and inter-AS routing
algorithm
■ intra-AS sets entries
for internal dests
■ inter-AS & intra-AS
sets entries for
Intra-AS Routing
● also known as interior gateway protocols (IGP)
● most common intra-AS routing protocols:
○ RIP: Routing Information Protocol
○ OSPF: Open Shortest Path First
○ IGRP: Interior Gateway Routing Protocol (Cisco
proprietary)
RIP ( Routing Information Protocol)
● included in BSD-UNIX distribution in 1982
● distance vector algorithm
○ distance metric: # hops (max = 15 hops), each link has cost 1
○ DVs exchanged with neighbors every 30 sec in response message (aka
advertisement)
○ each advertisement: list of up to 25 destination subnets (in IP addressing sense)
RIP: link failure, recovery
if no advertisement heard after 180 sec --> neighbor/ link declared dead
▪ routes via neighbor invalidated
▪ new advertisements sent to neighbors
▪ neighbors in turn send out new advertisements (if tables changed)
▪ link failure info quickly (?) propagates to entire net
▪ poison reverse used to prevent ping-pong loops (infinite distance = 16 hops)
OSPF (Open Shortest Path First)
● “open”: publicly available
● uses link state algorithm
○ LS packet dissemination
○ topology map at each node
○ route computation using Dijkstra’s algorithm
OSPF (Open Shortest Path First)
● OSPF advertisement carries one entry per neighbor
● advertisements flooded to entire AS
■ carried in OSPF messages directly over IP (rather than
TCP or UDP
● IS-IS routing protocol: nearly identical to OSPF
Internet inter-AS routing: BGP
● BGP (Border Gateway Protocol): the de facto inter-domain routing protocol
○ “glue that holds the Internet together”
● BGP provides each AS a means to:
○ eBGP: obtain subnet reachability information from neighboring ASs.
○ iBGP: propagate reachability information to all AS- internal routers.
○ determine “good” routes to other networks based on reachability information and policy.
● allows subnet to advertise its existence to rest of Internet: “I am here”
BGP route selection
● router may learn about more than 1 route to destination AS, selects
route based on:
1. local preference value attribute: policy decision
2. shortest AS-PATH
3. closest NEXT-HOP router: hot potato routing
4. additional criteria

More Related Content

PPTX
numeric network in the world of heart then ay iks jsns
PPTX
Module 3- transport_layer .pptx
PDF
Cnetwork
PPTX
Week13 lec2
PPT
Chapter 5 - Computer Networking a top-down Approach 7th
PPTX
Routing Algorithm
PDF
Lec12 on Computer Networks by Tarun Mangla.pdf
PPTX
5.2_video_slides.pptx
numeric network in the world of heart then ay iks jsns
Module 3- transport_layer .pptx
Cnetwork
Week13 lec2
Chapter 5 - Computer Networking a top-down Approach 7th
Routing Algorithm
Lec12 on Computer Networks by Tarun Mangla.pdf
5.2_video_slides.pptx

Similar to Routing_protocols and classification .pptx (20)

PDF
Lecture set 5
PPTX
Network layer. pptx
PPTX
Network layer of osi model .pptx
PDF
P5 - Routing Protocols
PPTX
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00 LT1 in Gates Buil...
PPTX
Week13 lec1
PPTX
Computer Network - Unicast Routing Distance vector Link state vector
PPT
Bellmanford
PPT
Intro 2 Computer Networks
PPT
Introduction to Computer Networks
PPTX
UNIT2-nw layer autonomy.pptx
PPTX
Week11 lec2
PDF
DCCN Network Layer congestion control TCP
PDF
IT6601 MOBILE COMPUTING
PPTX
Network Layer: Control Plane (Computer Network Course)
PPSX
OSPF - Routing Protocol
PPT
Routing.pptbbbbbbbbbbbbbbbbbbbbbnbbnbbbbnbb
PDF
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
PPT
Data Communications and Networks Network Layer
PPTX
routing in computer networks for btech.pptx
Lecture set 5
Network layer. pptx
Network layer of osi model .pptx
P5 - Routing Protocols
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00 LT1 in Gates Buil...
Week13 lec1
Computer Network - Unicast Routing Distance vector Link state vector
Bellmanford
Intro 2 Computer Networks
Introduction to Computer Networks
UNIT2-nw layer autonomy.pptx
Week11 lec2
DCCN Network Layer congestion control TCP
IT6601 MOBILE COMPUTING
Network Layer: Control Plane (Computer Network Course)
OSPF - Routing Protocol
Routing.pptbbbbbbbbbbbbbbbbbbbbbnbbnbbbbnbb
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
Data Communications and Networks Network Layer
routing in computer networks for btech.pptx
Ad

Recently uploaded (20)

PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPT
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PPT
Occupational Health and Safety Management System
PPTX
introduction to high performance computing
PDF
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
86236642-Electric-Loco-Shed.pdf jfkduklg
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
UNIT - 3 Total quality Management .pptx
PDF
Visual Aids for Exploratory Data Analysis.pdf
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Fundamentals of safety and accident prevention -final (1).pptx
III.4.1.2_The_Space_Environment.p pdffdf
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Nature of X-rays, X- Ray Equipment, Fluoroscopy
Occupational Health and Safety Management System
introduction to high performance computing
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
R24 SURVEYING LAB MANUAL for civil enggi
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Safety Seminar civil to be ensured for safe working.
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
86236642-Electric-Loco-Shed.pdf jfkduklg
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Soil Improvement Techniques Note - Rabbi
UNIT - 3 Total quality Management .pptx
Visual Aids for Exploratory Data Analysis.pdf
Ad

Routing_protocols and classification .pptx

  • 2. Network layer ● transport segment from sending to receiving host ● on sending side encapsulates segments into datagrams ● on receiving side, delivers segments to transport layer ● network layer protocols in every host, router ● router examines header fields in all IP datagrams passing through it
  • 3. Two Key Network Layer Functions forwarding: move packets from router’s input to appropriate router output routing: determine route taken by packets from source to dest. (routing algorithms)
  • 4. Routing Algorithm ● Goal → Determine good paths (equivalently, routes), from senders to receivers, through the network of routers. ● “Good” path is one that has the least cost.
  • 5. Abstract graph model Graphs → Used to formulate routing problem Nodes → routers Edges → Physical links between routers Cost → Physical length, link speed, cost
  • 6. Abstract graph model : Cost routing algorithm: algorithm that finds that least cost path cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp) c(x,x’) = cost of link (x,x’) e.g., c(w,z) = 5 key question: what is the least-cost path between u and z ?
  • 7. Routing algorithm classification (1) global: ● all routers have complete topology, link cost info ● “link state” algorithms decentralized: ● router knows physically- connected neighbors, link costs to neighbors ● iterative process of computation, exchange of info with neighbors ● “distance vector” algorithms
  • 8. Routing algorithm classification (2) static: ● routes change slowly over time dynamic: ● routes change more quickly ● periodic update (in response to link cost changes)
  • 9. A Link-State Routing Algorithm Dijkstra’s algorithm ● net topology, link costs known to all nodes ■ accomplished via “link state broadcast” ■ all nodes have same info ● computes least cost paths from one node (‘source”) to all other nodes ■ gives forwarding table for that node ● iterative: after k iterations, know least cost path to k dest.’s
  • 10. Dijkstra’s algorithm (1) notation: c(x,y): link cost from node x to y; = ∞ if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitively known
  • 11. Dijkstra’s algorithm (2) 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N'
  • 15. Bellman-Ford: example 5 u 1 2 v 2 x 3 3 1 w 1 y 5 2 z clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3 B-F equation says: du(z) = min { c(u,v) + dv(z),c(u,x) + dx(z),c(u,w) + dw(z) } = min {(2 + 5), (1 + 3), (5 + 3) } = 4 node achieving minimum is next hop in shortest path, used in forwarding table
  • 16. Distance Vector algorithm key idea: ● from time-to-time, each node sends its own distance vector estimate to neighbors ● when x receives new DV estimate from neighbor, it updates its own DV using B-F equation: ○ Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N ● under minor, natural conditions, the estimate Dx(y) converge to the actual least cost dx(y)
  • 17. Hierarchical routing Scale (with 600 million destinations) ● can’t store all dest’s in routing tables! ● routing table exchange would swamp links! Administrative autonomy ● internet = network of networks ● each network admin may want to control routing in its own network
  • 18. Hierarchical routing ● aggregate routers into regions, “autonomous systems” (AS) ● routers in same AS run same routing protocol ■ “intra-AS” routing protocol ■ routers in different AS can run different intra- AS routing protocol gateway router: ● at “edge” of its own AS ● has link to router in another AS
  • 19. Interconnected ASes ● forwarding table configured by both intra- and inter-AS routing algorithm ■ intra-AS sets entries for internal dests ■ inter-AS & intra-AS sets entries for
  • 20. Intra-AS Routing ● also known as interior gateway protocols (IGP) ● most common intra-AS routing protocols: ○ RIP: Routing Information Protocol ○ OSPF: Open Shortest Path First ○ IGRP: Interior Gateway Routing Protocol (Cisco proprietary)
  • 21. RIP ( Routing Information Protocol) ● included in BSD-UNIX distribution in 1982 ● distance vector algorithm ○ distance metric: # hops (max = 15 hops), each link has cost 1 ○ DVs exchanged with neighbors every 30 sec in response message (aka advertisement) ○ each advertisement: list of up to 25 destination subnets (in IP addressing sense)
  • 22. RIP: link failure, recovery if no advertisement heard after 180 sec --> neighbor/ link declared dead ▪ routes via neighbor invalidated ▪ new advertisements sent to neighbors ▪ neighbors in turn send out new advertisements (if tables changed) ▪ link failure info quickly (?) propagates to entire net ▪ poison reverse used to prevent ping-pong loops (infinite distance = 16 hops)
  • 23. OSPF (Open Shortest Path First) ● “open”: publicly available ● uses link state algorithm ○ LS packet dissemination ○ topology map at each node ○ route computation using Dijkstra’s algorithm
  • 24. OSPF (Open Shortest Path First) ● OSPF advertisement carries one entry per neighbor ● advertisements flooded to entire AS ■ carried in OSPF messages directly over IP (rather than TCP or UDP ● IS-IS routing protocol: nearly identical to OSPF
  • 25. Internet inter-AS routing: BGP ● BGP (Border Gateway Protocol): the de facto inter-domain routing protocol ○ “glue that holds the Internet together” ● BGP provides each AS a means to: ○ eBGP: obtain subnet reachability information from neighboring ASs. ○ iBGP: propagate reachability information to all AS- internal routers. ○ determine “good” routes to other networks based on reachability information and policy. ● allows subnet to advertise its existence to rest of Internet: “I am here”
  • 26. BGP route selection ● router may learn about more than 1 route to destination AS, selects route based on: 1. local preference value attribute: policy decision 2. shortest AS-PATH 3. closest NEXT-HOP router: hot potato routing 4. additional criteria