0% found this document useful (0 votes)
22 views102 pages

Lecture3 - Network Reference Models and Protocols

The lecture covers computer networks and data communication, focusing on network reference models and protocols, specifically the OSI and TCP/IP models. It explains data transmission processes, the structure and functions of each layer in the OSI model, and common protocols used in networking. Additionally, it discusses the advantages and disadvantages of the OSI model and highlights key standardization organizations in the field.

Uploaded by

juliussavi789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views102 pages

Lecture3 - Network Reference Models and Protocols

The lecture covers computer networks and data communication, focusing on network reference models and protocols, specifically the OSI and TCP/IP models. It explains data transmission processes, the structure and functions of each layer in the OSI model, and common protocols used in networking. Additionally, it discusses the advantages and disadvantages of the OSI model and highlights key standardization organizations in the field.

Uploaded by

juliussavi789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 102

Lecture THREE

Computer Networks and Data Communication

Network Reference Models & Protocols

Twaha Kateete
[email protected]
+256 778 313 421
Forward
• In the digital era, various information is presented as
data in our life. What is data? How is data transmitted?

• In this lecture, we will use the network reference


models to understand the "life" of data and its
transmission mechanisms.
Objectives
On completion of this lecture, you will be able to:
i. Understand the data definition and transmission process.
ii. Understand the concepts and advantages of the network
reference model.
iii. Understand common standard protocols.
iv. Understand the data encapsulation and decapsulation

processes.
Content
1.Applications and Data
2.Network Reference Model and Standard Protocols
3.Data Communication Process
Origin of the Story - Applications
• Applications are used to meet various requirements of
people, such as web page access, online gaming, and
online video playback.
• Information is generated along with applications. Texts,
pictures, and videos are all information presentation
modes.
Application Implementation - Data
• Data generation
In the computer field, data is the carrier of all kinds of information.

• Data transmission
Data generated by most applications needs to be transmitted
between devices.
Application Implementation - Data
• A computer can identify only digital data consisting of 0s and 1s. It is
incapable of reading other types of information, so the information needs to
be translated into data by certain rules.

• However, people do not have the capability of reading electronic data.


Therefore, data needs to be converted into information that can be
understood by people.

• A network engineer needs to pay more attention to the end-to-end data


transmission process.
Contents
1.Applications and Data
2.Network Reference Model and Standard Protocols
3.Data Communication Process
OSI Reference Model
7. Application Layer Provides interfaces for applications.

6. Presentation Layer Translates data formats to ensure that the application-layer data of one
system can be identified by the application layer of another system.

5. Session Layer Establishes, manages, and terminates sessions between communicating


parties.
4. Transport Layer Establishes, maintains, and cancels an end-to-end data transmission
process; controls transmission speeds and adjusts data sequences.

3. Network Layer Defines logical addresses and transfers data from sources to destinations.

2. Data Link Layer Encapsulates packets into frames, transmits frames in P2P or P2MP mode,
and implements error checking.
1. Physical Layer Transmits bitstreams over transmission media and defines electrical and
physical specifications.
OSI Reference Model
• OSI stands for Open Systems Interconnection.
• OSI model was developed by the International Organization for
Standardization(ISO) IN 1984.
• It is a reference model for how applications communicate over a
network.
• The OSI model characterizes computing functions into a universal
set of rules and requirements in order to support interoperability
between different products and software.
• The OSI model can be considered as a universal language for
computer networking.
• It is based on the concept of divide and conquers, it splits up the
communication system into 7 abstract layers, and each layer is
stacked upon the previous layer.
• Each layer has a specific functionality to perform. All the 7 layers
work collaboratively to transmit the data from one person to
another across the globe through workstations.
OSI Reference Model
• The Open Systems Interconnection Model (OSI) was included in the ISO 7489 standard and
released in 1984. ISO stands for International Organization for Standardization.
• The OSI reference model is also called the seven-layer model. The seven layers from
bottom to top are as follows:
•Physical layer: transmits bit flows between devices and defines physical specifications
such as electrical levels, speeds, and cable pins.
•Data link layer: encapsulates bits into octets and octets into frames, uses MAC
addresses to access media, and implements error checking.
•Network layer: defines logical addresses for routers to determine paths and transmits
data from source networks to destination networks.
•Transport layer: implements connection-oriented and non-connection-oriented data
transmission, as well as error checking before retransmission.
•Session layer: establishes, manages, and terminates sessions between entities at the
presentation layer. Communication at this layer is implemented through service requests
and responses transmitted between applications on different devices.
• Presentation layer: provides data encoding and conversion so that data sent by the
application layer of one system can be identified by the application layer of another
system.
•Application layer: provides network services for applications and the OSI layer closest
to end users.
Merits of OSI
• It is a layered model and each layer is
independent in nature. Thus, changes in one
layer doesn’t affect the other layers.
• It divides the complex function into smaller
parts.
• It is a generic model as it has flexibility to adapt
to many protocols.
• It supports both connection-oriented as well as
connectionless services.
• It is more secure and adaptable than having all
services bundled in the single layer.
Demerits of OSI
• It is purely a theoretical model and ignores the
availability of the resources and technologies.
Hence, its practical implementation is somewhat
restricted.
• It is very complex. The initial implementation was
cumbersome, slow and costly.
• The layers are interdependent on each other,
they can’t operate parallel as they have to wait
for the data packets from the predecessor layer.
TCP/IP Reference Model
• The OSI protocol stack is complex, and the TCP and IP protocols
are widely used in the industry.
• Therefore, the TCP/IP reference model becomes the
mainstream reference model of the Internet
TCP/IP Reference Model
• The TCP/IP model is similar to the OSI model in structure
and adopts a hierarchical architecture. Adjacent TCP/IP
layers are closely related.
• The standard TCP/IP model combines the data link layer
and physical layer in the OSI model into the network
access layer. This division mode is contrary to the actual
protocol formulation.
• Therefore, the equivalent TCP/IP model that integrates the
TCP/IP standard model and the OSI model is proposed.
Contents in the following slides are based on the equivalent
TCP/IP model.
Common TCP/IP Protocols
• The TCP/IP protocol stack defines a series
of standard protocols.
Telnet FTP TFTP SNMP
Application Layer
HTTP SMTP DNS DHCP
Transport Layer TCP UDP
ICMP IGMP
Network Layer
IP
Data Link Layer PPPoE
Ethernet PPP
Physical Layer ...
Common TCP/IP Protocols
• Application Layer
• Hypertext Transfer Protocol (HTTP): is used to access various
pages on web servers.
• File Transfer Protocol (FTP): provides a method for transferring files. It
allows
• data to be transferred from one host to another.
• Domain name service (DNS): translates from host domain names to IP
addresses.

• Transport layer
• Transmission Control Protocol (TCP): provides reliable connection-
oriented communication services for applications. Currently, TCP is used
by many popular applications.
• User Datagram Protocol (UDP): provides connectionless communication
and does not guarantee the reliability of packet transmission. The
reliability can be ensured by the application layer.
Common TCP/IP Protocols
• Network layer
• Internet Protocol (IP): encapsulates transport-layer data into data packets and forwards
packets from source sites to destination sites. IP provides a connectionless and unreliable
service.
• Internet Group Management Protocol (IGMP): manages multicast group memberships.
Specifically, IGMP sets up and maintains memberships between IP hosts and their directly
connected multicast routers.
• Internet Control Message Protocol (ICMP): sends control messages based on the IP protocol
and provides information about various problems that may exist in the communication
environment. Such information helps administrators diagnose problems and take proper measures
to resolve the problems.

• Data link layer


• Point-to-Point Protocol (PPP): is a data link layer protocol that works in point-to- point mode.
PPP is mainly used on wide area networks (WANs).
• Ethernet: is a multi-access and broadcast protocol at the data link layer, which is the most
widely used local area network (LAN) technology.
• Point-to-Point Protocol over Ethernet (PPPoE): connects multiple hosts on a network to a
remote access concentrator through a simple bridge device (access device). Common applications
include home broadband dialup access.
Common Protocol Standardization Organizations
• Internet Engineering Task Force (IETF)
IETF is a voluntary organization responsible for developing and promoting
Internet protocols (especially protocols that constitute the TCP/IP protocol
suite), and releasing new or replacing old protocol standards through RFCs.

• Institute of Electrical and Electronics Engineers (IEEE)


IEEE has formulated about 30% of standards in the electronics, electrical,
and computer science fields
• worldwide. Those standards include well-known IEEE802.3 (Ethernet) and
IEEE802.11 (Wi-Fi).

• International Organization for Standardization (ISO)


ISO is an international organization that plays an important role in the
formulation of computer network standards, such as the OSI model defined
in ISO/IEC 7498-1.
Application Layer
• The application layer provides interfaces for application software so that applications can
use network services. The application layer protocol designates transport layer protocols
and ports.
• PDUs transmitted at the application layer are called data.
• The TCP/IP suite enables data to be transmitted over a network. The layers use packet data
units (PDUs) to exchange data, implementing communication between network devices.
• PDUs transmitted at different layers contain different information. Therefore, PDUs have
different names at different layers.

Application Layer • HTTP 80 (TCP)


Hypertext transfer protocol, which provides web browsing
(Data) services.
• Telnet 23 (TCP)
Remote login protocol, which provides remote management
Transport Layer services.
• FTP 20 and 21 (TCP)
File transfer protocol, which provides Internet file resource
Network Layer sharing services.
• SMTP 25 (TCP)
Simple mail transfer protocol, which provides Internet email
Data Link Layer services.
• TFTP 69 (UDP)
Simple file transfer protocol, which provides simple file transfer
Physical Layer services.
Common Application Layer Protocols - FTP
• The File Transfer Protocol (FTP) transfers files
from one host to another to implement file
download and upload. This protocol adopts the
client/server (C/S) structure.
Common Application Layer Protocols - Telnet

• Telnet is a standard protocol that provides remote login


services on a network.
• It provides users with the ability to operate remote
devices through local PCs.
Common Application Layer Protocols - HTTPS
• Hypertext Transfer Protocol Secure (HTTPS): is one of
the most widely used network protocols on the
Internet.
• HTTPS was originally designed to provide a method
for publishing and receiving HTML pages.
Transport Layer
• A transport layer protocol receives data from an
application layer protocol, encapsulates the data with the
corresponding transport layer protocol header, and helps
establish an end-to- end (port-to-port) connection.
• PDUs transmitted at the transport layer are called
segments.
TCP and UDP – Header Formats
TCP Header
Source Port: identifies the application that sends the segment. This field is 16 bits long.
• Destination Port: identifies the application that receives the segment. This field is 16 bits long.
Sequence Number: Every byte of data sent over a TCP connection has a sequence number. The
value of the Sequence Number field equals the sequence number of the first byte in a sent segment.
This field is 32 bits long.
Acknowledgment Number: indicates the sequence number of the next segment's first byte that
the receiver is expecting to receive. The value of this field is 1 plus the sequence number of the last
byte in the previous segment that is successfully received. This field is valid only when the ACK flag is
set. This field is 32 bits long.
Header Length: indicates the length of the TCP header. The unit is 32 bits (4 bytes). If there is no
option content, the value of this field is 5, indicating that the header contains 20 bytes.
• Reserved: This field is reserved and must be set to 0. This field is 3 bits long.
Control Bits: control bits, includes FIN, ACK, and SYN flags, indicating TCP data segments in
different states.
Window: used for TCP flow control. The value is the maximum number of bytes that are allowed by
the receiver. The maximum window size is 65535 bytes. This field is 16 bits long.
Checksum: a mandatory field. It is calculated and stored by the sender and verified by the receiver.
During checksum computation, the TCP header and TCP data are included, and a 12-byte pseudo
header is added before the TCP segment. This field is 16 bits long.
Urgent: indicates the urgent pointer. The urgent pointer is valid only when the URG flag is set. The
Urgent field indicates that the sender transmits data in emergency mode. The urgent pointer
indicates the number of urgent data bytes in a segment (urgent data is placed at the beginning of
the segment). This field is 16 bits long.
• Options: This field is optional. This field is 0 to 40 bytes long.
UDP Header
Source Port: identifies the application that sends the
segment. This field is 16 bits long.
Destination Port: identifies the application that
receives the segment. This field is 16 bits long.
Length: specifies the total length of the UDP header
and data. The possible minimum length is 8 bytes
because the UDP header already occupies 8 bytes.
Due to the existence of this field, the total length of a
UDP segment does not exceed 65535 bytes (including
an 8-byte header and 65527-byte data).
• Checksum: checksum of the UDP header and UDP
data. This field is 16 bits long.
TCP and UDP – Port Numbers

• Generally, the source port used by a client is randomly allocated, and the
destination port is specified by the application of a server.
• The system generally selects a source port number that is greater than 1023 and is
not being used.
• The destination port number is the listening port of the application (service) enabled
• on the server. For example, the default port number for HTTP is 80.
TCP Connection Setup – Three – Way handshake
• Before sending data, a TCP-based application needs to
establish a connection through three-way handshake
TCP Connection Setup – Three – Way handshake
• The TCP connection setup process is as follows:
• The TCP connection initiator (PC1 in the figure) sends the first TCP
segment with SYN being set.
• The initial sequence number a is a randomly generated number. The
acknowledgment number is 0 because no segment has ever been
received from PC2.
• After receiving a valid TCP segment with the SYN flag being set, the
receiver (PC2) replies with a TCP segment with SYN and ACK being
set. The initial sequence number b is a randomly generated number.
Because the segment is a response one to PC1, the acknowledgment
number is a+1.
• After receiving the TCP segment in which SYN and ACK are set, PC1
replies with a segment in which ACK is set, the sequence number is
a+1, and the acknowledgment number is b+1. After PC2 receives the
segment, a TCP connection is established.
TCP Sequence Number and Acknowledgment Number

• TCP uses the Sequence Number and Acknowledgment


Number fields to implement reliable and ordered data
transmission.
TCP Sequence Number and Acknowledgment Number
Assume that PC1 needs to send segments of data to PC2. The transmission process is
as follows:
• 1. PC1 numbers each byte to be sent by TCP. Assume that the number of the first
byte is a+1. Then, the number of the second byte is a+2, the number of the third
byte is a+3, and so on.
2. PC1 uses the number of the first byte of each segment of data as the sequence
number and sends out the TCP segment.
3. After receiving the TCP segment from PC1, PC2 needs to acknowledge the
segment and request the next segment of data. How is the next segment of
data determined? Sequence number (a+1) + Payload length = Sequence number
of the first byte of the next segment (a+1+12)
4. After receiving the TCP segment sent by PC2, PC1 finds that the acknowledgment
number is a+1+12, indicating that the segments from a+1 to a+12 have been
received and the sequence number of the upcoming segment to be sent should be
a+1+12.
To improve the sending efficiency, multiple segments of data can be sent at a time by
the sender and then acknowledged at a time by the receiver.
TCP Window Sliding Mechanism
• TCP uses the sliding window mechanism to
control the data transmission rate.
TCP Window Sliding Mechanism
1. During the TCP three-way handshake, both ends notify each other of
the maximum number of bytes (buffer size) that can be received by the
local end through the Window field.
2. After the TCP connection is set up, the sender sends data of the
specified number of bytes based on the window size declared by the
receiver.
3. After receiving the data, the receiver stores the data in the buffer and
waits for the upper-layer application to obtain the buffered data. After
the data is obtained by the upper-layer application, the corresponding
buffer space is released.
4. The receiver notifies the current acceptable data size (window)
according to its buffer size.
5. The sender sends a certain amount of data based on the current
window size of the receiver.
TCP Shutdown – Four-Way Shake
• After data transmission is complete, TCP needs to use
the four-way handshake mechanism to disconnect the TCP
connection and release system resources.
TCP Shutdown – Four-Way Shake
• TCP supports data transmission in full-duplex mode, which means that data can be
transmitted in both directions at the same time. Before data is transmitted, TCP sets
up a connection in both directions through three-way handshake. Therefore, after
data transmission is complete, the connection must be closed in both directions.
• This is shown in the figure.
1. PC1 sends a TCP segment with FIN being set. The segment does not carry data.
2. After receiving the TCP segment from PC1, PC2 replies with a TCP segment with
ACK being set.
3. PC2 checks whether data needs to be sent. If so, PC2 sends the data, and then a
TCP segment with FIN being set to close the connection. Otherwise, PC2 directly
sends a TCP segment with FIN being set.
4. After receiving the TCP segment with FIN being set, PC1 replies with an ACK
segment. The TCP connection is then torn down in both directions.
Network Layer
• The transport layer is responsible for establishing connections
between processes on hosts, and the network layer is responsible
for transmitting data from one host to another.
• PDUs transmitted at the network layer are called packets.
• Internet Protocol Version 4 (IPv4) is the most widely used network
layer protocol.
Working Process of a Network Layer
Protocol
Explanation
• When IP is used as the network layer protocol, both communication parties are assigned a unique
IP address to identify themselves. An IP address can be written as a 32-bit binary integer. To
facilitate reading and analysis, an IP address is usually represented in dot-decimal notation,
consisting of four decimal numbers, each ranging from 0 to 255, separated by dots, such as,
192.168.1.1.
• Encapsulation and forwarding of IP data packets:
• When receiving data from an upper layer (such as the transport layer), the network
layer encapsulates an IP packet header and adds the source and destination IP addresses
to the header.
• Each intermediate network device (such as a router) maintains a routing table that guides
IP packet forwarding like a map. After receiving a packet, the intermediate network device
reads the destination address of the packet, searches the local routing table for a matching
entry, and forwards the IP packet according to the instruction of the matching entry.
• When the IP packet reaches the destination host, the destination host determines whether
to accept the packet based on the destination IP address and then processes the packet
accordingly.
• When the IP protocol is running, routing protocols such as OSPF, IS-IS, and BGP are required to
help routers build routing tables, and ICMP is required to help control networks and diagnose
network status.
Datalink Layer
• The data link layer is located between the network layer and the
physical layer and provides services for protocols such as IP and IPv6
at the network layer. PDUs transmitted at the data link layer are called
frames.
• Ethernet is the most common data link layer protocol.
Ethernet and Source MAC Addresses

• A MAC address is recognizable as six groups of two hexadecimal digits,


separated by hyphens, colons, or without a separator. Example: 48-A4-72-
1C-8F-4F
ARP
• Address Resolution Protocol (ARP):
Discovers the MAC address associated with a given IP address.
• The Address Resolution Protocol (ARP) is a TCP/IP protocol that discovers the
data link layer address associated with a given IP address.
• ARP is an indispensable protocol in IPv4. It provides the following functions:
• Discovers the MAC address associated with a given IP address.
Maintains and caches the mapping between IP addresses and MAC
addresses through ARP entries.
• Detects duplicate IP addresses on a network segment.
ARP Implementation Principles (1)
Explanation
• Generally, a network device has an ARP cache. The ARP cache stores the mapping
between IP addresses and MAC addresses.
• Before sending a datagram, a device searches its ARP table. If a matching ARP entry
is found, the device encapsulates the corresponding MAC address in the frame and
sends out the frame. If a matching ARP entry is not found, the device sends an ARP
request to discover the MAC address.
• The learned mapping between the IP address and MAC address is stored in the ARP
table for a period. Within the validity period (180s by default), the device can directly
search this table for the destination MAC address for data encapsulation, without
performing ARP-based query. After the validity period expires, the ARP entry is
automatically deleted.
• If the destination device is located on another network, the source device searches
the ARP table for the gateway MAC address of the destination address and sends the
datagram to the gateway. Then, the gateway forwards the datagram to the
destination device.
ARP Implementation Principles (2)
Explanation
• In this example, the ARP table of Host 1 does not contain the
MAC address of Host 2. Therefore, Host 1 sends an ARP request
message to discover the destination MAC address.
• The ARP request message is encapsulated in an Ethernet frame.
The source MAC address in the frame header is the MAC address
of Host 1 at the transmit end. Because Host 1 does not know the
MAC address of Host 2, the destination MAC address is the
broadcast address FF-FF-FF-FF-FF-FF.
• The ARP request message contains the source MAC address,
source IP address, destination MAC address, and destination IP
address. The destination MAC address is all 0s. The ARP
request message is broadcast to all hosts on the network,
including gateways.
ARP Implementation Principles (3)

After receiving the ARP request message, each host checks whether it is
the destination of the message based on the carried destination IP
address.
If not, the host does not respond to the ARP request message. If so, the
host adds the sender's MAC and IP addresses carried in the ARP request
message to the ARP table, and then replies with an ARP reply message.
ARP Implementation Principles (4)
Explanation
• Host 2 sends an ARP reply message to Host 1.
• In the ARP reply message, the sender's IP address is the
IP address of Host 2 and the receiver's IP address is the
IP address of Host 1.
• The receiver's MAC address is the MAC address of Host 1
and the sender's MAC address is the MAC address of
Host 2. The operation type is set to reply.
• ARP reply messages are transmitted in unicast mode.
ARP Implementation Principles (5)

• After receiving the ARP reply message, Host 1 checks whether it is the
destination of the message based on the carried destination IP address.
• If so, Host 1 records the carried sender's MAC and IP addresses in its ARP
table.
Physical Layer
• After data arrives at the physical layer, the physical layer converts a
digital signal into an optical signal, an electrical signal, or an
electromagnetic wave signal based on the physical media.
• PDUs transmitted at the physical layer are called bitstreams.
Common Transmission Media
• Twisted pairs: most common transmission media used on Ethernet networks. Twisted pairs can
be classified into the following types based on their anti-electromagnetic interference
capabilities:
STP: shielded twisted pairs
UTP: unshielded twisted pairs
• Optical fiber transmission can be classified into the following types based on functional
components:
• Fibers: optical transmission media, which are glass fibers, used to restrict optical
transmission channels.
• Optical modules: convert electrical signals into optical signals to generate optical signals.
• Serial cables are widely used on wide area networks (WANs). The types of interfaces connected
to serial cables vary according to WAN line types. The interfaces include
synchronous/synchronous serial interfaces, ATM interfaces, POS interfaces, and CE1/PRI
interfaces.
• Wireless signals may be transmitted by using electromagnetic waves. For example, a wireless
router modulates data and sends the data by using electromagnetic waves, and a wireless
network interface card of a mobile terminal demodulates the electromagnetic waves to obtain
data. Data transmission from the wireless router to the mobile terminal is then complete.
Content
1.Applications and Data
2.Network Reference Model and Standard Protocols
3.Data Communication Process (Next Lecture)
Network Protocols
• Network protocols are set of rules, conventions and data
structures that dictate how devices exchange data across
networks.
• Network protocols can be equated to languages that two
devices must understand for seamless communication of
information, regardless of their infrastructure and design.
• Network protocols divide the communication process into
discrete tasks across every layer of the OSI model.
• One or more protocols operate at each layer in the
communication exchange.
• Protocols make it possible for devices to interact with each
other because of predetermined rules built into devices’
software and hardware.
• Network protocols are the reason you can easily
communicate with people all over the world, and thus play
a critical role in modern digital communications.
How Network Protocols Work
• Network protocols take large-scale processes and
break them down into small, specific tasks or
functions.
• This occurs at every level of the network, and
each function must cooperate at each level to
complete the larger task at hand.
• The term protocol suite refers to a set of smaller
network protocols working in conjunction with
each other.
• Network protocols are typically created according
to industry standard by various networking or
information technology organizations(discussed
in lect 1).
Who uses Network Protocols
• Network protocols aren’t only relevant to certified
network specialists or IT professionals.
• Billions of people use network protocols daily,
whether they know it or not.
• Every time you use the internet, you leverage
network protocols.
• Though you may not know how network protocols
work or how frequently you encounter them, they
are necessary for using the internet or digital
communications in any capacity.
• Therefore, almost everyone has ever used network
protocols before.
Application Layer(Layer 7) Protocols
• DHCP
• Its Dynamic Host Configuration Protocol.
• DHCP is a communication protocol that enables
network administrators to automate the assignment
of IP addresses in a network.
• In an IP network, every device connecting to the
internet requires a unique IP.
• DHCP lets network admins distribute IP addresses
from a central point and automatically send a new
IP address when a device is plugged in from a
different place in the network.
• DHCP works on a client-server model.
• The default port is 67 and 68
Layer 7 Protocols
• DNS
• Its Domain Name System Protocol.
• DNS helps in translating or mapping host names to IP
addresses.
• DNS works on a client-server model, and uses a
distributed database over a hierarchy of name servers.
• Hosts are identified based on their IP addresses, but
memorizing an IP address is difficult due to its
complexity. IPs are also dynamic, making it all the more
necessary to map domain names to IP addresses.
• DNS helps resolve this issue by converting the domain
names of websites into numerical IP addresses.
• The default port of DNS is 53.
Layer 7 Protocols
• FTP
• Its file transfer protocol.
• FTP enables file sharing between hosts, both local
and remote, and runs on top of TCP.
• For file transfer, FTP creates two TCP connections:
control and data connection.
• The earlier is used to transfer control information
like passwords, commands to retrieve and store
files, etc.
• The later is used to transfer the actual file.
• Both of these connections run in parallel during
the entire file transfer process.
• The default port of FTP is 20/21.
Layer 7 Protocols
• HTTP(S)
• Its Hyper Text Transfer Protocol (secure).
• HTTP is used for distributed, collaborative, and hypermedia information
systems.
• It works on a client-server model, where the web browser acts as the
client.
• Data such as text, images, and other multimedia files are shared over the
WWW using HTTP.
• As a request and response type protocol, the client sends a request to
the server, which is then processed by the server before sending a
response back to the client.
• HTTP is a stateless protocol, meaning the client and server are only
aware of each other while the connection between them is intact.
• After that, both the client and server forget about each other's existence.
• Due to this phenomenon, the client and server can't both retain
information between requests.
• The default port of HTTP is 80 and 443 is the secured port.
Layer 7 Protocols
• IMAP and IMAP4
• Its Internet Message Access Protocol (version 4).
• IMAP is an email protocol that lets end users access and
manipulate messages stored on a mail server from their
email client as if they were present locally on their remote
device.
• IMAP follows a client-server model, and lets multiple
clients access messages on a common mail server
concurrently.
• IMAP includes operations for creating, deleting, and
renaming mailboxes, checking for new messages,
permanently removing messages, setting and removing
flags, and much more.
• The current version of IMAP is version 4 revision 1.
• The default port of IMAP is 143 and secured is 993
Layer 7 Protocols
• POP and POP3
• Post office protocol (version 3)
• POP is also an email protocol. Using this protocol, the end
user can download emails from the mail server to their
own email client.
• Once the emails are downloaded locally, they can be read
without an internet connection.
• Also, once the emails are moved locally, they get deleted
from the mail server, freeing up space.
• POP3 is not designed to perform extensive manipulations
with the messages on the mail server, unlike IMAP4.
• POP3 is the latest version of the Post Office Protocol.
• The default port of POP3 is 110 and secured is 995.
Layer 7 Protocols
• SMTP
• Its simple mail transfer protocol.
• SMTP is a protocol designed to transfer electronic mail
reliably and efficiently.
• SMTP is a push protocol and is used to send the email,
whereas POP and IMAP are used to retrieve emails on
the end user's side.
• SMTP transfers emails between systems, and notifies on
incoming emails.
• Using SMTP, a client can transfer an email to another
client on the same network or another network through
a relay or gateway access available to both networks.
• The default port of SMTP is 25 and secured (SMTPS) is
465 (Not standard).
Layer 7 Protocols
• Telnet
• Its terminal Emulation Protocol
• Telnet is an application layer protocol that enables a user
to communicate with a remote device.
• A Telnet client is installed on the user's machine, which
accesses the command line interface of another remote
machine that runs a Telnet server program.
• Telnet is mostly used by network administrators to access
and manage remote devices.
• To access a remote device, a network admin needs to
enter the IP or host name of the remote device, after
which they will be presented with a virtual terminal that
can interact with the host.
• The default port of Telnet is 23.
Layer 7 Protocols
• SNMP
• Simple network management protocol
• Application layer protocol used to manage nodes, routers,
workstations, servers, switches, etc. on an IP network.
• It enables network admins to monitor network
performance, identify network glitches and troubleshoot
them.
• Its comprised of 3 components, a managed device, an
SNMP agent and an SNMP manager.
• SNMP agent resides on the managed device.
• It currently has three versions: SNMP v1, SNMP v2 and
SNMP v3.
• The default port of SNMP is 161/162.
Presentation Layer(Layer 6) Protocols
• LPP
• Its Lightweight Presentation Protocol.
• LPP helps provide streamlined support for OSI
application services in networks running on TCP/IP
protocols for some constrained environments.
• LPP is designed for a particular class of OSI
applications, namely those entities whose
application context contains only an Association
Control Service Element (ACSE) and a Remote
Operations Service Element (ROSE).
• LPP is not applicable to entities whose application
context is more extensive, i.e., contains a Reliable
Transfer Service Element.
Session Layer(Layer 5) Protocols
• RPC
• Its Remote Procedure Call Protocol
• RPC is a protocol for requesting a service from a
program in a remote computer through a network.
• It can be used without having to understand the
underlying network technologies.
• RPC uses TCP or UDP for carrying the messages
between communicating programs.
• RPC also works on client-server model.
• The requesting program is the client, and the service
providing program is the server.
• Its default port is 135
Transport Layer(Layer 4) Protocols
• TCP
• Its Transmission Control Protocol
• TCP provides a reliable stream delivery and virtual connection service to
applications through the use of sequenced acknowledgement.
• TCP is a connection-oriented protocol, as it requires a connection to be
established between applications before data transfer.
• Through flow control and acknowledgement of data, TCP provides
extensive error checking.
• TCP ensures sequencing of data, meaning the data packets arrive in order
at the receiving end. Retransmission of lost data packets is also feasible
with TCP.
• It ensures data reaches the destination, reaches it on time, and reaches it
without duplication.
• TCP automatically breaks data into packets before transmission.
• TCP cannot be used for broadcast and multicast connections.
Transport Layer(Layer 4) Protocols
• UDP
• Its User Datagram Protocol
• UDP is a connection-less transport layer protocol that
provides a simple but unreliable message service.
• Unlike TCP, UDP adds no reliability, flow control, or
error recovery functions.
• UDP is useful in situations where the reliability
mechanisms of TCP are not necessary.
• Retransmission of lost data packets isn't possible with
UDP.
• Broadcast and multicast connections are possible with
UDP.
• UDP is faster than TCP.
• In UDP, it's possible that a packet may not be delivered,
be delivered twice, or not be delivered at all.
Network Layer(Layer 3) Protocols
• IP (IPv4)
• Its Internet Protocol (version 4)
• IPv4 is a network layer protocol that 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.
• Octets are separated with a dot(.).
• The IP is only responsible for delivering the packets, and
TCP helps puts them back in the right order.
• IPv4 encrypts data to ensure privacy and security.
Network Layer(Layer 3) Protocols
• IP(IPv6)
• Its Internet Protocol (version 6)
• IPv6 is the latest version of the Internet Protocol, a network
layer protocol that 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.
• Octets are separated with a full colon(:).
• It has more efficient routing and packet processing compared to
IPv4.
• IPv6 has better security compared to IPv4.
• IPv6 is not compatible with machines that run on IPv4.
• It is challenging to upgrade the devices to IPv6.
Network Layer(Layer 3) Protocols
• ICMP
• Its Internet Control Messaging Protocol
• ICMP 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.
• ICMP is used to diagnose network issues.
• Sending a lot of ICMP messages increases network traffic.
• End users are affected if malicious users send many ICMP
destination unreachable packets.
• Default port is 1
Data link Layer(Layer 2) Protocols
• ARP
• Its Address Resolution Protocol
• ARP helps map IP addresses to physical machine addresses
(or a MAC address for Ethernet) recognized in the local
network.
• A table called an ARP cache is used to maintain a
correlation between each IP address and its corresponding
MAC address.
• ARP offers the rules to make these correlations, and helps
convert addresses in both directions.
• MAC addresses need not be known or memorized, as the
ARP cache contains all the MAC addresses and maps them
automatically with IPs.
• ARP is susceptible to security attacks called ARP spoofing
attacks.
• Its default port is 3389
Data link Layer(Layer 2) Protocols
• SLIP
• Its Serial line IP
• SLIP is used for point-to-point serial connections using
TCP/IP.
• SLIP is used on dedicated serial links, and sometimes for
dial-up purposes.
• It is useful for allowing mixes of hosts and routers to
communicate with one another; for example, host-host,
host-router, and router-router are all common SLIP network
configurations.
• SLIP is merely a packet framing protocol: It defines a
sequence of characters that frame IP packets on a serial
line.
• It does not provide addressing, packet type identification,
error detection or correction, or compression mechanisms.
Protocol Stack and Suite
Protocol Stack
• It is the complete set of protocol layers that work together
to provide networking capabilities.

Internet Protocol Suite


• It is the set of communication protocols that implement
the protocol stack on which the internet runs.
• The Internet protocol suite is sometimes called the TCP/IP
protocol suite, after TCP\IP, which refers to the important
protocols in it, the Transmission Control Protocol(TCP) and
the Internet Protocol(IP).
• The Internet protocol suite can be described by the
analogy with the OSI model, but there are some
differences. Also not all of the layers correspond well.
Physical Layer – Layer 1
• The lowest layer of the OSI reference model is the
physical layer.
• It is responsible for the actual physical connection
between the devices.
• The physical layer contains information in the
form of bits.
• It is responsible for transmitting individual bits
from one node to the next.
• 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.
Functions of Layer 1
• Bit synchronization: The physical layer provides the
synchronization of the bits by providing a clock. This clock
controls both sender and receiver thus providing
synchronization at bit level.
• Bit rate control: The Physical layer also defines the
transmission rate i.e. the number of bits sent per second.
• Physical topologies: Physical layer specifies the way in
which the different, devices/nodes are arranged in a
network i.e. bus, star or mesh topology.
• 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.
Hub, Repeater, Modem, Cables are Physical Layer devices.
Data Link Layer – Layer 2
• The data link layer is responsible for the node to node delivery of the message.
• The main function of this layer is to make sure data transfer is error-free from
one node to another, over the physical layer.
• When a packet arrives in a network, it is the responsibility of DLL to transmit it
to the Host using its MAC address.
Data Link Layer is divided into two sub layers :
– Logical Link Control (LLC)
– Media Access Control (MAC)
• The packet received from Network layer is further divided into frames
depending on the frame size of NIC(Network Interface Card).
• DLL also encapsulates Sender and Receiver’s MAC address in the header.
• The Receiver’s MAC address is obtained by placing an ARP(Address Resolution
Protocol) request onto the wire asking “Who has that IP address?” and the
destination host will reply with its MAC address.
Functions of Layer 2
• Framing: Framing is a function of the data link layer. It provides a way for
a sender to transmit a set of bits that are meaningful to the receiver. This
can be accomplished by attaching special bit patterns to the beginning
and end of the frame.
• Physical addressing: After creating frames, Data link layer adds physical
addresses (MAC address) of sender and/or receiver in the header of each
frame.
• Error control: Data link layer provides the mechanism of error control in
which it detects and retransmits damaged or lost frames.
• Flow Control: The data rate must be constant on both sides else the data
may get corrupted thus , flow control coordinates that amount of data
that can be sent before receiving acknowledgement.
• 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.
• Packet in Data Link layer is referred as Frame
• Data Link layer is handled by the NIC (Network Interface Card) and device
drivers of host machines.
• Switch & Bridge are Data Link Layer devices.
Network Layer – Layer 3
• Network layer works for the transmission of data from one host to the other
located in different networks.
• It also takes care of packet routing i.e. selection of the shortest path to
transmit the packet, from the number of routes available.
• The sender & receiver’s IP address are placed in the header by the network
layer.

Functions of Layer 3
• Routing: The network layer protocols determine which route is suitable from
source to destination. This function of network layer is known as routing.
• Logical Addressing: In order to identify each device on internetwork uniquely,
network layer defines an addressing scheme. The sender & receiver’s IP
address are placed in the header by network layer.
• Such an address distinguishes each device uniquely and universally.
• Path Determination: Path determination is the process of selecting a path
from various available paths based on the routing information.

– Data in Network layer is referred as Packet.


– Network layer is implemented by networking devices such as routers.
Transport Layer – Layer 4
• Transport layer provides services to application layer and takes services from network
layer.
• It is responsible for the End to End Delivery of the complete message. The transport layer
also provides the acknowledgement of the successful data transmission and re-transmits
the data if an error is found.
At sender’s side:
Transport layer receives the formatted data from the upper layers,
performs Segmentation and also implements Flow & Error control to ensure proper data
transmission. It also adds Source and Destination port number in its header and forwards
the segmented data to the Network Layer.
Note: The sender need to know the port number associated with the receiver’s application.
Generally, this destination port number is configured, either by default or manually. For
example, when a web application makes a request to a web server, it typically uses port
number 80, because this is the default port assigned to web applications. Many applications
have default ports assigned.
At receiver’s side:
Transport Layer reads the port number from its header and forwards the Data which it has
received to the respective application. It also performs sequencing and reassembling of the
segmented data.
Functions of Layer 4
• Segmentation and Reassembly: This layer accepts the
message from the (session) layer , breaks the message into
smaller units.
• Each of the segment produced has a header associated
with it. The transport layer at the destination station
reassembles the message.
• Service Point Addressing: In order to deliver the message
to correct process, transport layer header includes a type
of address called service point address or port address.
Thus by specifying this address, transport layer makes sure
that the message is delivered to the correct process.
• Flow Control
• Error Control
• Connection Control
Services Provided by Layer 4
• Connection Oriented Service:
• It is a three-phase process which include
– Connection Establishment
– Data Transfer
– Termination / disconnection
In this type of transmission, the receiving device sends an acknowledgement,
back to the source after a packet or group of packet is received. This type of
transmission is reliable and secure.
• Connection-less Service:
• It is a one-phase process and includes Data Transfer. In this type of transmission,
the receiver does not acknowledge receipt of a packet. This approach allows for
much faster communication between devices. Connection-oriented service is
more reliable than connectionless Service.
• Data in the Transport Layer is called as Segments.
• Transport layer is operated by the Operating System. It is a part of the OS and
communicates with the Application Layer by making system calls.
• Transport Layer is called as Heart of OSI model.
Session Layer – Layer 5
• This layer is responsible for establishment of connection, maintenance of
sessions, authentication and also ensures security.
Functions of Layer 5 :
• Session establishment, maintenance and termination: The layer allows
the two processes to establish, use and terminate a connection.
• Synchronization : This layer allows a process to add checkpoints which are
considered as synchronization points into the data. These synchronization
point help to identify the error so that the data is re-synchronized
properly, and ends of the messages are not cut prematurely and data loss
is avoided.
• Dialog Controller : The session layer allows two systems to start
communication with each other in half-duplex or full-duplex.
• Authentication: Authentication is a process of verifying the user.
Authorization: Authorization is the process of determining the user's
authority to access the data.
• All the below 3 layers(including Session Layer) are integrated as a single
layer in the TCP/IP model as “Application Layer”.
• Implementation of these 3 layers is done by the network application itself.
Presentation Layer – Layer 6
• Presentation layer is also called the Translation layer.
• The data from the application layer is extracted here
and manipulated as per the required format to
transmit over the network.

Functions of Layer 6:
• Translation : For example, ASCII to EBCDIC.
• Encryption/ Decryption : Data encryption translates
the data into another form or code. The encrypted
data is known as the cipher text and the decrypted
data is known as plain text. A key value is used for
encrypting as well as decrypting data.
• Compression: Reduces the number of bits that need
to be transmitted on the network.
Application Layer – Layer 7
• At the very top of the OSI Reference Model stack
of layers, we find Application layer which is
implemented by the network applications.
• These applications produce the data, which has
to be transferred over the network.
• This layer also serves as a window for the
application services to access the network and for
displaying the received information to the user.
• Application – Browsers, Skype Messenger etc.
• Application Layer is also called as Desktop Layer.
Functions of Layer 7
• Network Virtual Terminal – remote host login e.g help of Telnet
• Enables FTAM(File transfer access and management)
• Mail Services
• Directory Services
• Web Surfing

OSI model acts as a reference model and is not


implemented in the Internet because of its late
invention.
Current model being used is the TCP/IP model.
Communication of hosts with OSI
• The OSI model is a standard “reference model” created by
an International Organization for Standardization (ISO) to
describe how software and hardware components involved
in network communication divide efforts and interact with
each other.
• The OSI model defines a seven-layer set of functional
elements, from physical interrelations at level 1 (physical
layer) up to layer 7 (application layer). Transmission Control
Protocol (TCP) and Internet Protocol (IP) are two network
standards that define the Internet. IP defines how
computers can receive data from each other on a mutually
connected set of networks. TCP defines how such networks
can have more reliable channels of communication.
Need for Layers in the OSI
1. The approach of establishing a link between two devices for
communicating and sharing information is complex. Generating
profitable communication takes many tasks. A network
architecture needs to be developed to perform all these
functions.

2. In network architecture, various tasks and functions are


classified into related and manageable sets called LAYERS.
Network architecture can be defined as a set of protocols that
describe how each layer functions. Protocols are hidden in the
OSI model and are easily changed as technology changes.

3. Intermediate systems require only a few layers and not all


layers. Protocol layering enables us to design the system or device
to which the consecutive layers are placed. It also allows services
to be distinct from implementation.
OSI Layers in Communication
TCP/IP Model
• The first layer is the Process/Application layer
on the behalf of the sender and Network
Access/link layer on the behalf of the receiver.

• During this course, we are talking on behalf of


the receiver.
TCP/IP Model
• The OSI Model is just a reference/logical model. It
was designed to describe the functions of the
communication system by dividing the
communication procedure into smaller and simpler
components.
• But when we talk about the TCP/IP model, it was
designed and developed by Department of Defense
(DoD) in 1960s and is based on standard protocols.
• It stands for Transmission Control Protocol/Internet
Protocol.
• The TCP/IP model is a concise version of the OSI
model.
• It contains four layers, unlike seven layers in the OSI
model.
TCP/IP Layers
• Process/Application Layer
• Host-to-Host/Transport Layer
• Internet Layer
• Network Access/Link Layer
Network Access Layer – Layer 1
• This layer corresponds to the combination of Data
Link Layer and Physical Layer of the OSI model.
• It looks out for hardware addressing and the
protocols present in this layer allows for the physical
transmission of data.
• We just talked about ARP being a protocol of Internet
layer, but there is a conflict about declaring it as a
protocol of Internet Layer or Network access layer.
• It is described as residing in layer 3, being
encapsulated by layer 2 protocols.
Internet Layer – Layer 2
• This layer parallels the functions of OSI’s Network layer.
• It defines the protocols which are responsible for logical
transmission of data over the entire network.

• The main protocols residing at this layer are :


• IP(Internet Protocol) is responsible for delivering packets from
the source host to the destination host by looking at the IP
addresses in the packet headers. IP has 2 versions:IPv4 and IPv6.
• ICMP(Internet Control Message Protocol) is encapsulated within
IP datagrams and is responsible for providing hosts with
information about network problems.
• ARP(Address Resolution Protocol). Its job is to find the hardware
address of a host from a known IP address. ARP has several
types: Reverse ARP, Proxy ARP, Gratuitous ARP and Inverse ARP.
Transport Layer – Layer 3
• This layer is analogous to the transport layer of the OSI model.
• It is responsible for end-to-end communication and error-free
delivery of data. It shields the upper-layer applications from the
complexities of data.
• The two main protocols present in this layer are :
• Transmission Control Protocol (TCP) – It is known to provide
reliable and error-free communication between end systems. It
performs sequencing and segmentation of data. It also has
acknowledgment feature and controls the flow of the data
through flow control mechanism. It is a very effective protocol
but has a lot of overhead due to such features. Increased
overhead leads to increased cost.
• User Datagram Protocol (UDP) – On the other hand does not
provide any such features. It is the go-to protocol if your
application does not require reliable transport as it is very cost-
effective. Unlike TCP, which is connection-oriented protocol, UDP
is connectionless.
Application Layer – Layer 4
• This layer performs the functions of top three
layers of the OSI model:
• It is responsible for node-to-node communication
and controls user-interface specifications.
• Some of the protocols present in this layer are:
HTTP, HTTPS, FTP, TFTP, Telnet, SSH, SMTP, SNMP,
NTP, DNS, DHCP, NFS, X Window, LPD.
Differs of TCP/IP and OSI
TCP/IP OSI

Refers to Transmission Control Protocol Refers to Open System Interconnection

Has 4 Layers Has 7 Layers

It is more Reliable It is less Reliable

Does not have strict boundaries Has strict boundaries

Follows a horizontal approach Follows a vertical approach

Uses both session and presentation in Uses different session and presentation
application layer itself layers

Developed protocols then model Developed model then protocols


Packet Tracer – Lab 2
• How to use Packet Tracer.
Questions

You might also like