Lecture3 - Network Reference Models and Protocols
Lecture3 - Network Reference Models and 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?
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.
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.
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.
• 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
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.
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.
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
Uses both session and presentation in Uses different session and presentation
application layer itself layers