Computer Network Model
Layered Tasks
OSI Model
Internet Model (TCP/IP Suite)
Prof. Arshad Mehmood Shah 1
Layered Tasks
• We use the concept of layers in our daily life. As an example, let us consider
two friends who communicate through postal mail. The process of sending
a letter to a friend would be complex if there were no services available
from the post office.
• Including Topics
• Sender, Receiver, and Signal
Prof. Arshad Mehmood Shah 2
OSI Model
• OSI stands for Open System Interconnection. An open system is a model that allows
any two systems to communicate even if their architectures are different. OSI model
was developed by International Standard Organization (ISO) in 1983. The standards
were created for computer industry to allow different networks to work together
efficiently.
• OSI model consists of seven layers. Each layer performs a specific function in network
communication. For example, one layer may be responsible for establishing connection
between devices. Another layer may be responsible for error checking during data
transfer.
• The layers in OSI model are divided into two groups:
• Upper Layer: The upper layers focus on user applications and how files are
represented on computers before transfer.
• Lower Layer: The lower layers are concerned with how the communication across a
network actually occurs. Prof. Arshad Mehmood Shah 3
Types of OSI Layer
• OSI layer consists of seven layers that are as follows:
1. Application Layer
2. Presentation Layer
3. Session Layer
4. Transport Layer
5. Network Layer
6. Data Link Layer
7. Physical Layer
Prof. Arshad Mehmood Shah 4
Application Layer
• The application layer is the top most layer of OSI model. It provides network services
to user applications. Many protocols are used at this layer to perform various
functions. These protocols collectively form the application layer. These protocols form
the basic of various network services such as user file transfer, web surfing and email
etc, Web browsers and Internet-connected applications like Skype or Outlook use
application layer protocols.
• FTP protocols is used to transfer file.
• Http and https protocols are used in web surfing.
• SMTP protocols is used to send and receive emails.
Presentation Layer
• The presentation layer performs data reformatting, data compression and encryption.
• Data Reformatting: In data communication,, the computers may use various encoding
techniques such as ASCII or EBCDIC etc. The presentation layer at sending computer
changes data according to the sender’s format. The presentation layer at receiving
computer changes data according to the receiver’s format.
Prof. Arshad Mehmood Shah 5
• Encryption: The presentation layer encrypts data before transmission. It means that
the sender transforms the original information to another form and sends resulting
message over a network. The receiver again transforms the message back to its
original form. It is called decryption.
• Compression: Data compression reduces the number of bits to be transmitted. The
presentation layer compresses a large amount of data into small size.
Session Layer
• The session layer establishes, manages, and terminates user connections. A session is
an exchange of messages between computers.
• The session layer also synchronizes data transfer with checkpoints. If a failure occurs,
only the data from the last checkpoint is retransmitted. For example, a 100 MB file is
being transferred and the session layer sets a checkpoint every 5 MB. Suppose a
disconnection or a crash occurs after the transfer of 63 MB. The session will resume
from the last checkpoint at 60MB It means that only the last 40 MB of data need to be
transferred. Prof. Arshad Mehmood Shah 6
Transport Layer
• The transport layer is responsible for end-to-end communication between two devices.
It takes data from the session layer and divides it into chunks (portions) called
segments. The transport layer on the receiving device receives the segments. The
segments are reassembled, checked for errors and acknowledged at receiving device.
The data is transmitted again if there are errors in the transmission.
Network Layer
• The network layer is responsible for data transfer between two different networks. It is
the layer where router resides. The network layer receives the segments from
transport layer and breaks them into smaller units called packets. The network layer on
receiving device reassembles the packets. It also performs routing process. This
process finds the best physical path for the data to reach its destination.
Data Link Layer
• The data link layer is responsible for the reliability of the physical link established at
layer 1. Data link layer must decide the following:
Prof. Arshad Mehmood Shah 7
• Framing: The data link layer takes packets from the network layer and break them into
smaller pieces called frames.
• Flow Control: The rate of sending data can be more than the rate of receiving data.
Data link layer imposes flow control mechanism to prevent it.
• Error Control: The data link layer detects and retransmits damaged or lost frames. It
also prevents the duplication of frames.
• Access Control: If two or more devices are connected to the same link, data link layer
determines which device has control over the link at a given time.
Physical Layer
• The physical layer is the bottom layer of the OSI model. Its main function is to control
how a stream of bits is sent and received over the physical medium. Physical layer
must decide the following:
• Characteristics of Media: The physical layer defines the characteristics and type of
transmission medium.
• Representation of Bits: The bits areProf.
encoded into electrical signals for transmission.
Arshad Mehmood Shah 8
• Data Rate: Physical layer defines numbers of bits that will be sent in a second.
• Transmission Mode: The physical layer defines the direction of transmission between
two devices: Simplex, half-duplex or full-duplex.
TCP/IP PROTOCOL SUITE
• TCP/IP is a protocol suite (a set of protocols organized in different layers) used in the
Internet today. It is a hierarchical protocol made up of interactive modules, each of
which provides a specific functionality. The term hierarchical means that each upper
level protocol is supported by the services provided by one or more lower level
protocols. The original TCP/IP protocol suite was defined as four software layers built
upon the hardware. Today, however, TCP/IP is thought of as a five-layer model.
Layered Architecture
• To show how the layers in the TCP/IP protocol suite are involved in
communication between two hosts, we assume that we want to use the suite in
a small internet made up of three LANs (links), each with a link-layer switch. We
also assume that the links are connected by one router.
Prof. Arshad Mehmood Shah 9
Layers in the 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.
Prof. Arshad Mehmood Shah 10
Addressing
• Four levels of addresses are used in an internet employing the TCP/IP protocols:
physical, logical, port, and specific.
1. Physical Adresses:
Definition: Physical addresses, also known as MAC (Media Access Control) addresses, are unique
identifiers assigned to network interface controllers (NICs) by manufacturers.
Purpose: These addresses are used at the data link layer (Layer 2) of the OSI model to uniquely
identify devices within the same local network or broadcast domain.
Format: MAC addresses are typically represented as a series of six pairs of hexadecimal digits
separated by colons or hyphens (e.g., 00:1A:2B:3C:4D:5E).
Example: MAC addresses are used in Ethernet networks for communication between devices
within the same LAN (Local Area Network).
2. Logical Adresses
Definition: Logical addresses are identifiers assigned to devices in a network layer protocol, such
as IP (Internet Protocol) addresses in TCP/IP networks.
Prof. Arshad Mehmood Shah 11
Purpose: These addresses are used for routing and addressing data packets across different
networks, enabling communication between devices regardless of their physical location.
Format: Logical addresses may vary depending on the network protocol being used. For example,
IPv4 addresses are 32-bit numerical addresses written in dotted-decimal notation (e.g.,
[Link]), while IPv6 addresses are 128-bit hexadecimal addresses (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334).
Example: IP addresses are logical addresses used for communication over the Internet and other
TCP/IP networks.
3. Port Addresses
Definition: Port addresses are identifiers used in transport layer protocols, such as TCP
(Transmission Control Protocol) and UDP (User Datagram Protocol), to distinguish between
different services or applications running on a single device.
Purpose: Port addresses enable multiple network services to operate simultaneously on the
same device, allowing for efficient communication between applications.
Format: Port addresses are represented by numerical values ranging from 0 to 65535.
Example: Common port numbers include port 80 for HTTP (Hypertext Transfer Protocol), port
443 for HTTPS (HTTP Secure), and port 21Prof.
forArshad
FTP (File Transfer Protocol).
Mehmood Shah 12
4. Specific Addresses
Definition: Specific addresses refer to addresses that uniquely identify a particular device or
resource in a network.
Purpose: These addresses are used to target specific devices or services for communication or
data transfer.
Examples: Specific addresses can include both physical addresses (e.g., MAC addresses) and
logical addresses (e.g., IP addresses) depending on the context of the communication and the
layer of the OSI model being utilized.
Prof. Arshad Mehmood Shah 13
5. The presentation of data is becoming more and more important in today’s Internet. Some
people argue that the TCP/IP protocol suite needs to add a new layer to take care of the
presentation of data. If this new layer is added in the future, where should its position be in
the suite? Redraw following figure to include this layer.
Prof. Arshad Mehmood Shah 14
6. Assume that an application-layer protocol is written to use the services of UDP. Can the
application-layer protocol uses the services of TCP without change?
7. Using the internet in following figure in the text, show the layers of the TCP/IP protocol suite
and the flow of data when two hosts, one on the west coast and the other on the east coast,
exchange messages.
Prof. Arshad Mehmood Shah 15
Prof. Arshad Mehmood Shah 16
Prof. Arshad Mehmood Shah 17
Problems:
1. Assume that the number of hosts connected to the Internet at year 2010 is five hundred
million. If the number of hosts increases only 20 percent per year, what is the number of
hosts in year 2020?
2. Assume a system uses five protocol layers. If the application program creates a message of
100 bytes and each layer (including the fifth and the first) adds a header of 10 bytes to the
data unit, what is the efficiency (the ratio of application layer bytes to the number of bytes
transmitted) of the system?
3. Assume we have created a packet-switched internet. Using the TCP/IP protocol suite, we
need to transfer a huge file. What are the advantage and disadvantage of sending large
packets?
4. Protocol layering can be found in many aspects of our lives such as air travelling. Imagine you
make a round-trip to spend some time on vacation at a resort. You need to go through some
processes at your city airport before flying. You also need to go through some processes
when you arrive at the resort airport. Show the protocol layering for the round trip using
some layers such as baggage checking/claiming, boarding/unboarding, takeoff/landing.
Prof. Arshad Mehmood Shah 18