Computer Networks Week 9 (2)
Computer Networks Week 9 (2)
@ Mahmood Khan
OSI
The Open System Interconnection Reference
Model (OSI Reference Model or OSI Model) is a
description for layered communications and computer
network protocol & transmission design.
It divides data movement into seven layers which, from
Model.
@ Mahmood Khan
OSI History
In 1978, the International Standards Organization
(ISO) began to develop its OSI framework
architecture.
The concept of a 7 layer model was provided by the
@ Mahmood Khan
THE OSI MODEL
• ISO is the organization.
• OSI is the model.
• The International Standards Organization (ISO
Established in 1947) is a multinational body
dedicated to worldwide agreement on international
standards.
• An ISO standard that covers all aspects of network
communications is the Open Systems Interconnection
(OSI) model.
• It was first introduced in the late 1970s.
@ Mahmood Khan
Why a layered model?
◦ Easier to teach communication process.
◦ Speeds development, changes in one layer does not
affect how the other levels works.
◦ Standardization across manufactures.
◦ Allows different hardware and software to work
together.
◦ Reduces complexity
@ Mahmood Khan
What is “THE MODEL?”
Commonly referred to as the OSI reference model.
The OSI model
◦ is a theoretical blueprint that helps us understand how
data gets from one user’s computer to another.
◦ It is also a model that helps develop standards so that
all of our hardware and software talks nicely to each
other.
◦ It aids standardization of networking technologies by
providing an organized structure for hardware and
software developers to follow, to insure there products
are compatible with current and future technologies.
@ Mahmood Khan
7 Layers OSI Model
Why use a reference model?
◦ Serves as an outline of rules for how protocols can be used
to allow communication between computers.
◦ Each layer has its own function and provides support to
other layers.
Other reference models are in use.
◦ Most well known is the TCP/IP reference model.
◦ We will compare OSI and TCP/IP models
As computing requirements increased, the network modeling
had to evolve to meet ever increasing demands of larger
networks and multiple venders.
Problems and technology advances also added to the demands
for changes in network modeling.
@ Mahmood Khan
Seven layers of the OSI model
@ Mahmood Khan
OSI Layers
OSI Model
@ Mahmood Khan
Gives end-user
applications access to
network resources
Where is it on my
computer?
◦ Workstation or
Server Service in
MS Windows
@ Mahmood Khan
Application Layer
The application layer is the OSI layer closest to the end
user, which means that both the OSI application layer and
the user interact directly with the software application.
The application layer is responsible for providing services
to the user.
Application layer functions typically include:
◦ identifying communication partners,
◦ determining resource availability,
Some examples of application layer implementations
include
◦ Hypertext Transfer Protocol (HTTP)
◦ File Transfer Protocol (FTP)
◦ Simple Mail Transfer Protocol (SMTP)
@ Mahmood Khan
Presentation Layer
The Presentation Layer establishes a context between
Application Layer entities, in which the higher-layer entities
can use different syntax and semantics, as long as the
presentation service understands both and the mapping
between them.
The presentation layer is responsible for translation,
compression, and encryption.
This layer provides independence from differences in data
representation (e.g., encryption) by translating from
application to network format, and vice versa.
This layer formats and encrypts data to be sent across a
network, providing freedom from compatibility problems.
It is sometimes called the syntax layer.
@ Mahmood Khan
Presentation Layer..
@ Mahmood Khan
Session Layer
The Session Layer controls the dialogues
(connections) between computers.
It establishes, manages and terminates the
@ Mahmood Khan
Session Layer..
Allows applications to
maintain an ongoing
session
Where is it on my
computer?
◦ Workstation and
Server Service (MS)
◦ Windows Client for
NetWare (NetWare)
@ Mahmood Khan
Transport Layer
The Transport Layer provides
transparent transfer of data between
end users, providing reliable data
transfer services to the upper layers.
The Transport Layer controls the
reliability of a given link through
flow control, segmentation/de-
segmentation, and error control.
Provides reliable data delivery
It’s the TCP in TCP/IP
Receives info from upper layers and
segments it into packets
Can provide error detection and
correction
The transport layer is responsible for
the delivery of a message from one
process to another.
@ Mahmood Khan
Transport layer..
@ Mahmood Khan
Network Layer
The Network Layer provides the functional and procedural
means of transferring data from a source to a destination
via one or more networks.
The Network Layer performs
◦ network routing functions,
Routers operate at this layer—sending data throughout the
extended network and making the Internet possible.
Network Layer
– Defines a standard method for operating between nodes
– Address scheme is defined (IP)
– Accounts for varying topologies
@ Mahmood Khan
Network Layer..
Provides network-wide
addressing and a mechanism
to move packets between
networks (routing)
Responsibilities:
◦ Network addressing
◦ Routing
Example:
◦ IP from TCP/IP
@ Mahmood Khan
Network layer…
@ Mahmood Khan
Data Link Layer
The Data Link Layer provides the functional and
procedural means to transfer data between network
entities and to detect and possibly correct errors that may
occur in the Physical Layer.
MAC Address is used at this layer.
Switches function at this layer.
Data-Link
@ Mahmood Khan
Data link layer…
@ Mahmood Khan
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 Layer)
◦ 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.
@ Mahmood Khan
Physical Layer
The Physical Layer defines the electrical and physical
specifications for devices.
Physical Layer
– Describes physical aspects of network: cards, wires, etc
– Specifies interconnect topologies and devices
In particular, it defines the relationship between a device and a
physical medium.
This includes the layout of pin, voltages, cable specification,
hubs, repeaters, network adapters, host bus adapters, and more.
The major functions and services performed by the Physical
Layer are:
◦ Establishment and termination of a connection to
a communication medium.
◦ Singles being sent and received 0’s and 1’s.
@ Mahmood Khan
Physical Layer..
Determines the specs for all
physical components
◦ Cabling
◦ Interconnect methods
(topology / devices)
◦ Data encoding (bits to
waves)
◦ Electrical properties
Examples:
◦ Ethernet (IEEE 802.3)
◦ Token Ring (IEEE 802.5)
◦ Wireless (IEEE 802.11b)
@ Mahmood Khan
Physical layer…
@ Mahmood Khan
How Does It All Work Together?
Each layer contains a Protocol Data Unit
(PDU)
◦ PDU’s are used for peer-to-peer
contact between corresponding layers.
◦ Data is handled by the top three layers,
then Segmented by the Transport layer.
◦ The Network layer places it into
packets and the Data Link frames the
packets for transmission.
◦ Physical layer converts it to bits and
sends it out over the media.
◦ The receiving computer reverses the
process using the information
contained in the PDU.
2
@ Mahmood Khan
OSI layers
@ Mahmood Khan
Data Encapsulation in OSI
@ Mahmood Khan
An exchange using the OSI model
@ Mahmood Khan
Summary of layers
@ Mahmood Khan
The Postal Analogy
How would the OSI compare to the regular Post Office
@ Mahmood Khan
TCP/IP PROTOCOL SUITE
The layers in the TCP/IP protocol suite do not exactly
match those in the OSI model. The original TCP/IP
protocol suite was defined as having four layers: host-to-
network, internet, transport, and application. However,
when TCP/IP is compared to OSI, we can say that the
TCP/IP protocol suite is made of five layers: physical,
data link, network, transport, and application.
@ Mahmood Khan
4 layers of the TCP/IP model
Layer 4: Application
Layer 3: Transport
Layer 2: Internet
Layer 1: Network access
@ Mahmood Khan
The Transport Layer
The transport layer deals with the quality-of-service issues
of reliability, flow control, and error correction.
◦ Segments, data stream, datagram.
◦ Connection oriented and connectionless.
◦ Transmission control protocol (TCP).
◦ User datagram protocol (UDP).
◦ End-to-end flow control.
◦ Error detection and recovery.
@ Mahmood Khan
TCP/IP Reference Model (cont)
3. Transport layer (layer 3)
◦ Allows end-to-end communication
◦ Connection establishment, error control, flow control
◦ Two main protocols at this level
Transmission control protocol (TCP),
Connection oriented
Connection established before sending data
Reliable
user datagram protocol (UDP)
Connectionless
Sending data without establishing connection
Fast but unreliable
@ Mahmood Khan
The Application Layer
Handles high-level protocols, issues of representation,
encoding, and dialog control.
The TCP/IP combines all application-related issues into
one layer, and assures this data is properly packaged for
the next layer.
◦ FTP, HTTP, SMNP, DNS ...
◦ Format of data, data structure, encode …
◦ Dialog control, session management …
@ Mahmood Khan
TCP/IP protocol stack
@ Mahmood Khan
TCP/IP Reference Model
Layer Protocols
Internet IP ICMP
Network Access
ETHERNET PACKET RADIO
(Host-to-network)
@ Mahmood Khan
Protocols at the Application Layer
SMTP (Simple Mail Transfer Protocol): It is used to transfer
electronic mail from one user to another. This task is done by means
of email client software (User Agents) the user is using. User Agents
help the user to type and format the email and store it until internet
is available. Message Transfer Agent uses SMTP to forward the
email to another Message Transfer Agent (Server side). While SMTP
is used by end user to only send the emails, the Servers normally use
SMTP to send as well as receive emails. SMTP uses TCP port
number 25 and 587.
FTP (File Transfer Protocol): It is the most widely used protocol
for file transfer over the network. It works on Client/Server Model
where a client requests file from Server and server sends requested
resource back to the client. It uses TCP port 20 for exchanging
controlling information and the actual data is sent over TCP port 21.
@ Mahmood Khan
Protocols at the Application Layer..
POP3 (Post Office Protocol): It is a simple mail retrieval
protocol used by User Agents (client email software) to retrieve
mails from mail server. When a client needs to retrieve mails
from server, it opens a connection with the server on TCP port
110. User can then access his mails and download them to the
local computer. POP3 works in two modes. The most common
mode the delete mode, is to delete the emails from remote
server after they are downloaded to local machines. The second
mode, the keep mode, does not delete the email from mail
server and gives the user an option to access mails later on mail
server.
@ Mahmood Khan
Protocols at the Application Layer…
HTTP (Hyper Text Transfer Protocol): It is the foundation of
World Wide Web. Hypertext is well organized documentation system
which uses hyperlinks to link the pages in the text documents. It works on
client server model. When a user wants to access any HTTP page on the
internet, the client machine at user end initiates a TCP connection to server
on port 80. When the server accepts the client request, the client is
authorized to access web pages.
To access the web pages, a client normally uses web browsers, who are
responsible for initiating, maintaining, and closing TCP connections.
HTTP is a stateless protocol, which means the Server maintains no
information about earlier requests by clients.
HTTP versions
HTTP 1.0 uses non persistent HTTP. At most one object can be sent over a
single TCP connection.
HTTP 1.1 uses persistent HTTP. In this version, multiple objects can be
sent over a single TCP connection.
@ Mahmood Khan
Protocols at the Application Layer….
DNS (Domain Name System): It works on Client Server
model. It is the hierarchical and decentralized naming system
used to identify computers reachable through the Internet or
other Internet Protocol (IP) networks. These are most
commonly used to map human-friendly domain names to the
numerical IP addresses computers need to locate services and
devices using the underlying network protocols. DNS uses
UDP port 53.
TELNET (Teletype Network Protocol): It is an application
protocol used on the Internet or local area network to provide a
bidirectional interactive text-oriented communication facility
using a virtual terminal connection. User data is
interspersed in-band with Telnet control information in an 8-
bit byte oriented data connection over the TCP.
@ Mahmood Khan
Protocols at the Application Layer…..
SNMP (Simple Network Management Protocol): It is an application
layer protocol. SNMP is a framework used for managing devices on the
internet. It provides a set of operations for monitoring and managing the
internet. The protocol designed at the application level can monitor the
devices made by different manufacturers and installed on different
physical networks. It is used in a heterogeneous network made of
different LANs and WANs connected by routers or gateways. Typically,
the SNMP protocol is implemented using the User Datagram Protocol
(UDP).
TFTP (Trivial File Transfer Protocol): It is a simple protocol that is
used for sending a file from the server to the client. Trivial File Transfer
Protocol uses the concept of UDP to share files between server and
client. Trivial File Transfer Protocol has a very simple concept, and due
to its simple concept, it has a straightforward design too. Although due to
its simple design, it has limited features when it is compared to File
Transfer Protocol.
@ Mahmood Khan
Protocols at the Transport Layer
TCP (Transmission Control Protocol)
◦ It is a standard protocol that allows the systems to communicate over
the internet.
◦ It establishes and maintains a connection between hosts.
◦ When data is sent over the TCP connection, then the TCP protocol
divides the data into smaller units known as segments. Each segment
travels over the internet using multiple routes, and they arrive in
different orders at the destination. The transmission control protocol
reorders the packets in the correct order at the receiving end.
UDP (User Datagram Protocol)
◦ User Datagram Protocol is a transport layer protocol.
◦ It is an unreliable transport protocol as in this case receiver does not
send any acknowledgment when the packet is received, the sender
does not wait for any acknowledgment. Therefore, this makes a
protocol unreliable.
@ Mahmood Khan
Protocols at the Transport Layer..
SCTP (Stream Control Transmission Protocol): It
is a transport-layer protocol that ensures reliable, in-
sequence transport of data. SCTP provides multi-
homing support where one or both endpoints of a
connection can consist of more than one IP address.
This enables transparent failover between redundant
network paths.
@ Mahmood Khan
Protocol at the Network Layer
1. IP: Internet Protocol (IPv4) contains addressing and control
information, which helps packets be routed in a network. IP works in
tandem with TCP to deliver data packets across the network. Under
IP, each host is assigned a 32-bit address comprised of two major
parts: the network number and host number. The network number
identifies a network and is assigned by the internet, while the host
number identifies a host on the network and is assigned by a network
admin. The IP is only responsible for delivering the packets, and TCP
helps puts them back in the right order.
2. Internet Protocol (IPv6)
IPv6 is the latest version of the Internet Protocol, possesses addressing
and control information for enabling packets to be routed in the
network. IPv6 was created to deal with IPv4 exhaustion. It increases the
IP address size from 32 bits to 128 bits to support more levels of
addressing. More efficient routing and packet processing compared to
IPv4. Better security compared to IPv4.
@ Mahmood Khan
Protocol at the Network Layer..
3. ICMP (Internet Control Message Protocol) is a network layer
supporting protocol used by network devices to send error messages
and operational information. ICMP messages delivered in IP packets
are used for out-of-band messages related to network operation or
misoperation. ICMP is used to announce network errors, congestion,
and timeouts, as well assist in troubleshooting.
4. IGMP (Internet Group Management Protocol) is a protocol
that allows several devices to share one IP address so they can all
receive the same data. IGMP is a network layer protocol used to set
up multicasting on networks that use the Internet Protocol version 4
(IPv4).
5. IPX (Internetwork Packet Exchange) is a networking protocol
from Novell that interconnects networks that use Novell's NetWare
clients and servers. IPX is a datagram or packet protocol.
@ Mahmood Khan
Data Formats
@ Mahmood Khan
Relationship of layers and addresses in TCP/IP
@ Mahmood Khan
Packet Encapsulation (TCP/IP)
The data is sent down the protocol stack
Each layer adds to the data by pretending headers
22Bytes20Bytes20Bytes 4Bytes
64 to 1500 Bytes
@ Mahmood Khan
TCP/IP and OSI model
@ Mahmood Khan
How the OSI and TCP/IP Models Relate in a Networking Environment?
OSI
OSI Model Equipment Words to TCP/IP
Model Pneumonic Equipment Data Protocols
Name Purpose Remember Model
Layer
@ Mahmood Khan