You are on page 1of 54

Layered Architecture

1
PROTOCOL

• A protocol is a set of rules that governs how


two or more communicating entities in a layer
are to interact
• Messages that can be sent and received
• Actions that are to be taken when a certain
event occurs, e.g. sending or receiving
messages, expiry of timers
• The purpose of a protocol is to provide a
service to the layer above
2
LAYERS

• A set of related communication functions that can be


managed and grouped together
• Application Layer: communications functions that are
used by application programs
– HTTP, DNS, SMTP (email)
• Transport Layer: end-to-end communications between
two processes in two machines
– TCP, User Datagram Protocol (UDP)
• Network Layer: node-to-node communications between
two machines
– Internet Protocol (IP)

3
WHY LAYERING

• Layering simplifies design, implementation, and testing by


partitioning overall communications process into parts
• Protocol in each layer can be designed separately from those
in other layers
• Layering provides flexibility for modifying and evolving
protocols and services without having to change layers below
• Speeds development, changes in one layer does not affect
how the other levels works.
• Easier to teach communication process.
• Standardization across manufacturers.
• Allows different hardware and software to work together.

4
TASKS INVOLVED IN SENDING A LETTER

5
Open Systems Interconnection
• Network architecture:
– Definition of all the layers
– Design of protocols for every layer
• By the 1970s every computer vendor had developed its
own proprietary layered network architecture
• Problem: computers from different vendors could not be
networked together
• Open Systems Interconnection (OSI) was an international
effort by the International Organization for
Standardization (ISO) to enable multivendor computer
interconnection
6
OSI Reference Model
• Describes a seven-layer abstract reference model for a
network architecture
• Purpose of the reference model was to provide a
framework for the development of protocols
• OSI also provided a unified view of layers, protocols, and
services which is still in use in the development of new
protocols
• Detailed standards were developed for each layer, but
most of these are not in use
• TCP/IP protocols preempted deployment of OSI protocols

7
7-Layer OSI Reference Model

8
OSI reference model—seven layers
• All applications are built on the top of the seven
layers, specifically, on the top of the application layer.
• The top 4 layers are end-to-end and involves the
interaction of peer entities across the network,
however, the bottom 3 layers are point-to-point and
involve the interaction of peer entities across a single
hop.

9
OSI Model

Physical Layer
• Provides physical interface for transmission of information.
• Defines rules by which bits are passed from one system to another on a physical
communication medium.
• Covers all - mechanical, electrical, functional and procedural - aspects for physical
communication.
• Such characteristics as voltage levels, timing of voltage changes, physical data rates,
maximum transmission distances, physical connectors, and other similar attributes are
defined by physical layer specifications.
• Converts bits into electronic signals for outgoing messages
• Converts electronic signals into bits for incoming messages
• This layer manages the interface between the computer and the network medium (coax,
twisted pair, etc.)
• This layer tells the driver software for the MAU (media attachment unit, ex. network
interface cards (NICs, modems, etc.)) what needs to be sent across the medium
• The bottom layer of the OSI model

10
OSI Model

Data Link Layer


• Data link layer attempts to provide reliable communication over the
physical layer interface.
• Breaks the outgoing data into frames and reassemble the received
frames.
• Supports points-to-point as well as broadcast communication.
• Supports simplex, half-duplex or full-duplex communication.
• Transfers frames across direct connections
• Groups bits into frames
• Detection of bit errors; Retransmission of frames
• Activation, maintenance, & deactivation of data link connections
• Medium access control for local area networks
• Flow control

11
Sub-layers of the Data Link Layer
• MAC (Media Access Control)
– Gives data to the NIC
– Controls access to the media through:
• CSMA/CD Carrier Sense Multiple Access/Collision
Detection
• Token passing
• LLC (Logical Link Control)
– Manages the data link interface (or Service Access Points (SAPs))
– Can detect some transmission errors using a Cyclic Redundancy
Check (CRC). If the packet is bad the LLC will request the sender to
resend that particular packet.
OSI Model

Network Layer
• Implements routing of frames (packets) through the network.

• Defines the most optimum path the packet should take from the
source to the destination
• Defines logical addressing so that any endpoint can be identified.
• Handles congestion in the network.
• Facilitates interconnection between heterogeneous networks
(Internetworking).
• The network layer also defines how to fragment a packet into
smaller packets to accommodate different media.

13
Transport Layer
• Purpose of this layer is to provide a reliable mechanism for
the exchange of data between two processes in different
computers.
• Ensures that the data units are delivered error free.
• Ensures that data units are delivered in sequence.
• Ensures that there is no loss or duplication of data units.
• Provides connectionless or connection oriented service.
• Provides for the connection management.
• Multiplex multiple connection over a single channel.

14
Session Layer
• Session layer provides mechanism for controlling the dialogue
between the two end systems. It defines how to start, control and
end conversations (called sessions) between applications.
• This layer requests for a logical connection to be established on
an end-user’s request.
• Any necessary log-on or password validation is also handled by
this layer.
• Session layer is also responsible for terminating the connection.
• This layer provides services like dialogue discipline which can be
full duplex or half duplex.
• Session layer can also provide check-pointing mechanism such
that if a failure of some sort occurs between checkpoints, all data
can be retransmitted from the last checkpoint.
15
OSI Model

Presentation Layer
• Presentation layer defines the format in which the data is to
be exchanged between the two communicating entities.
• Also handles data compression and data encryption
(cryptography).

16
OSI Model

Application Layer
• Application layer interacts with application programs and is
the highest level of OSI model.
• Application layer contains management functions to
support distributed applications.
• Examples of application layer are applications such as file
transfer, electronic mail, remote login etc.

17
7 Application OSI REFERENCE MODEL SUMMARY

6 Presentation 1. Physical Layer


a) Convert the logical 1’s and 0’s coming from
layer 2 into electrical signals.
5 Session
b) Transmission of the electrical signals over a
communication channel.
4 Transport
Main topics:
3 Network • Transmission mediums
• Encoding
2 Data Link • Modulation
• RS232 and RS422 standards
• Repeaters
1 Physical • Hubs (multi-port repeater)

18
7 Application OSI REFERENCE MODEL SUMMARY

6 Presentation 2. Data Link Layer


a) Error control to compensate for the
imperfections of the physical layer.
5 Session
b) Flow control to keep a fast sender from
swamping a slow receiver.
4 Transport
Main topics:
3 Network • Framing methods
• Error detection and correction methods
2 Data Link • Flow control
• Frame format
• IEEE LAN standards
1 Physical • Bridges
• Switches (multi-port bridges)

19
7 Application OSI REFERENCE MODEL SUMMARY

6 Presentation 3. Network Layer


a) Controls the operation of the subnet.
5 Session b) Routing packets from source to destination.
c) Logical addressing.
4 Transport
Main topics:

3 Network • Internetworking
• Routing algorithms
• Internet Protocol (IP) addressing
2 Data Link • Routers

1 Physical

20
7 Application OSI REFERENCE MODEL SUMMARY

6 Presentation 4. Transport Layer


a) Provides additional Quality of Service.
5 Session b) Heart of the OSI model.

Main topics:
4 Transport
• Connection-oriented and connectionless services
• Transmission Control Protocol (TCP)
3 Network • User Datagram Protocol (UDP)

2 Data Link

1 Physical

21
7 Application OSI REFERENCE MODEL SUMMARY

6 Presentation 5. Session Layer


a) Allows users on different machines to establish
sessions between them.
5 Session
b) One of the services is managing dialogue
control.
4 Transport
c) Token management.

3 Network d) Synchronization.

2 Data Link

1 Physical

22
7 Application OSI REFERENCE MODEL SUMMARY

6 Presentation 6. Presentation Layer


a) Concerned with the syntax and semantics of the
information.
5 Session
b) Preserves the meaning of the information.
4 Transport c) Data compression.
d) Data encryption.
3 Network

2 Data Link

1 Physical

23
7 Application OSI REFERENCE MODEL SUMMARY

6 Presentation 7. Application Layer


a) Provides protocols that are commonly needed.
5 Session
Main topics:
• File Transfer Protocol (FTP)
4 Transport
• HyperText Transfer Protocol (HTTP)
• Simple Mail Transfer Protocol (SMTP)
3 Network • Simple Network Management Protocol (SNMP)
• Network File System (NFS)
• Telnet
2 Data Link

1 Physical

24
OSI MODEL IN A NUT SHELL

25
OSI Model

OSI MODEL IN ACTION

• A message begins at the top application


layer and moves down the OSI layers to
the bottom physical layer.
• As the message descends, each
successive OSI model layer adds a
header to it.
• A header is layer-specific information
that basically explains what functions
the layer carried out.
• Conversely, at the receiving end,
headers are striped from the message
as it travels up the corresponding
layers.

26
An exchange using the OSI model

27
A private internet

28
Communication at the physical layer

Legend Source Destination


A R1 R3 R4 B
Physical Physical
layer layer
Link 1 Link 3 Link 5 Link 6

011 ... 101


01
1.
..
10
1

011 ... 101 011 ... 101

29
The unit of communication at the physical
layer is a bit.

30
Communication at the data link layer

Legend Source Destination D Data H Header


A R1 R3 R4 B
Data link Data link

Physical Physical
Link 1 Link 3 Link 5 Link 6

D2 H2
Frame
D2 ame
Fr

H2

D2 H2 D2 H2
Frame Frame

31
The unit of communication at the data link
layer is a frame.

32
Communication at the network layer

Legend Source Destination D Data H Header


A R1 R3 R4 B
Network Network

Data link Data link

Physical Physical

D3 H3
Datagram

D3 H3
Datagram

33
The unit of communication at the network
layer is a datagram.

34
Communication at transport layer

A Legend Source Destination D Data H Header B


Transport Transport
R1 R3 R4
Network Network

Data link Data link

Physical Physical

D4 H4
Segment

D4 H4
Segment

35
The unit of communication at the transport
layer is a segment, user datagram, or a
packet, depending on the specific protocol
used in this layer.

36
Communication at application layer

A B
Application Legend Source Destination D Data H Header Application

Transport Transport
R1 R3 R4
Network Network

Data link Data link

Physical Physical

D5 D5
Message

D5 D5
Message
37
The unit of communication at the
application layer is a message.

38
TCP/IP Protocol Suite
• Most widely used interoperable network protocol
architecture
• Specified and extensively used before OSI
– OSI was slow to take place in the market
• Funded by the US Defense Advanced Research
Project Agency (DARPA) for its packet switched
network (ARPANET)
– DoD automatically created an enormous market for
TCP/IP
• Used by the Internet and WWW
39
TCP/IP Protocol Suite
• TCP/IP does not have an official layer structure
• But protocols imply one
– Application layer
– Transport (host to host) layer
– Internet layer
– Network access layer
– Physical layer

• Actually TCP/IP reference model has been built on its protocols


– That is why that reference model is only for TCP/IP protocol suite
– and this is why it is not so important to assign roles to each layer in
TCP/IP; understanding TCP, IP and the application protocols would be
enough

40
OSI vs. TCP/IP

HTTP, SMTP, …

TCP, UDP

IP

41
Network Access and Physical Layers
• TCP/IP reference model does not discuss these
layers too much
– the node should connect to the network with a
protocol such that it can send IP packets
– this protocol is not defined by TCP/IP
– mostly in hardware
– a well known example is Ethernet

42
Internet Layer
• Connectionless, point to point internetworking
protocol (uses the datagram approach)
– takes care of routing across multiple networks
– each packet travels in the network independently of
each other
• they may not arrive (if there is a problem in the network)
• they may arrive out of order
– a design decision enforced by DoD to make the system
more flexible and responsive to loss of some subnet
devices
• Implemented in end systems and routers as the
Internet Protocol (IP)

43
Transport Layer
• End-to-end data transfer
• Transmission Control Protocol (TCP)
– connection oriented
– reliable delivery of data
– ordering of delivery
• User Datagram Protocol (UDP)
– connectionless service
– delivery is not guaranteed
• Can you give example applications that use TCP
and UDP?

44
Application Layer
• Support for user applications
• A separate module for each different
application
– e.g. HTTP, SMTP, telnet

45
IP (Internet Protocol)
• The core of the TCP/IP protocol suite
• Two versions co-exist
– v4 – the widely used IP protocol
– v6 – has been standardized in 1996, but still not widely deployed
• IP (v4) header minimum 20 octets (160 bits)

46
IPv6
• IPv6
– Enhancements over IPv4 for modern high speed
networks
– Support for multimedia data streams
• But the driving force behind v6 was to increase
address space
– 128-bit as compared to 32-bit of v4
• Not backward compatible
– all equipment and software must change
– that is why it will take some more time to migrate into
IPv6

47
TCP
• Transmission Control Protocol
– end to end protocol
– Reliable connection = provides flow and error control
• In TCP terms, a connection is a
temporary association between entities in different
systems
• TCP PDU
– Called “TCP segment”
– Includes source and destination port
• Identify respective users (applications)
• pair of ports (together with the IP addresses) uniquely identify
a connection; such an identification is necessary in order TCP
to track segments between entities.
48
TCP Header

49
UDP
• User Datagram Protocol
• Alternative to TCP
– end-to-end protocol
• Not guaranteed delivery
• No preservation of sequence
• No protection against duplication
• Minimum overhead

50
PDUs in TCP/IP

Dest. Port
Sequence number
Checksum
….

Dest. Address
Source address
….

Dest. Network Address


Priority info
51
Some Protocols in TCP/IP Suite

52
Sending a packet from Argon to Neon

argon.tcpip-lab.edu neon.tcpip-lab.edu
"Argon" "Neon"
128.143.137.144 128.143.71.21

router137.tcpip-lab.edu router71.tcpip-lab.edu
"Router137" "Router71"
128.143.137.1 128.143.71.1

Router

Ethernet Network Ethernet Network

53
Sending a packet from
128.143.71.21 Argon
is not to
on my local Neon
network.
Therefore, I need to send the packet to my
128.143.71.21
default gateway withisaddress
on my local network.
128.143.137.1
DNS:
DNS:
ARP:What
The is
WhatIPisthe
address
theIPMAC
address
of Therefore, I can send the packet directly.
of“neon.tcpip-lab.edu”
“neon.tcpip-lab.edu”?
address
ARP: TheofMAC is of
128.143.137.1?
address
128.143.71.21
128.143.137.1 is 00:e0:f9:23:a8:20
ARP: What is the MAC
ARP: TheofMAC
address address of
128.143.71.21?
argon.tcpip-lab.edu
"Argon"
128.143.137.1 is neon.tcpip-lab.edu
00:20:af:03:98:28
"Neon"
128.143.137.144 128.143.71.21

router137.tcpip-lab.edu router71.tcpip-lab.edu
"Router137" "Router71"
128.143.137.1 128.143.71.1

Router

frame frame

Ethernet Network Ethernet Network

54

You might also like