0% found this document useful (0 votes)
6 views

Computer Networks Week 9 (2)

Uploaded by

sanjokhan055
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Computer Networks Week 9 (2)

Uploaded by

sanjokhan055
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 64

Computer Networks

OSI Model & TCP/IP Model


Week 9
BCS 7 Fall 2021
th

Date: September 26, 28 & 29, 2022


Mahmood Khan (Assistant Professor)
Department of Computer Science SBBU
[email protected]

@ 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

top to bottom, are the Application, Presentation,


Session, Transport, Network, Data Link, and Physical
Layers.
 It is therefore often referred to as the OSI Seven Layer

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

work of Charles Bachman, then of Honeywell.


 Various aspects of OSI design evolved from

experiences with the Advanced Research Projects


Agency Network (ARPANET) and the fledgling
Internet.

@ 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

Data unit Layer Function

7. Application Network process to application

Data Data representation, encryption


Host 6. Presentation
and decryption
layers
5. Session Interhost communication
End-to-end connections and
Segments 4. Transport
reliability, Flow control
Path determination and logical
Packet 3. Network
addressing
Media
Frame 2. Data Link Physical addressing
layers
Media, signal and binary
Bit 1. Physical
transmission
@ Mahmood Khan
What Each Layer Does?

@ 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

connections between the local and remote


application.
 The session layer is responsible for dialog

control and synchronization.

@ 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..

The transport layer is responsible for the


delivery of a message from one process to
another.
@ Mahmood Khan
Reliable process-to-process delivery of a message

@ 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…

The network layer is responsible for the delivery


of individual packets from the source host to the
destination host.
@ Mahmood Khan
Source-to-destination delivery

@ 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

– Works with Network Layer to translate logical


addresses (IP) into hardware addresses (MAC) for
transmission
– Defines a single link protocol for transfer between two
nodes
@ Mahmood Khan
Data Link Layer..
 Places data and
retrieves it from the
physical layer and
provides error
detection capabilities

@ Mahmood Khan
Data link layer…

The data link layer is responsible for


moving frames from one hop (node) to the
next.
@ Mahmood Khan
Hop-to-hop delivery

@ 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…

The physical layer is responsible


for the movement of individual bits from
one hop (node) to the next.
@ Mahmood Khan
Physical Layer….
 What are the Physical Layer components on my computer?
 NIC
◦ Network Interface Card
◦ Has a unique 12 character Hexadecimal number
permanently burned into it at the manufacturer.
◦ The number is the MAC Address/Physical address of a
computer
 Cabling
◦ Twister Pair
◦ Fiber Optic
◦ Coax Cable

@ 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

Application  A- Write a 20 page letter to a foreign country.

 P- Translate the letter so the receiver can read it.


Presentation
 S- Insure the intended recipient can receive letter.
Session  T- Separate and number pages. Like registered mail, tracks
delivery and requests another package if one is “lost” or
Transport “damaged” in the mail.

 N- Postal Center sorting letters by zip code to route them closer to


Network destination.

Data-Link  D- Local Post Office determining which vehicles to deliver letters.

 P- Physical Trucks, Planes, Rail, autos, etc which carry letter


Physical between stations.
@ Mahmood Khan
Remembering the 7 Layers
7 – Application All
6 – Presentation People
5 – Session Seem
4 – Transport To
3 – Network Need
2 – Data Link Data
1 – Physical
Processing

@ 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.

Topics discussed in this section:


Physical and Data Link Layers
Network Layer
Transport Layer
Application Layer
@ Mahmood Khan
TCP/IP model development
 The late-60s The Defense Advance Research Projects
Agency (DARPA) originally developed Transmission
Control Protocol/Internet Protocol (TCP/IP) to
interconnect various defense department computer
networks.
 The Internet, an International Wide Area Network, uses
TCP/IP to connect networks across the world.

@ Mahmood Khan
4 layers of the TCP/IP model
 Layer 4: Application
 Layer 3: Transport
 Layer 2: Internet
 Layer 1: Network access

It is important to note that some of the


layers in the TCP/IP model have the
same name as layers in the OSI model.
Do not confuse the layers of the two
models.
@ Mahmood Khan
The Network Access Layer
 Concerned with all of the issues that an IP packet requires
to actually make the physical link.
 All the details in the OSI physical and data link layers.
◦ Electrical, mechanical, procedural and functional
specifications.
◦ Data rate, Distances, Physical connector.
◦ Frames, physical addressing.
◦ Synchronization, flow control, error control.
@ Mahmood Khan
The Internet Layer
 Send source packets from any network on the
internetwork and have them arrive at the destination
independent of the path and networks they took to get
there.
◦ Packets, Logical addressing.
◦ Internet Protocol (IP).
◦ Route, routing table, routing protocol.

@ 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

Application HTTP TELNET FTP SMTP SNMP

Transport TCP UDP

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

Application data message


application
layer

transport TCP TCP TCP segment


layer header data header data header data

network IP TCP packet


layer header header data

data link Ethernet IP TCP Ethernet frame


layer header header header data trailer

@ 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

Layer 7 Application All Browsers Application


FTP, Telnet,
Regular Computer
SMTP, DNS,
or A Special Common Data
Layer 6 Presentation People Computer Data SNMP, Application
Gateway. Used to Format
combine networks
using different NFS, SQL, Dialogues and
Layer 5 Session Seem communication RPC, X-Win
Application
Conversations
protocols Quality of
Layer 4 Transport To Computer Segment TCP and UDP Service, and Transport
Reliability
Segment Network Routable
Path Selection,
into Smaller Protocols.
Layer 3 Network Need Router Packet (IP, IPX,
Routing, and Internet
Broadcast Addressing
AppleTalk)
Domains
Bridge (2
Data Link Segment Network NDIS, ODI, Frames and
Ports) or Network
Layer 2 -MAC Data into Smaller Frame MAC Address, Media Access
Switch and Ether Talk Control (MAC) Access
-LLC Collision Domains
NIC
Repeater,
One Collision AND
Hub (Multi- Signals and Network
Layer 1 Physical Processing One Broadcast Bit Physical
Media
port), Access
Domain
Cabling
@ Mahmood Khan
Thanks
 FURTHER DISCUSSION

NEXT WEEK …………….

@ Mahmood Khan

You might also like