LESSON 5 OSI MODEL and TCPIP MODEL
LESSON 5 OSI MODEL and TCPIP MODEL
The OSI model has seven layers. Number of layers in any model is derived on following
principles.
3. The function of each layer should be chosen with an eye towards defining internationally
standardized protocol
4. The layer boundaries should be chosen to minimize the information flow across the
interface.
5. The number of layers should be large enough that distinct function need not be thrown
together in the same layer out of necessity, and small enough that the architecture does
not become unwieldy
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 1
Advantages of Layered Network Architecture
A new layer can be introduced any time (if required) without interfering other layers.
Increases the address overhead in data packet as it travels from bottom layer to the
top layer.
7 Application Layer
6 Presentation Layer
5 Session Layer
4 Transport Layer
3 Network Layer
1 Physical Layer
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 2
1. Layer 1, 2 and 3 i.e. physical, data link, and network are network support layers.
2. Layer 4, Transport layer provides end to end reliable data transmission.
3. Layer 5, 6 and 7 i.e. Session, Presentation, and Application layer are user support
layers.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 3
It is important to note that OSI model is just a model. It is not a protocol that can be installed or
run on any system.
OSI MODEL
To remember the names of seven layers in order one cornmon mnemonic used is -"All People
Seem to Need Data Processing".
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 4
Layer 7 – Application Layer
The application layer serves as the window for users and application processes to access
network services. The application layer makes the interface between the program that is
sending or is receiving data and the protocol stack. When you download or send emails, your
e-mail program contacts this layer. This layer provides network services to the end-users like
Mail, ftp, telnet, DNS.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 5
software emulation of a terminal at the remote host. The user's computer talks to the software
terminal which, in turn, talks to the host and vice-versa. The remote host believes it is
communicating with one of its own terminals and allows the user to log on.
File transfer, access and management (FTAM): This application allows a user to access a file
in a remote host to make changes or to read data, to retrieve files from remote computer for use
in local computer, and to manage or control files in a remote computer locally.
Mail services: This application provides various e-mail services such as email forwarding and
storage.
Directory services: This application provides the distributed database sources and access for
global information about various objects and services.
Protocols used at application layer are FTP, DNS, SNMP, SMTP, FINGER, and TELNET.
Presentation Layer is also called Translation layer. The presentation layer presents the data
into a uniform format and masks the difference of data format between two dissimilar
systems. The presentation layer formats the data to be presented to the application layer. It
can be viewed as the translator for the network. This layer may translate data from a format
used by the application layer into a common format at the sending station, and then translate
the common format to a format known to the application layer at the receiving station.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 6
Functions of Presentation Layer:
Session layer has the primary responsibility of beginning, maintaining and ending the
communication between two devices, which is called Session. It also provides for orderly
communication between devices by regulating the flow of data.
The session protocol defines the format of the data sent over the connections. Session layer
establish and manages the session between the two users at different ends in a network.
Session layer also manages who can transfer the data in a certain amount of time and for how
long.
The examples of session layers and the interactive logins and file transfer sessions. Session
layer reconnect the session if it disconnects. It also reports and logs and upper layer errors.
The session layer allows session establishment between processes running on different
stations. The dialogue control and token management are responsibility of session layer.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 7
Functions of Session Layer:
When a device is contacted first, the session layer is responsible for determining which
device participating in the communication will transmit at a given time as well as
controlling the amount of data that can be sent in a transmission. This is called dialog
control.
The types of dialog control that can take place include simplex, half duplex and full duplex.
Dialog separation or Synchronization: The session layer is also responsible for adding
checkpoint or markers within the message. This process of inserting markers to the stream
of data is known as dialog separation.
Protocols: The protocols that work on the session layer are NetBIOS, Mail Slots, Names Pipes,
and RPC.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 8
Layer 4 – Transport Layer
Transport layer manages end to end (source to destination) (process to process) message delivery
in a network and also provides the error checking and hence guarantees that no duplication or
errors are occurring in the data transfers across the network. It makes sure that all the packets of
a message arrive intact and in order.
Transport layer also provides the acknowledgement of the successful data transmission and
retransmits the data if error is found. The transport layer ensures that messages are delivered
error-free, in sequence, and with no losses or duplications.
The size and complexity of a transport protocol depends on the type of service it can get from the
network layer. Transport layer is at the core of OSI model. Transport layer provides services to
application layer and takes services from network layer.
Transport layer divides the message received from upper layer into packets at source and
reassembles these packets again into message at the destination.
1. Connection oriented
2. Connectionless
a) In this type of transmission the receiving device sends an acknowledgment, back to the
source after a packet or group of packet is received.
b) This type of transmission is also known as reliable transport method.
c) Because connection oriented transmission requires more packets be sent across network,
it is considered a slower transmission method.
d) If the data that is sent has problems, the destination requests the source for retransmission
by acknowledging only packets that have been received and are recognizable.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 9
e) Once the destination computer receives all of the data necessary to reassemble the packet,
the transport layer assembles the data in the correct sequence and then passes it up, to the
session layer.
2. Connectionless Transmission
a) In this type of transmission the receiver does not acknowledge receipt of a packet.
b) Sending device assumes that packet arrive just fine.
c) This approach allows for much faster communication between devices.
d) The trade-off is that connectionless transmission is less reliable than connection
oriented.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 10
Flow control: Like Data link layer, transport layer also performs flow control. Transport
layer makes sure that the sender and receiver communicate at a rate they both can handle.
Therefore flow control prevents the source from sending data packets faster than the
destination can handle. Here, flow control is performed end-to-end rather than across a
link.
Error control: Like Data link layer, Transport layer also performs error control. Here
error control is performed end-to-end rather than across a single link. The sending
transport layer ensures that the entire message arrives at the receiving transport layer
without error (damage, loss or duplication). Error correction is achieved through
retransmission.
Protocols: These protocols work on the transport layer TCP, SPX, NETBIOS, ATP and
NWLINK.
This layer is incharge of packet addressing, converting logical addresses into physical
addresses. It is responsible for the source-to-destination delivery of a packet across multiple
networks (links). This layer is also incharge of setting the routing. The packets will use to
arrive at their destination, based on factors like traffic and priorities. The network layer
determines that how data transmits between the network devices.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 11
If two systems are connected to same link, then there is no need for network layer. And if two
systems are attached to different networks with connecting devices like routers between the
networks, then there is need for the network layer.
It also translates the logical address into the physical address e.g computer name into MAC
address. It is also responsible for defining the route, it managing the network problems and
addressing The network layer controls the operation of the subnet, deciding which physical
path the data should take based on network conditions, priority of service, and other factors. The
X.25 protocols works at the physical, data link, and network layers.
In the network layer and the layers below, peer protocols exist between a node and its immediate
neighbor, but the neighbor may be a node through which data is routed, not the destination
station. The source and destination stations may be separated by many intermediate systems.
Protocols: These protocols work on the network layer IP, ICMP, ARP, RIP, OSI, IPX and
OSPF.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 12
Layer 2 - Data Link layer
It is responsible for reliable node-to-node delivery of data. It receives the data from network
layer and creates frames, add physical address to these frames and pass them to physical
layer
The data link layer provides error-free transfer of data frames from one node to another
over the physical layer, allowing layers above it to assume virtually error-free transmission
over the link. Data Link layer defines the format of data on the network. A network data
frame, packet, includes checksum, source and destination address, and data.
The data link layer handles the physical and logical connections to the packet's
destination, using a network interface. This layer gets the data packets send by the network
layer and convert them into frames that will be sent out to the network media, adding the
physical address of the network card of your computer, the physical address of the
network card of the destination, control data and a checksum data, also known as
CRC. The X.25 protocols works at the physical, data link, and network layers.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 13
Data Link layer consists of two sub-layers
LLC sub-layer provides interface between the media access methods and network layer
protocols such as Internet protocol which is a part of TCP/IP protocol suite.
MAC sublayer is responsible for connection to physical media. At the MAC sublayer of Data
link layer, the actual physical address of the device, called the MAC address is added to the
packet. Such a packet is called a Frame that contains all the addressing information necessary to
travel from source device to destination device.
MAC address is the 12 digit hexadecimal number unique to every computer in this world. A
device's MAC address is located on its Network Interface Card (NIC). In these 12 digits of MAC
address, the first six digits indicate the NIC manufacturer and the last six digits are unique. For
example, 32-14-a6-42-71-0c is the 12 digit hexadecimal MAC address. Thus MAC address
represents the physical address of a device in the network.
Link Establishment and Termination: Establishes and terminates the logical link
between two nodes.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 14
Physical addressing: After creating frames, Data link layer adds physical addresses
(MAC address) of sender and/or receiver in the header of each frame.
Frame Traffic Control: Tells the transmitting node to "back-off algorithm" when no
frame buffers are available.
Frame Sequencing: Transmits/receives frames sequentially.
Frame Acknowledgment: Provides/expects frame acknowledgments. Detects and
recovers from errors that occur in the physical layer by retransmitting non-
acknowledged frames and handling duplicate frame receipt.
Frame Delimiting: Creates and recognizes frame boundaries.
Frame Error Checking: Checks received frames for integrity.
Media Access Management: determines when the node "has the right" to use the
physical medium.
Flow control: It is the traffic regulatory mechanism implemented by Data Link layer that
prevents the fast sender from drowning the slow receiver. If the rate at which data is
absorbed by receiver is less that the rate produced in the sender, the data link layer
imposes this flow control mechanism.
Error control: Data link layer provides the mechanism of error control in which it
detects and retransmits damaged· or lost frames. It also deals with the problem of
duplicate frame, thus providing reliability to physical layer.
Access control: When a single communication channel is shared by multiple devices,
MAC sub-layer of data link layer helps to determine which device has control over the
channel at a given time.
Feedback: After transmitting the frames, the system waits for the feedback. The
receiving device then sends the acknowledgement frames back to the source providing
the receipt of the frames.
The physical layer, the lowest layer of the OSI model, is concerned with the transmission and
reception of the unstructured raw bit stream over a physical medium. It describes the
electrical/optical, mechanical, and functional interfaces to the physical medium, and carries
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 15
the signals for all of the higher layers. Physical layer defines the cables, network cards and
physical aspects.
It is responsible for the actual physical connection between the devices. Such physical
connection may be made by using twisted pair cable, fiber-optic, coaxial cable or wireless
communication media. This layer gets the frames sent by the Data Link layer and converts them
into signals compatible with the transmission media. If a metallic cable is used, then it will
convert data into electrical signals; if a fiber optical cable is used, then it will convert data into
luminous signals; if a wireless network is used, then it will convert data into electromagnetic
signals; and so on.
When receiving data, this layer will get the signal received and convert it into 0s and 1s and
send them to the Data Link layer, which will put the frame back together and check for its
integrity The X.25 protocols works at the physical, data link, and network layers.
Data Encoding: Modifies the simple digital signal pattern (1s and 0s) used by the PC to better
accommodate the characteristics of the physical medium, and to aid in bit and frame
synchronization. It determines:
Transmission Technique: determines whether the encoded bits will be transmitted by baseband
(digital) or broadband (analog) signaling.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 16
Physical Medium Transmission: transmits bits as electrical or optical signals appropriate for
the physical medium, and determines:
Protocols used at physical layer are ISDN, IEEE 802 and IEEE 802.2.
Bit synchronization: The physical layer provides the synchronization of the bits by providing a
clock. This clock controls both transmitter as well as receiver thus providing synchronization at
bit level.
Provides physical characteristics of interfaces and medium: Physical layer manages the way
a device connects to network media. For example, if the physical connection from the device to
the network uses coaxial cable, the hardware that functions at the physical layer will be designed
for that specific type of network. All components including connectors are also specified at
physical layer.
Bit rate control: Physical layer defines the transmission rate i.e. the number of bits sent in one
second. Therefore it defines the duration of a bit.
Line configuration: Physical layer also defines the way in which the devices are connected to
the medium. Two different line configurations are used point to point configuration and
multipoint configuration.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 17
Transmission mode: Physical layer also defines the way in which the data flows between the
two connected devices. The various transmission modes possible are: Simplex, half-duplex and
full-duplex.
Physical topologies: Physical layer specifies the way in which the different, devices/nodes are
arranged in a network i.e. bus, star or mesh.
Multiplexing: Physical layer can use different techniques of multiplexing, in order to improve
the channel efficiency.
Circuit switching: Physical layer also provides the circuit switching to interconnect different
networks.
Assuming two hosts follow OSI model, example of files transferring from host A to host B.
Host A:
1. User will issue a file transfer command to the Application Layer. (initiates or accepts
a request)
2. The Application Layer then passes the file to the Presentation Layer, which may
reformat the data. (handles protocol conversion, data encryption or decryption, text
compression)
3. The data is then passed to the Session Layer, which requests that a connection be
provided to the destination host and passes the data to Transport Layer.(handles
session setup and Session close)
4. Transport Layer breaks the file into manageable chunks of data for transmission and
passes them to network layer. (Handles flow control, error recovery).
5. Network Layer selects the data’s route and then passes the data to the data link layer.
(handles addressing, route discovery and route selection, error control)
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 18
6. Data link Layer adds extra information to the data so that it can be checked for errors
at the receiving end. And passes the data to the physical layer. (handles CRC cyclic
redundancy check).
7. Physical Layer takes the resulting data stream and transmit it across the physical link
to the Host B (handles mechanical and electrical characteristic to provide and
maintain physical connection)
Host B
1. Host B’s physical layer receives the bits and passes them on to the
3. Data link layer verifies that no errors occurred, and then passes the data onto the
network layer.
4. Network Layer ensures that the selected route is proving reliable, and then passes the
data onto the transport layer.
5. Transport Layer reassembles the small chunks of data into the file being transferred,
and then passes it onto the session layer.
6. Session Layer determines if the transfer is complete, and if so, may break down the
session, in effect ending the communication. It passes the data onto presentation
layer.
7. Presentation Layer may reformat the data, performing any necessary conversion, data
are passed on to application layer.
8. Host B’s user can then access the transferred information through the Application
Layer.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 19
THE TCP/IP REFERENCE MODEL
5.5 What is TCP/IP Model?.
Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite is the engine for
the Internet and networks worldwide. Its simplicity and power has led to its becoming the
single network protocol of choice in the world today. TCP/IP is a set of protocols developed
to allow cooperating computers to share resources across the network.
This model was initially developed & used by ARPANET (Advanced Research Project
Agency Network). ARPANET was a community of researchers sponsored by the U.S.
department of defense. It connects many universities and government installations using
leased telephone lines .Certainly the ARPAnet is the best- known TCP/IP network.
The most accurate name for the set of protocols is the "Internet protocol suite". TCP and
IP are two of the protocols in this suite. The Internet is a collection of networks. Term
"Internet" applies to this entire set of networks. Like most networking software, TCP/IP is
modeled in layers. This layered representation leads to the term protocol stack, which
refers to the stack of layers in the protocol suite. It can be used for positioning the TCP/IP
protocol suite against others network software like Open System Interconnection (OSI)
model.
By dividing the communication software into layers, the protocol stack allows for division of
labor, ease of implementation and code testing, and the ability to develop alternative layer
implementations. Layers communicate with those above and below via concise interfaces. In
this regard, a layer provides a service for the layer directly above it and makes use of services
provided by the layer directly below it. For example, the IP layer provides the ability to
transfer data from one host to another without any guarantee to reliable delivery or duplicate
suppression.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 20
TCP/IP is a family of protocols. A few provide "low- level" functions needed for many
applications. These include IP, TCP, and UDP. Others are protocols for doing specific tasks, e.g.
transferring files between computers, sending mail, or finding out who is logged in on another
computer. Initially TCP/IP was used mostly between minicomputers or mainframes. These
machines had their own disks, and generally were self contained.
Application Layer
The application layer is provided by the program that uses TCP/IP for communication. An
application is a user process cooperating with another process usually on a different host (there is
also a benefit to application communication within a single host). Examples of applications
include Telnet and the File Transfer Protocol (FTP).
Transport Layer
The transport layer provides the end-to-end data transfer by delivering data from an
application to its remote peer. Multiple applications can be supported simultaneously. The
most-used transport layer protocol is the Transmission Control Protocol (TCP), which
provides connection-oriented reliable data delivery, duplicate data suppression, congestion
control, and flow control.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 21
Another transport layer protocol is the User Datagram Protocol It provides connectionless,
unreliable, best-effort service. As a result, applications using UDP as the transport protocol
have to provide their own end-to-end integrity, flow control, and congestion control, if
desired. Usually, UDP is used by applications that need a fast transport mechanism and can
tolerate the loss of some data.
Internetwork Layer
The internetwork layer, also called the internet layer or the network layer, provides the
“virtual network” image of an internet this layer shields the higher levels from the physical
network architecture below it. Internet Protocol (IP) is the most important protocol in this
layer. It is a connectionless protocol that does not assume reliability from lower layers. IP does
not provide reliability, flow control, or error recovery.
These functions must be provided at a higher level. IP provides a routing function that attempts
to deliver transmitted messages to their destination. A message unit in an IP network is called an
IP datagram.
This is the basic unit of information transmitted across TCP/IP networks. Other internetwork-
layer protocols are IP, ICMP, IGMP, ARP, and RARP.
The network interface layer, also called the link layer or the data-link layer or Host to
Network Layer, is the interface to the actual network hardware. This interface may or may not
provide reliable delivery, and may be packet or stream oriented.
In fact, TCP/IP does not specify any protocol here, but can use almost any network interface
available, which illustrates the flexibility of the IP layer. Examples are IEEE 802.2, X.25,ATM,
FDDI, and even SNA.TCP/IP specifications do not describe or standardize any network-layer
protocols, they only standardize ways of accessing those protocols from the internet work layer.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 22
Comparison between OSI and TCP/IP model
OSI TCP / IP
Session Layer
TCP/IP (Transmission Control Protocol / Internet Protocol) was developed before OSI. The
TCP/IP protocol is made of five layers. Physical, data link, network, transport, and application.
The application layer in TCP/IP can be equaled with the combination of session,
presentation, and application layer of OSI model.
At the transport layer, TCP/IP defines two protocols: TCP and UDP (user Datagram
Protocol).
At the physical and data link layer, TCP/IP does not define any specific protocol.
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 23
CLASS EXERCISE 5
1. The OSI reference model is a seven-layer reference model that originated from the
a) ISO standards committee
b) ITU standards committee
c) IEEE standards committee
d) ANSI standards committee
7. Which layer manages the reliable transfer of data from host to host (or end to end)? Discuss
9. What is the name of the layer that selects the best path for data to be transmitted? Discuss
BY: MR. KEVIN NJAGI (LECTURER – ST. PAUL’S UNIVERSITY) @ JAN - APRIL 2024 24