Professional Documents
Culture Documents
6 Layers Jan 16 17
6 Layers Jan 16 17
6 Layers Jan 16 17
Gaurav S. Kasbekar
Dept. of Electrical Engineering
IIT Bombay
Introduction 1-1
Reference
❑ These are a modified version of slides by
Kurose and Ross available at:
http://ctas.poly.asu.edu/millard/CET459/lectno/K%
20-%20R%20stuff/index.html
Introduction 1-2
Motivation
Networks are complex! router
workstation
❑ Lot of components server
mobile
end systems local ISP
routers
communication links
functions
reliable data transfer
routing
congestion control company
network
medium access control
Introduction 1-3
Motivation
❑ Approach to simplify design of a large and complex
system…
❑ Break it down into smaller parts
“modularity”
❑ E.g.:
Circuit Design: large circuit divided into blocks
Programming: large program divided into functions,
procedures
❑ Different parts may be designed independently
provided interfaces standardized
e.g., function return value and arguments, signals at I/O
ports of circuit blocks
❑ This is the idea used in network design
“Layering”
1-4
Analogy
❑ Two philosophers at different locations want to communicate
Location A (e.g., India)
Location B (e.g., Germany)
❑ The philosopher at
Location A: speaks only Hindi
Location B: speaks only German
❑ Each philosopher uses services of a translator to convert to/ from a
common language (English)
❑ Each translator uses services of a secretary to transmit/ receive
messages (e.g., via email, phone)
1-5
Analogy
❑ Overall task of communication between philosophers broken down into:
Philosophers: what msg to send and when, how to respond to received msgs
Translators: take msg from philosopher, pass translated msg to secretary & vice
versa
Secretaries: take msg from translator, send to secretary at other location & vice
versa
❑ Layered Architecture
Layer 3: the philosophers
Layer 2: the translators
Layer 1: the secretaries
❑ Each layer distributed across multiple locations
1-6
Layers in the Internet
Introduction 1-7
Layered Architecture
❑ Layer n provides a service to layer n+1 by:
itself performing some actions
using services provided by layer n-1
Introduction 1-8
Layered Architecture
E.g.:
❑ Network Layer provides unreliable packet
transfer between end systems A and B
(packets may be dropped, corrupted, re-
ordered)
❑ Transport Layer
uses unreliable packet transfer service of
Network Layer
itself performs some actions (e.g., error
detection, retransmissions)
to provide reliable packet transfer service to
Application Layer
Introduction 1-9
Communication in Layered Architecture
Introduction 1-11
Advantages of Layering
❑ Complex task divided into smaller,
manageable tasks at different layers
❑ Implementation of a layer can be changed/
updated without affecting other layers
provided interfaces are unchanged, e.g.,
translators may change from using English to
using French as common language
long-distance links in telephone n/w were changed
from copper cable to fiber optic without having
to change higher layers
updates in software programs at a layer
Introduction 1-13
Layers in Internet
Application
Transport
Network
Link
Physical
Introduction 1-17
Transport Layer
❑ Manages data transfer between
applications in end systems
❑ Multiple applications in an end system may
be communicating with applications in other
end systems
❑ Transport layer performs multiplexing and
demultiplexing
using unique identifier (port number) assigned
to each application process
❑ Some additional services (next slide)
❑ Transport Layer Protocols in Internet:
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP) 1-18
Transport Layer
❑ TCP
Reliable data transfer (recovery from bit
errors and packet losses, in order delivery of
packets)
Congestion Control
Flow Control
❑ UDP
minimal protocol: no reliable data transfer,
congestion control or flow control
used by real-time services
Introduction 1-19
Network Layer
❑ Transport layer at source end system
passes msg along with destination address
to network layer
❑ Network layer routes packet over network
to destination
Typically over large number of intermediate
routers
Needs to know path to destination
Introduction 1-22
Physical Layer
❑ Recall: link layer moves packets between
neighboring nodes
❑ Physical layer moves the individual bits in
packet across physical link
❑ Physical layer issues
Modulation/ demodulation
bit synchronization, timing
Introduction 1-23
source
message M application
Encapsulation
segment Ht M transport
datagram Hn Ht M network
frame Hl Hn Ht M link
physical
Hl Hn Ht M link Hl Hn Ht M
physical
switch
destination Hn Ht M network Hn Ht M
M application H l Hn Ht M link Hl Hn Ht M
Ht M transport physical
Hn Ht M network
Hl Hn H t M link router
physical
Introduction 1-24
Encapsulation
❑ When a packet passed from layer n to layer
n-1, latter appends additional information
“header”
e.g., source and destination addresses, port
numbers, checksum bits, sequence numbers
❑ Header removed when packet passed from
layer n-1 to n at peer node
Introduction 1-25
Disadvantages of Layering
❑ Duplication of functionality
E.g., error-checking often at both link and
transport layers
❑ Loss in performance
functions at different layers cannot be jointly
optimized
example on next slide
❑ “Cross-Layer Design”
Two or more layers combined
Better performance
Complicated to design, maintain
1-26
Example
❑ File transfer from end system A to B via several
intermediate routers
❑ A connected to next hop router by wireless link
prone to errors
❑ Transport layer at A adapts transmission rate to pkt
loss rate
❑ Can’t distinguish between pkt losses due to
congestion in n/w and those due to errors on
wireless link
❑ Transmission rate adaption algorithm performance
could have been improved if this info were available
1-27