Handouts
Handouts
Network Layer
4-1
network layer
chapter goals:
understand principles behind network
layer services:
network layer service models
forwarding versus routing
how a router works
routing (path selection)
broadcast, multicast
instantiation, implementation in the
Internet
on receiving side,
physical physical
ne twork
data link
transport layer
network transport
data link network network
network physical data link data link
network layer data link
physical
physical physical
protocols in every
host, router
router examines
header fields in all IP Network Layer 4-4
Two key network-layer
functions
forwarding: move analogy:
packets from
routing: process of
router’s input to
appropriate router planning trip from
output source to dest
routing: determine forwarding: process of
route taken by getting through single
packets from source interchange
to dest.
routing algorithms
value in arriving
packet’s header
0111 1
3 2
architectures:
ATM, frame relay, X.25
before datagrams flow, two end hosts and
intervening routers establish virtual connection
routers get involved
network vs transport layer connection service:
network: between two hosts (may also involve
intervening routers in case of VCs)
transport: between two processes
layer
connection service
analogous to TCP/UDP connecton-
oriented / connectionless transport-layer
services, but:
service: host-to-host
no choice: network provides one or the
other
implementation: in network core
Network Layer 4-9
Virtual
circuits
“source-to-dest path behaves much like
telephone circuit”
performance-wise
network actions along source-to-dest path
VC
used in ATM, frame-relay, X.25
not used in today’s Internet
application application
5. data flow 6. receive
transport transport
begins data
network network
4. call 3. accept call
data link data link
connected 2. incoming
physical physical
1. initiate call call
outgoing link
forwarding tables computed, routing
pushed to input ports routing, management
processor
control plane (software)
forwarding data
plane (hardware)
high-seed
switching
fabric
memory
link layer
physical layer
…
level frame in: one large datagram
different link types, out: 3 smaller datagrams
different MTUs
large IP datagram
divided reassembly
(“fragmented”) within
net
one datagram …
becomes several
datagrams
“reassembled” only
at final destination
IP header bits used Network Layer 4-21
Chapter 4:
1.
outline
introduction 5. routing algorithms
2. virtual circuit and link state
datagram networks distance vector
hierarchical routing
3. what’s inside a
router 6. routing in the
RIP
Internet
4. IP: Internet OSPF
Protocol BGP
datagram format
4.7 broadcast and
IPv4 addressing
multicast routing
ICMP
IPv6
DHCP offer
src: 223.1.2.5, 67
Broadcast: I’m a DHCP
dest: 255.255.255.255, 68
server! Here’s an IP
yiaddrr: 223.1.2.4
transaction ID: 654
address you can use
lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
Broadcast: OK. 223.1.2.4
yiaddrr: I’ll take that
IP address!
transaction ID: 655
lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255, 68
Broadcast: OK. You’ve
yiaddrr: 223.1.2.4
got
that IP transaction
address!ID: 655
lifetime: 3600 secs
data
32 bits
Network Layer 4-29
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
ICMPv6: new version of ICMP
additional message types, e.g. “Packet Too Big”
multicast group management functions
note 5
4
7
construct shortest path tree
s: tracing predecessor 8
by
nodes 3 w y z
u
ties can exist (can be 2
broken arbitrarily) 3
7 4
v
Network Layer 4-36
Dijkstra’s algorithm: another
example
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,
3 uxyv 3,y 4,y
y
4 uxyvw 4,y
5 uxyvwz
5
v 3 w
2 5
u 2 1 z
3
1 2
x 1
y
let
dx(y) := cost of least-cost path from x to y then
dx(y) = mv in {c(x,v) + dv(y) }