SlideShare a Scribd company logo
1 of 62
MODULE 3- NETWORK LAYER
CONTENT
 what’s inside a router
 IPv6
 Routing algorithms
 link state
 distance vector
 hierarchical routing
 Routing in the Internet
 RIP
 OSPF
 BGP
 Broadcast and multicast routing
ROUTER ARCHITECTURE OVERVIEW
two key router functions:
 routing algorithms/protocol
 forwarding datagrams from incoming to outgoing link
high-seed
switching
fabric
routing
processor
router input ports router output ports
forwarding data
plane (hardware)
routing, management
control plane (software)
forwarding tables computed,
pushed to input ports
line
termination
link
layer
protocol
(receive)
lookup,
forwarding
queueing
INPUT PORT FUNCTIONS
decentralized switching:
 given datagram dest., lookup output
port using forwarding table in input port
memory
 queuing: if datagrams arrive faster than
forwarding rate into switch fabric
physical layer:
bit-level reception
data link layer:
e.g., Ethernet
switch
fabric
SWITCHING FABRICS
 transfer packet from input buffer to appropriate output buffer
 switching rate: rate at which packets can be transfer from inputs to
outputs
 often measured as multiple of input/output line rate
 N inputs: switching rate N times line rate desirable
 three types of switching fabrics
memory
memory
bus crossbar
4-6
OUTPUT PORTS
 buffering required when datagrams arrive from fabric faster than
the transmission rate
 scheduling discipline chooses among queued datagrams for
transmission
line
termination
link
layer
protocol
(send)
switch
fabric
datagram
buffer
queueing
4-7
WHERE DOES QUEUING OCCUR?
 Transmission rate Rline packets per second
 N input ports and N output ports
 Switch fabric transfer rate be Rswitch (packets moved from input
port to output port)
 Rswitch is N times faster thanRline (Rswitch =N*Rline)
But what can happen at the output port?
Buffer size
B = RTT * C
B = RTT C
.
N
1. Packet scheduler (FCFS or WFQ)
2. Memory (AQM or RED algorithm)
 Weighted average is maintained (output queue)
 Avg < Minth –packet added to queue
 Avg > Maxth – packet is marked or dropped
IPV4 DATAGRAM FORMAT
IPV6 DATAGRAM FORMAT
Expanding Addressing capabilities: IP 32 to 128 bits
next header: 40- bytes fixed length of header
flow Label and priority : identify datagrams in same “flow.”
IPV4 DATAGRAM FORMAT
OTHER CHANGES FROM IPV4
 checksum: removed entirely to reduce processing time at each hop
 options: allowed, but outside of header, indicated by “Next Header”
field
 Fragmentation/Reassembly : new version of ICMP
 additional message types, e.g. “Packet Too Big”
 multicast group management functions
TRANSITION FROM IPV4 TO IPV6
1. Flag day
2. Dual stack
 Node – IPv6/IPv4 is used
1
2
3
IP destination address in
arriving packet’s header
routing algorithm
local forwarding table
dest address output link
address-range 1
address-range 2
address-range 3
address-range 4
3
2
2
1
ROUTING ALGORITHM
routing algorithm determines
end-end-path through network
forwarding table determines
local forwarding at this router
u
y
x
w
v
z
2
2
1
3
1
1
2
5
3
5
graph: G = (N,E)
N = set of routers = { u, v, w, x, y, z }
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
GRAPH ABSTRACTION
cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)
ROUTING ALGORITHM CLASSIFICATION
1. global or decentralized information?
global:
 all routers have complete information of topology, link cost information
 “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
2. static or dynamic?
static:
 routes change slowly over time
dynamic:
 routes change more quickly
 periodic update
 in response to link cost changes
3. Load sensitive or insensitive?
Load sensitive
 Reflects the current level of congestion
Load insensitive
 Does not Reflects the current level of congestion
A LINK-STATE ROUTING ALGORITHM
Dijkstra’s algorithm
 network topology, link costs known to all nodes
 accomplished via “link state broadcast”
 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
notation
 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
LINK STATE ALGORITHM FOR SOURCE NODE U
1. Initialization
2. N’ = {u}
3. For all nodes v
4. If v is a neighbor of u
5. Then D (v) = c(u,v)
6. Else D (v) =∞
7. Loop
8. Find w not in N’ such that D(w) is a minimum
9. Add w to N’
10. Update D(v) for each neighbour v of w and not in N’
11. D(v) = min (D(v), D(w) + c(w,v))
12. Until N’ = N
4-21
DIJKSTRA’S ALGORITHM: EXAMPLE
Step
0
1
2
3
4
5
N'
u
ux
uxy
uxyv
uxyvw
uxyvwz
D(v),p(v)
2,u
2,u
2,u
D(w),p(w)
5,u
4,x
3,y
3,y
D(x),p(x)
1,u
D(y),p(y)
∞
2,x
D(z),p(z)
∞
∞
4,y
4,y
4,y
u
y
x
w
v
z
2
2
1
3
1
1
2
5
3
5
DIJKSTRA’S ALGORITHM: EXAMPLE
u
y
x
w
v
z
resulting shortest-path tree from u:
v
x
y
w
z
(u,v)
(u,x)
(u,x)
(u,x)
(u,x)
destination link
resulting forwarding table in u:
iterative, asynchronous: each local iteration caused by:
 local link cost change
 DV update message from neighbor
distributed:
 each node notifies neighbors only when its DV
changes
 neighbors then notify their neighbors if necessary
DISTANCE VECTOR ALGORITHM
Network Layer 4-24
DISTANCE VECTOR ALGORITHM
Bellman-Ford equation (dynamic programming)
let
dx(y) := cost of least-cost path from x to y
then
dx(y) = min {c(x,v) + dv(y) }
v
cost to neighbor v
min taken over all neighbors v of x
cost from neighbor v to destination y
BELLMAN-FORD EXAMPLE
u
y
x
w
v
z
2
2
1
3
1
1
2
5
3
5
clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3
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
B-F equation says:
DISTANCE VECTOR ALGORITHM
 Dx(y) = estimate of least cost from x to y
 x maintains distance vector Dx = [Dx(y): y in N ]
 node x:
 knows cost to each neighbor v: c(x,v)
 maintains its neighbors’ distance vectors. For each
neighbor v, x maintains
Dv = [Dv(y): y in N ]
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
DISTANCE VECTOR ALGORITHM
1. Initialization
2. For all destination y in N
3. Dx(y)= c(x,y)
4. For each neighbor of w
5. Dw(y) = ? For all destinations y in N
6. For each neighbour w
7. Send distance vector Dx =(Dx(y): y in N) to w
8. Loop
9. Wait(until I see a link cost change to some neighbour w or until I
receive a distance vector from some neighbour w)
10. For each y in N
11. Dx(y) = minv{c(x,y)+Dv(y)}
12. If Dx(y) changed for any destination y
13. Send distance vector Dx =(Dx(y): y in N) to all neighbours
14. forever
x y z
x
y
z
0 2 7
∞∞ ∞
∞∞ ∞
from
cost to
from
from
x y z
x
y
z
0
x y z
x
y
z
∞ ∞
∞∞ ∞
cost to
x y z
x
y
z
∞∞ ∞
7 1 0
cost to
∞
2 0 1
∞ ∞ ∞
2 0 1
7 1 0
time
x z
1
2
7
y
node x
table
Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)}
= min{2+0 , 7+1} = 2
Dx(z) = min{c(x,y) +
Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
3
2
node y
table
node z
table
cost to
from
x y z
x
y
z
0 2 3
from
cost to
x y z
x
y
z
0 2 7
from
cost to
x y z
x
y
z
0 2 3
from
cost to
x y z
x
y
z
0 2 3
from
cost to
x y z
x
y
z
0 2 7
from
cost to
2 0 1
7 1 0
2 0 1
3 1 0
2 0 1
3 1 0
2 0 1
3 1 0
2 0 1
3 1 0
time
x y z
x
y
z
0 2 7
∞∞ ∞
∞∞ ∞
from
cost to
from
from
x y z
x
y
z
0
x y z
x
y
z
∞ ∞
∞∞ ∞
cost to
x y z
x
y
z
∞∞ ∞
7 1 0
cost to
∞
2 0 1
∞ ∞ ∞
2 0 1
7 1 0
time
x z
1
2
7
y
node x
table
Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)}
= min{2+0 , 7+1} = 2
Dx(z) = min{c(x,y) +
Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
3
2
node y
table
node z
table
cost to
from
COMPARISON OF LS AND DV ALGORITHMS
message complexity
 LS: with n nodes, E links,
O(nE) msgs sent
 DV: exchange between
neighbors only
 convergence time varies
speed of convergence
 LS: O(n2) algorithm requires
O(nE) msgs
 may have oscillations
 DV: convergence time varies
 may be routing loops
 count-to-infinity problem
robustness: what happens if
router malfunctions?
LS:
 node can advertise
incorrect link cost
 each node computes only
its own table
DV:
 DV node can advertise
incorrect path cost
 each node’s table used by
others
 error propagate thru network
 routers in same AS run same routing protocol
 “intra-AS” routing protocol
 routers in different AS can run different intra-AS routing protocol
HIERARCHICAL ROUTING
3b
1d
3a
1c
2a
AS3
AS1
AS2
1a
2c
2b
1b
Intra-AS
Routing
algorithm
Inter-AS
Routing
algorithm
Forwarding
table
3c
INTER-AS TASKS
 suppose router in AS1
receives datagram destined
outside of AS1:
 router should forward
packet to gateway router,
but which one?
AS1 must:
1. learn which dests are
reachable through AS2,
which through AS3
2. propagate this reachability
info to all routers in AS1
job of inter-AS routing!
AS3
AS2
3b
3c
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
EXAMPLE: CHOOSING AMONG MULTIPLE ASES
 now suppose AS1 learns from inter-AS protocol that subnet x is
reachable from AS3 and from AS2.
 to configure forwarding table, router 1d must determine which
gateway it should forward packets towards for dest x
 this is also job of inter-AS routing protocol!
AS3
AS2
3b
3c
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
x
?
EXAMPLE: CHOOSING AMONG MULTIPLE ASES
 hot potato routing: send packet towards closest of two
routers.
 Smallest router-to-gateway cost among all gateway.
 Add an entry for subnet x in forwarding table
learn from inter-AS
protocol that subnet
x is reachable via
multiple gateways
use routing info
from intra-AS
protocol to determine
costs of least-cost
paths to each
of the gateways
hot potato routing:
choose the gateway
that has the
smallest least cost
determine from
forwarding table the
interface I that leads
to least-cost gateway.
Enter (x,I) in
forwarding table
ROUTING IN THE INTERNET
 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
RIP ( ROUTING INFORMATION PROTOCOL)
 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)
D
C
B
A
u v
w
x
y
z
subnet hops
u 1
v 2
w 2
x 3
y 3
z 2
from router A to destination subnets:
RIP: EXAMPLE
destination subnet next router # hops to dest
w A 2
y B 2
z B 7
x -- 1
…. …. ....
routing table in router D
w x y
z
A
C
D B
w x y
z
A
C
D B
destination subnet next router # hops to dest
w A 2
y B 2
z B 7
x -- 1
…. …. ....
routing table in router D
A 5
dest next hops
w - 1
x - 1
z C 4
…. … ...
A-to-D advertisement
RIP: EXAMPLE
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 network
RIP TABLE PROCESSING
 RIP routing tables managed by application-level process
called route-d
 advertisements sent in UDP packets, periodically repeated
physical
link
network forwarding
(IP) table
transport
(UDP)
routed
physical
link
network
(IP)
transprt
(UDP)
routed
forwarding
table
OSPF (OPEN SHORTEST PATH FIRST)
 “open”: publicly available
 uses link state algorithm
 LS packet dissemination
 topology map at each node
 OSPF advertisement carries one entry per neighbor
 advertisements flooded to entire AS
 carried in OSPF messages directly over IP (rather than TCP or
UDP
 OSPF also checks that are operational (HELLO)
OSPF “ADVANCED” FEATURES (NOT IN RIP)
 security: all OSPF messages authenticated (to prevent malicious
intrusion) – simple authentication and MD5
 Multiple same-cost paths – allows multiple path (only one path in
RIP)
 Integrated support unicast and multicast support:
 Multicast OSPF (MOSPF) uses same topology data base as OSPF
 Hierarchical within a single routing domain- OSPF in large domains.
HIERARCHICAL OSPF
boundary router
backbone router
area 1
area 2
area 3
backbone
area
border
routers
internal
routers
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 BASICS
 when AS3 advertises a prefix to AS1:
 AS3 promises it will forward datagrams towards that prefix
 AS3 can aggregate prefixes in its advertisement
AS3
AS2
3b
3c
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
 BGP session: two BGP routers (“peers”) exchange BGP messages:
 advertising paths to different destination network prefixes (“path
vector” protocol)
 exchanged over semi-permanent TCP connections
BGP
message
BGP BASICS: DISTRIBUTING PATH INFORMATION
AS3
AS2
3b
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
 using eBGP session between 3a and 1c, AS3 sends prefix reachability
info to AS1.
 1c can then use iBGP do distribute new prefix info to all routers
in AS1
 1b can then re-advertise new reachability info to AS2 over 1b-to-
2a eBGP session
 when router learns of new prefix, it creates entry for prefix in its
forwarding table.
eBGP session
iBGP session
PATH ATTRIBUTES AND BGP ROUTES
 advertised prefix includes BGP attributes
 prefix + attributes = “route”
 two important attributes:
 AS-PATH: contains ASs through which prefix advertisement has
passed: e.g., AS 67, AS 17
 NEXT-HOP: indicates specific internal-AS router to next-hop AS.
(may be multiple links from current AS to next-hop-AS)
 gateway router receiving route advertisement uses import policy to
accept/decline
 e.g., never route through AS x
 policy-based routing
ROUTER BECOMES AWARE OF PREFIX
AS3
AS2
3b
3c
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
BGP
message
 BGP message contains “routes”
 “route” is a prefix and attributes: AS-PATH, NEXT-HOP,…
 Example: route:
 Prefix:138.16.64/22 ; AS-PATH: AS3 AS131 ; NEXT-HOP:
201.44.13.125
ROUTER MAY RECEIVE MULTIPLE ROUTES
AS3
AS2
3b
3c
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
BGP
message
 Router may receive multiple routes for same
prefix
 Has to select one route
4-51
BGP ROUTING POLICY
 A,B,C are provider networks
 X,W,Y are customer (of provider networks)
 X is dual-homed: attached to two networks
 X does not want to route from B via X to C
 .. so X will not advertise to B a route to C
A
B
C
W
X
Y
legend:
customer
network:
provider
network
BGP ROUTING POLICY (2)
 A advertises path AW to B
 B advertises path BAW to X
 Should B advertise path BAW to C?
 No way! B gets no “revenue” for routing CBAW since neither W
nor C are B’s customers
 B wants to force C to route to w via A
 B wants to route only to/from its customers!
A
B
C
W
X
Y
legend:
customer
network:
provider
network
BROADCAST ROUTING
 deliver packets from source to all other nodes
 source duplication is inefficient:
 Drawbacks
1.Inefficiency
2. Knowing the address of recipient
3. N-way unicast
 Uncontrolled flooding: when node receives broadcast packet, sends copy to all
neighbors
 problems: cycles & broadcast storm
 controlled flooding: node only broadcasts pkt if it hasn’t broadcast same packet
before
 2 ways to avoid broadcast storm:
i. Sequence-number-controlled flooding: node keeps track of packet ids
already broadacsted
ii. or reverse path forwarding (RPF): only forward packet if it arrived on
shortest path between node and source
4-55
SPANNING TREE
 first construct a spanning tree
 nodes then forward/make copies only along spanning tree
4-56
CENTER-BASED TREES
 single delivery tree shared by all
 one router identified as “center” of tree
 to join:
 edge router sends unicast join-msg addressed to center router
 join-msg “processed” by intermediate routers and forwarded
towards center
 join-msg either hits existing tree branch for this center, or
arrives at center
 path taken by join-msg becomes new branch of tree for this
router
APPROACHES FOR BUILDING MCAST TREES
approaches:
 central-based tree: one tree per source
 shortest path trees
 reverse path forwarding
MULTICAST
 Application includes bulk data transfer, streaming continuous
media, shared data application, interactive gaming
 Problems:
1.how to identity the receivers of a multicast packet and
2.how to address a packet sent to receivers
 Solution: multicast packet address using address indirection
INTERNET GROUP MANAGEMENT PROTOCOL
 3 types of message
1. Message_query- send message router to all host
2. Message_report-used by host to respond to the query
3. leave_group-exiting a gruop
MULTICAST ROUTING ALGORITHM
 2 approaches adopted for multicast routing algorithm
1. Group-shared tree(centre based approach)
2. Source-based tree (RPF based)
 Solution to the problem of receiving unwanted multicast packets
under RPF is known as Pruning

More Related Content

Similar to Module 3- transport_layer .pptx

4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdfmrcopyxerox
 
DCCN Network Layer congestion control TCP
DCCN Network Layer congestion control TCPDCCN Network Layer congestion control TCP
DCCN Network Layer congestion control TCPSreedhar Chowdam
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing ProtocolsKABILESH RAMAR
 
Route1
Route1Route1
Route1Saeed
 
Wireless routing protocols
Wireless routing protocolsWireless routing protocols
Wireless routing protocolsbarodia_1437
 
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOLPERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOLIRJET Journal
 
Comparative Analysis of Distance Vector Routing & Link State Protocols
Comparative Analysis of Distance Vector Routing & Link State ProtocolsComparative Analysis of Distance Vector Routing & Link State Protocols
Comparative Analysis of Distance Vector Routing & Link State ProtocolsEast West University
 
IRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET Journal
 
Computer networking presentation
Computer networking presentationComputer networking presentation
Computer networking presentationMd. Touhidur Rahman
 
module10-rip (1).ppt
module10-rip (1).pptmodule10-rip (1).ppt
module10-rip (1).pptRakesh Dhiman
 
Comparison of different MANET routing protocols in wireless ADHOC
Comparison of different MANET routing protocols in wireless ADHOCComparison of different MANET routing protocols in wireless ADHOC
Comparison of different MANET routing protocols in wireless ADHOCAmitoj Kaur
 
CS6003 AD HOC AND SENSOR NETWORKS
CS6003 AD HOC AND SENSOR NETWORKSCS6003 AD HOC AND SENSOR NETWORKS
CS6003 AD HOC AND SENSOR NETWORKSKathirvel Ayyaswamy
 

Similar to Module 3- transport_layer .pptx (20)

4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
 
5.2_video_slides.pptx
5.2_video_slides.pptx5.2_video_slides.pptx
5.2_video_slides.pptx
 
IT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTINGIT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTING
 
DCCN Network Layer congestion control TCP
DCCN Network Layer congestion control TCPDCCN Network Layer congestion control TCP
DCCN Network Layer congestion control TCP
 
Routing
RoutingRouting
Routing
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
 
Route1
Route1Route1
Route1
 
P5 - Routing Protocols
P5 - Routing ProtocolsP5 - Routing Protocols
P5 - Routing Protocols
 
Week11 lec2
Week11 lec2Week11 lec2
Week11 lec2
 
Week13 lec1
Week13 lec1Week13 lec1
Week13 lec1
 
Wireless routing protocols
Wireless routing protocolsWireless routing protocols
Wireless routing protocols
 
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOLPERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
 
Comparative Analysis of Distance Vector Routing & Link State Protocols
Comparative Analysis of Distance Vector Routing & Link State ProtocolsComparative Analysis of Distance Vector Routing & Link State Protocols
Comparative Analysis of Distance Vector Routing & Link State Protocols
 
IRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing Algorithms
 
Computer networking presentation
Computer networking presentationComputer networking presentation
Computer networking presentation
 
module10-rip (1).ppt
module10-rip (1).pptmodule10-rip (1).ppt
module10-rip (1).ppt
 
DSR,LSR,IGMP,RIP,OSPF.ppt
DSR,LSR,IGMP,RIP,OSPF.pptDSR,LSR,IGMP,RIP,OSPF.ppt
DSR,LSR,IGMP,RIP,OSPF.ppt
 
Comparison of different MANET routing protocols in wireless ADHOC
Comparison of different MANET routing protocols in wireless ADHOCComparison of different MANET routing protocols in wireless ADHOC
Comparison of different MANET routing protocols in wireless ADHOC
 
Notes
NotesNotes
Notes
 
CS6003 AD HOC AND SENSOR NETWORKS
CS6003 AD HOC AND SENSOR NETWORKSCS6003 AD HOC AND SENSOR NETWORKS
CS6003 AD HOC AND SENSOR NETWORKS
 

Recently uploaded

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 

Recently uploaded (20)

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 

Module 3- transport_layer .pptx

  • 2. CONTENT  what’s inside a router  IPv6  Routing algorithms  link state  distance vector  hierarchical routing  Routing in the Internet  RIP  OSPF  BGP  Broadcast and multicast routing
  • 3. ROUTER ARCHITECTURE OVERVIEW two key router functions:  routing algorithms/protocol  forwarding datagrams from incoming to outgoing link high-seed switching fabric routing processor router input ports router output ports forwarding data plane (hardware) routing, management control plane (software) forwarding tables computed, pushed to input ports
  • 4. line termination link layer protocol (receive) lookup, forwarding queueing INPUT PORT FUNCTIONS decentralized switching:  given datagram dest., lookup output port using forwarding table in input port memory  queuing: if datagrams arrive faster than forwarding rate into switch fabric physical layer: bit-level reception data link layer: e.g., Ethernet switch fabric
  • 5. SWITCHING FABRICS  transfer packet from input buffer to appropriate output buffer  switching rate: rate at which packets can be transfer from inputs to outputs  often measured as multiple of input/output line rate  N inputs: switching rate N times line rate desirable  three types of switching fabrics memory memory bus crossbar
  • 6. 4-6 OUTPUT PORTS  buffering required when datagrams arrive from fabric faster than the transmission rate  scheduling discipline chooses among queued datagrams for transmission line termination link layer protocol (send) switch fabric datagram buffer queueing
  • 7. 4-7 WHERE DOES QUEUING OCCUR?  Transmission rate Rline packets per second  N input ports and N output ports  Switch fabric transfer rate be Rswitch (packets moved from input port to output port)  Rswitch is N times faster thanRline (Rswitch =N*Rline) But what can happen at the output port? Buffer size B = RTT * C B = RTT C . N
  • 8. 1. Packet scheduler (FCFS or WFQ) 2. Memory (AQM or RED algorithm)  Weighted average is maintained (output queue)  Avg < Minth –packet added to queue  Avg > Maxth – packet is marked or dropped
  • 10. IPV6 DATAGRAM FORMAT Expanding Addressing capabilities: IP 32 to 128 bits next header: 40- bytes fixed length of header flow Label and priority : identify datagrams in same “flow.”
  • 12. OTHER CHANGES FROM IPV4  checksum: removed entirely to reduce processing time at each hop  options: allowed, but outside of header, indicated by “Next Header” field  Fragmentation/Reassembly : new version of ICMP  additional message types, e.g. “Packet Too Big”  multicast group management functions
  • 13. TRANSITION FROM IPV4 TO IPV6 1. Flag day 2. Dual stack  Node – IPv6/IPv4 is used
  • 14.
  • 15. 1 2 3 IP destination address in arriving packet’s header routing algorithm local forwarding table dest address output link address-range 1 address-range 2 address-range 3 address-range 4 3 2 2 1 ROUTING ALGORITHM routing algorithm determines end-end-path through network forwarding table determines local forwarding at this router
  • 16. u y x w v z 2 2 1 3 1 1 2 5 3 5 graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) } GRAPH ABSTRACTION cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)
  • 17. ROUTING ALGORITHM CLASSIFICATION 1. global or decentralized information? global:  all routers have complete information of topology, link cost information  “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
  • 18. 2. static or dynamic? static:  routes change slowly over time dynamic:  routes change more quickly  periodic update  in response to link cost changes 3. Load sensitive or insensitive? Load sensitive  Reflects the current level of congestion Load insensitive  Does not Reflects the current level of congestion
  • 19. A LINK-STATE ROUTING ALGORITHM Dijkstra’s algorithm  network topology, link costs known to all nodes  accomplished via “link state broadcast”  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 notation  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
  • 20. LINK STATE ALGORITHM FOR SOURCE NODE U 1. Initialization 2. N’ = {u} 3. For all nodes v 4. If v is a neighbor of u 5. Then D (v) = c(u,v) 6. Else D (v) =∞ 7. Loop 8. Find w not in N’ such that D(w) is a minimum 9. Add w to N’ 10. Update D(v) for each neighbour v of w and not in N’ 11. D(v) = min (D(v), D(w) + c(w,v)) 12. Until N’ = N
  • 22. DIJKSTRA’S ALGORITHM: EXAMPLE u y x w v z resulting shortest-path tree from u: v x y w z (u,v) (u,x) (u,x) (u,x) (u,x) destination link resulting forwarding table in u:
  • 23. iterative, asynchronous: each local iteration caused by:  local link cost change  DV update message from neighbor distributed:  each node notifies neighbors only when its DV changes  neighbors then notify their neighbors if necessary DISTANCE VECTOR ALGORITHM
  • 24. Network Layer 4-24 DISTANCE VECTOR ALGORITHM Bellman-Ford equation (dynamic programming) let dx(y) := cost of least-cost path from x to y then dx(y) = min {c(x,v) + dv(y) } v cost to neighbor v min taken over all neighbors v of x cost from neighbor v to destination y
  • 25. BELLMAN-FORD EXAMPLE u y x w v z 2 2 1 3 1 1 2 5 3 5 clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3 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 B-F equation says:
  • 26. DISTANCE VECTOR ALGORITHM  Dx(y) = estimate of least cost from x to y  x maintains distance vector Dx = [Dx(y): y in N ]  node x:  knows cost to each neighbor v: c(x,v)  maintains its neighbors’ distance vectors. For each neighbor v, x maintains Dv = [Dv(y): y in N ]
  • 27. 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 DISTANCE VECTOR ALGORITHM
  • 28. 1. Initialization 2. For all destination y in N 3. Dx(y)= c(x,y) 4. For each neighbor of w 5. Dw(y) = ? For all destinations y in N 6. For each neighbour w 7. Send distance vector Dx =(Dx(y): y in N) to w 8. Loop 9. Wait(until I see a link cost change to some neighbour w or until I receive a distance vector from some neighbour w) 10. For each y in N 11. Dx(y) = minv{c(x,y)+Dv(y)} 12. If Dx(y) changed for any destination y 13. Send distance vector Dx =(Dx(y): y in N) to all neighbours 14. forever
  • 29. x y z x y z 0 2 7 ∞∞ ∞ ∞∞ ∞ from cost to from from x y z x y z 0 x y z x y z ∞ ∞ ∞∞ ∞ cost to x y z x y z ∞∞ ∞ 7 1 0 cost to ∞ 2 0 1 ∞ ∞ ∞ 2 0 1 7 1 0 time x z 1 2 7 y node x table Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3 3 2 node y table node z table cost to from
  • 30. x y z x y z 0 2 3 from cost to x y z x y z 0 2 7 from cost to x y z x y z 0 2 3 from cost to x y z x y z 0 2 3 from cost to x y z x y z 0 2 7 from cost to 2 0 1 7 1 0 2 0 1 3 1 0 2 0 1 3 1 0 2 0 1 3 1 0 2 0 1 3 1 0 time x y z x y z 0 2 7 ∞∞ ∞ ∞∞ ∞ from cost to from from x y z x y z 0 x y z x y z ∞ ∞ ∞∞ ∞ cost to x y z x y z ∞∞ ∞ 7 1 0 cost to ∞ 2 0 1 ∞ ∞ ∞ 2 0 1 7 1 0 time x z 1 2 7 y node x table Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3 3 2 node y table node z table cost to from
  • 31. COMPARISON OF LS AND DV ALGORITHMS message complexity  LS: with n nodes, E links, O(nE) msgs sent  DV: exchange between neighbors only  convergence time varies speed of convergence  LS: O(n2) algorithm requires O(nE) msgs  may have oscillations  DV: convergence time varies  may be routing loops  count-to-infinity problem robustness: what happens if router malfunctions? LS:  node can advertise incorrect link cost  each node computes only its own table DV:  DV node can advertise incorrect path cost  each node’s table used by others  error propagate thru network
  • 32.  routers in same AS run same routing protocol  “intra-AS” routing protocol  routers in different AS can run different intra-AS routing protocol HIERARCHICAL ROUTING 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b Intra-AS Routing algorithm Inter-AS Routing algorithm Forwarding table 3c
  • 33. INTER-AS TASKS  suppose router in AS1 receives datagram destined outside of AS1:  router should forward packet to gateway router, but which one? AS1 must: 1. learn which dests are reachable through AS2, which through AS3 2. propagate this reachability info to all routers in AS1 job of inter-AS routing! AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks
  • 34. EXAMPLE: CHOOSING AMONG MULTIPLE ASES  now suppose AS1 learns from inter-AS protocol that subnet x is reachable from AS3 and from AS2.  to configure forwarding table, router 1d must determine which gateway it should forward packets towards for dest x  this is also job of inter-AS routing protocol! AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks x ?
  • 35. EXAMPLE: CHOOSING AMONG MULTIPLE ASES  hot potato routing: send packet towards closest of two routers.  Smallest router-to-gateway cost among all gateway.  Add an entry for subnet x in forwarding table learn from inter-AS protocol that subnet x is reachable via multiple gateways use routing info from intra-AS protocol to determine costs of least-cost paths to each of the gateways hot potato routing: choose the gateway that has the smallest least cost determine from forwarding table the interface I that leads to least-cost gateway. Enter (x,I) in forwarding table
  • 36. ROUTING IN THE INTERNET  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
  • 37. RIP ( ROUTING INFORMATION PROTOCOL)  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) D C B A u v w x y z subnet hops u 1 v 2 w 2 x 3 y 3 z 2 from router A to destination subnets:
  • 38. RIP: EXAMPLE destination subnet next router # hops to dest w A 2 y B 2 z B 7 x -- 1 …. …. .... routing table in router D w x y z A C D B
  • 39. w x y z A C D B destination subnet next router # hops to dest w A 2 y B 2 z B 7 x -- 1 …. …. .... routing table in router D A 5 dest next hops w - 1 x - 1 z C 4 …. … ... A-to-D advertisement RIP: EXAMPLE
  • 40. 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 network
  • 41. RIP TABLE PROCESSING  RIP routing tables managed by application-level process called route-d  advertisements sent in UDP packets, periodically repeated physical link network forwarding (IP) table transport (UDP) routed physical link network (IP) transprt (UDP) routed forwarding table
  • 42. OSPF (OPEN SHORTEST PATH FIRST)  “open”: publicly available  uses link state algorithm  LS packet dissemination  topology map at each node  OSPF advertisement carries one entry per neighbor  advertisements flooded to entire AS  carried in OSPF messages directly over IP (rather than TCP or UDP  OSPF also checks that are operational (HELLO)
  • 43. OSPF “ADVANCED” FEATURES (NOT IN RIP)  security: all OSPF messages authenticated (to prevent malicious intrusion) – simple authentication and MD5  Multiple same-cost paths – allows multiple path (only one path in RIP)  Integrated support unicast and multicast support:  Multicast OSPF (MOSPF) uses same topology data base as OSPF  Hierarchical within a single routing domain- OSPF in large domains.
  • 44. HIERARCHICAL OSPF boundary router backbone router area 1 area 2 area 3 backbone area border routers internal routers
  • 45. 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”
  • 46. BGP BASICS  when AS3 advertises a prefix to AS1:  AS3 promises it will forward datagrams towards that prefix  AS3 can aggregate prefixes in its advertisement AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks  BGP session: two BGP routers (“peers”) exchange BGP messages:  advertising paths to different destination network prefixes (“path vector” protocol)  exchanged over semi-permanent TCP connections BGP message
  • 47. BGP BASICS: DISTRIBUTING PATH INFORMATION AS3 AS2 3b 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks  using eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1.  1c can then use iBGP do distribute new prefix info to all routers in AS1  1b can then re-advertise new reachability info to AS2 over 1b-to- 2a eBGP session  when router learns of new prefix, it creates entry for prefix in its forwarding table. eBGP session iBGP session
  • 48. PATH ATTRIBUTES AND BGP ROUTES  advertised prefix includes BGP attributes  prefix + attributes = “route”  two important attributes:  AS-PATH: contains ASs through which prefix advertisement has passed: e.g., AS 67, AS 17  NEXT-HOP: indicates specific internal-AS router to next-hop AS. (may be multiple links from current AS to next-hop-AS)  gateway router receiving route advertisement uses import policy to accept/decline  e.g., never route through AS x  policy-based routing
  • 49. ROUTER BECOMES AWARE OF PREFIX AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks BGP message  BGP message contains “routes”  “route” is a prefix and attributes: AS-PATH, NEXT-HOP,…  Example: route:  Prefix:138.16.64/22 ; AS-PATH: AS3 AS131 ; NEXT-HOP: 201.44.13.125
  • 50. ROUTER MAY RECEIVE MULTIPLE ROUTES AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks BGP message  Router may receive multiple routes for same prefix  Has to select one route
  • 51. 4-51 BGP ROUTING POLICY  A,B,C are provider networks  X,W,Y are customer (of provider networks)  X is dual-homed: attached to two networks  X does not want to route from B via X to C  .. so X will not advertise to B a route to C A B C W X Y legend: customer network: provider network
  • 52. BGP ROUTING POLICY (2)  A advertises path AW to B  B advertises path BAW to X  Should B advertise path BAW to C?  No way! B gets no “revenue” for routing CBAW since neither W nor C are B’s customers  B wants to force C to route to w via A  B wants to route only to/from its customers! A B C W X Y legend: customer network: provider network
  • 53. BROADCAST ROUTING  deliver packets from source to all other nodes  source duplication is inefficient:  Drawbacks 1.Inefficiency 2. Knowing the address of recipient 3. N-way unicast
  • 54.  Uncontrolled flooding: when node receives broadcast packet, sends copy to all neighbors  problems: cycles & broadcast storm  controlled flooding: node only broadcasts pkt if it hasn’t broadcast same packet before  2 ways to avoid broadcast storm: i. Sequence-number-controlled flooding: node keeps track of packet ids already broadacsted ii. or reverse path forwarding (RPF): only forward packet if it arrived on shortest path between node and source
  • 55. 4-55 SPANNING TREE  first construct a spanning tree  nodes then forward/make copies only along spanning tree
  • 56. 4-56 CENTER-BASED TREES  single delivery tree shared by all  one router identified as “center” of tree  to join:  edge router sends unicast join-msg addressed to center router  join-msg “processed” by intermediate routers and forwarded towards center  join-msg either hits existing tree branch for this center, or arrives at center  path taken by join-msg becomes new branch of tree for this router
  • 57. APPROACHES FOR BUILDING MCAST TREES approaches:  central-based tree: one tree per source  shortest path trees  reverse path forwarding
  • 58. MULTICAST  Application includes bulk data transfer, streaming continuous media, shared data application, interactive gaming  Problems: 1.how to identity the receivers of a multicast packet and 2.how to address a packet sent to receivers  Solution: multicast packet address using address indirection
  • 59.
  • 60. INTERNET GROUP MANAGEMENT PROTOCOL  3 types of message 1. Message_query- send message router to all host 2. Message_report-used by host to respond to the query 3. leave_group-exiting a gruop
  • 61. MULTICAST ROUTING ALGORITHM  2 approaches adopted for multicast routing algorithm 1. Group-shared tree(centre based approach) 2. Source-based tree (RPF based)
  • 62.  Solution to the problem of receiving unwanted multicast packets under RPF is known as Pruning