6 Layers Jan 16 17

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Layered Architecture

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

❑ Lot of networking regional ISP

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

❑ E.g.: Translators provide service of


delivering msgs sent by one philosopher to
the other in an understandable language
 themselves perform translation
 use service of secretaries to actually transmit
msgs via phone, email, etc.

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

1) Peer-to-peer communication, e.g., among


 the translators at the two locations
 the network layer entities at different nodes

2) Interfaces between adjacent layers at


the same location, e.g.,
 Philosopher passes the msg to be sent to
translator
 Secretary passes msg received from other
secretary to translator
 APIs/ set of commands in machines

❑ Peer-to-peer communication accomplished


via lower layers
Introduction 1-10
Information Hiding
❑ Layer n can access the services provided
by layer n-1 using only the service
interface
 does not need to know how layer n-1 implements
the service
 views layer n-1 as a black box

❑ More generally, a layer does not need to


know implementation details of any other
layer to perform its own function

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

❑ Once interfaces are standardized, different


teams/ companies can develop hardware/
software for different layers 1-12
Layers in Internet

Introduction 1-13
Layers in Internet

Application

Transport

Network

Link

Physical

• Application and transport layers only in end systems


• Lower three layers in end systems as well as routers 1-14
Layers in Internet
❑ Application: network applications,
associated protocols
 HTTP, FTP, SMTP Application
❑ Transport: data transfer between
apps in end systems Transport
 TCP, UDP
❑ Network: routing of packets from Network
source to destination end system
 routing protocols, IP Link
❑ Link: packet transfer between
Physical
neighboring end systems/ routers
 PPP, Ethernet
❑ Physical: bit transfer on physical
link 1-15
Application Layer
❑ Network applications and associated
protocols reside here
❑ Example 1: Web
 Web browser (e.g., Firefox, Chrome, Internet
Explorer, Microsoft Edge)
 Web server (e.g., Apache, Microsoft server)
 HyperText Transfer Protocol (HTTP): protocol
for web document request and transfer
❑ Example 2: Email
 Mail readers (e.g., Gmail, Webmail)
 Mail servers (where user mailboxes are stored)
 Simple Mail Transfer Protocol (SMTP)
Introduction 1-16
Application Layer
❑ Example 3: File Transfer
 File Transfer Protocol (FTP)
 File sharing/ download programs (e.g., ftp in
Linux, WinSCP)
❑ Example 4: Internet telephony
 User programs (e.g., Skype, Google Meet,
Microsoft Teams)
 Various possible protocols, e.g., Real-Time
Transport Protocol (RTP), Skype protocol

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

❑ Network layer periodically computes paths


 using routing algorithms
❑ Internet Protocol (IP)
 network layer protocol in internet
Introduction 1-20
Link Layer
❑ Recall: network layer routes packets over
multiple hops from source end system to
destination end system
❑ To move a packet from a node A to next
node B in path
 Network layer at A passes packet to link layer
at A
 Link layer at A sends packet to link layer at B
 Link layer at B passes packet to network layer
at B
❑ Examples: PPP, Ethernet, Wi-Fi
Introduction 1-21
Link Layer
❑ Recovery from bit errors in physical link
❑ If physical link is a shared medium
 Medium Access Control (MAC)
 “MAC Sublayer”

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

❑ Physical layer provides “bit pipe”


 unaware of where packets start and end

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

You might also like