Computer Networks
Network Layer, Virtual Circuits
and Datagram Networks
Based on Computer Networking, 4th Edition by Kurose and Ross
Stan Kurkovsky
Network layer
transport segment from sending to
receiving host
on sending side encapsulates
segments into datagrams
on rcving side, delivers segments
to transport layer
network layer protocols in every
host, router
Router examines header fields in
all IP datagrams passing through it
application
transport
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
application
transport
network
data link
physical
Stan Kurkovsky
Key NetworkNetwork-Layer Functions
forwarding: move packets
from routers input to
appropriate router output
routing algorithm
Takes place inside a
router
analogy: process of
planning trip from source
to dest
local forwarding table
header value output link
routing: determine route
taken by packets from
value in arriving
source to dest
0100
0101
0111
1001
3
2
2
1
packets header
Takes place between
routers
0111
Routing algorithms
analogy: process of
getting through single
interchange
1
3 2
Stan Kurkovsky
Network service model
Q: What service model for channel transporting datagrams from sender to
rcvr?
Example services for individual datagrams:
Guaranteed delivery
Guaranteed delivery with less than 40 msec delay
Example services for a flow of datagrams:
In
In--order datagram delivery
Guaranteed minimum bandwidth to flow
Restrictions on changes in interinter-packet spacing
Stan Kurkovsky
Network layer service models
Network
Architecture
Internet
Service
Model
Guarantees ?
Congestion
Bandwidth Loss Order Timing feedback
best effort none
ATM
CBR
ATM
VBR
ATM
ABR
ATM
UBR
constant
rate
guaranteed
rate
guaranteed
minimum
none
no
no
no
yes
yes
yes
yes
yes
yes
no
yes
no
no (inferred
via loss)
no
congestion
no
congestion
yes
no
yes
no
no
Stan Kurkovsky
Network layer connection and connectionconnection-less service
Datagram network provides networknetwork-layer connectionless service
VC network provides networknetwork-layer connection service
Analogous to the transporttransport-layer services, but:
Service: host
host--toto-host
No choice: network provides one or the other
Implementation: in the core
VC: ATM networks
Asynchronous Transfer Mode
Stan Kurkovsky
Virtual circuits
source--tosource
to-dest path behaves much like telephone circuit
performanceperformance-wise
network actions along sourcesource-toto-dest path
call setup, teardown for each call before data can flow
each packet carries VC identifier (not destination host address)
every router on sourcesource-dest path maintains state for each passing
connection
link, router resources (bandwidth, buffers) may be allocated to VC
A VC consists of:
1. Path from source to destination
2. VC numbers, one number for each link along path
3. Entries in forwarding tables in routers along path
Packet belonging to VC carries a VC number.
VC number must be changed on each link.
New VC number comes from forwarding table
Stan Kurkovsky
Forwarding table
VC number
22
12
32
interface
number
Forwarding table in
northwest router:
Incoming interface
Incoming VC #
1
2
3
1
12
63
7
97
Outgoing interface
Outgoing VC #
3
1
2
3
22
18
17
87
Routers maintain connection state information!
Stan Kurkovsky
Virtual circuits: signaling protocols
used to setup, maintain, teardown VC
used in ATM, frameframe-relay, X.25
not used in todays Internet
application
transport 5. Data flow begins
network 4. Call connected
data link 1. Initiate call
physical
6. Receive data application
3. Accept call transport
2. incoming call network
data link
physical
Stan Kurkovsky
Datagram networks
no call setup at network layer
routers: no state about endend-toto-end connections
no networknetwork-level concept of connection
packets forwarded using destination host address
packets between same sourcesource-dest pair may take different paths
application
transport
network
data link 1. Send data
physical
application
transport
2. Receive data network
data link
physical
Stan Kurkovsky
Forwarding table
4 billion possible entries
Destination Address Range
Link Interface
11001000 00010111 00010000 00000000
through
11001000 00010111 00010111 11111111
11001000 00010111 00011000 00000000
through
11001000 00010111 00011000 11111111
11001000 00010111 00011001 00000000
through
11001000 00010111 00011111 11111111
otherwise
Stan Kurkovsky
Longest prefix matching
Prefix Match
11001000 00010111 00010
11001000 00010111 00011000
11001000 00010111 00011
otherwise
Link Interface
0
1
2
3
Examples
DA
DA:: 11001000 00010111 00010110
00010110 10100001
DA
DA:: 11001000 00010111 00011000
00011000 10101010
Stan Kurkovsky
Datagram or VC network: why?
Internet
ATM
data exchange among computers
elastic service, no strict
timing req.
smart end systems (computers)
can adapt, perform control,
error recovery
simple inside network,
complexity at edge
many link types
different characteristics
uniform service difficult
evolved from telephony
human conversation:
strict timing, reliability
requirements
need for guaranteed service
dumb end systems
telephones
complexity inside network
Stan Kurkovsky