Module 2.2 Understanding Network Protocols
Module 2.2 Understanding Network Protocols
To
Greg & Co. ICT Limited
Cybersecurity
Module 2
Introduction to
Computer Networking
Protocols
© 2018 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use
as permitted in a license distributed with a certain product or service or otherwise on a password-protected website for
classroom use. 1
Understanding Network Protocols
Network: The big Picture
A network is a group of computers and other devices (such as printers) that
are connected by some type of transmission media. Variations on the
A network can be as small as two computers connected by a cable in a
home office or the largest network of all, the Internet, made up of billions of
computers and other devices connected across the world via a combination
of cable, phone lines, and wireless links.
Networks might link cell phones, personal computers, mainframe
computers, printers, corporate phone systems, security cameras, vehicles,
and wearable technology devices. They might communicate through copper
wires, fiber-optic cable, or radio waves.
Understanding Network Protocols
Operating systems, Applications, and Hardware
Operating systems, applications, and
hardware create, manage, and use a
network. From a bird’s-eye view, how
do they all work together?
An application, such as a browser,
depends on the operating system to
communicate across the network.
Operating systems, meanwhile,
depend on hardware to communicate
across the network.
Throughout the entire process,
protocols govern each layer of
communication.
Understanding Network Protocols
Operating systems, Applications, and Hardware
A browser and web server communicate by way of the operating system and hardware,
similar to how a letter is sent through the mail using the Postal Service and the road system.
Understanding Network Protocols
Operating systems, Applications, and Hardware
To get a better sense of how this
works, it’s helpful to think of a
different type of communication: two
people communicating by way of the
Postal Service.
The sender depends on the mailbox
to hold their letter until a postal
worker picks it up and takes it to the
post office.
The people at the post office, in turn,
depend on truck drivers to transport
the letter to the correct city. The truck
drivers, for their part, depend on the
road system.
Understanding Network Protocols
Operating systems, Applications, and Hardware
Throughout the entire process,
various protocols govern how people
behave. For example, the sender
follows basic rules for writing
business letters, the mail carriers
follow Postal Service regulations for
processing the mail, and the truck
drivers follow traffic laws.
Think of how complex it might be to
explain to someone all the different
rules or protocols involved if you
were not able to separate or
categorize these activities into layers.
Understanding Network Protocols
Software, Protocols, and Hardware Mapping to the Seven-layer OSI model
Early in the evolution of networking, a
seven-layer model was developed to
categorize the layers of
communication. This model, which is
called the OSI (Open Systems
Interconnection) reference model, is
illustrated on the right here.
Network engineers, hardware
technicians, programmers, and
network administrators still use the
layers of the OSI model to
communicate about networking
technologies. Here, you’ll learn to use
the OSI model to help you understand
networking protocols and
troubleshoot network problems.
Understanding Network Protocols
Software, Protocols, and Hardware Mapping to the Seven-layer OSI model
As you study various protocols used
in networking, it will help
tremendously to map each protocol
onto the OSI model. By doing so,
you’ll better understand the logistics
of which software program or device
is initiating and/or receiving the
protocol or data and how other
protocols are relating to it.
Now let’s take a brief look at each
layer in the OSI model. The layers are
numbered in descending order,
starting with Layer 7, the Application You need to memorize the seven layers of the OSI model.
layer, at the top. Here’s a seven-word mnemonic that can help, or you can
write your own: All People Seem To Need Data
Processing.
Understanding Network Protocols
Layer 7: Application Layer
The application layer in the OSI model does not contain
applications themselves, such as a web browser, but instead
describes the interface between two applications, each on
separate computers. There are several protocols used at this
layer, including HTTP, SMTP, POP3, IMAP4, DNS, FTP, Telnet,
SSH, and RDP. Application layer protocols are used by
applications that fall into two categories:
• Applications that provide services to a user, such as a browser and web server
using the HTTP application layer protocol
• Utilities that provide services to the system, such as SNMP (Simple Network
Management Protocol) programs that monitor and gather information about
network traffic and can alert network administrators about adverse conditions that
need attention.
Data that is passed between applications or utility programs and
the operating system is called a payload and includes control
information. The two end-system computers that initiate sending
and receiving data are called hosts.
Understanding Network Protocols
Layer 6: Presentation Layer
In the OSI model, the presentation layer is responsible for
reformatting, compressing, and/or encrypting data in a way that
the application on the receiving end can read. For example, an
email message can be encrypted at the presentation layer by
the email client or by the operating system.
Layer 5: Session Layer
The session layer of the OSI model describes how data
between applications is synced and recovered if messages
don’t arrive intact at the receiving application. For example, the
Zoom application works with the operating system to establish
and maintain a session between two endpoints.
The application, presentation, and session layers are so
intertwined that, in practice, it’s often difficult to distinguish
between them. Also, tasks for each layer may be performed by
the operating system or the application.
Understanding Network Protocols
Layer 4: Transport Layer
The transport layer is responsible for transporting application layer
payloads from one application to another. The two main transport
layer protocols are TCP, which guarantees delivery, and UDP, which
does not, as described next:
• TCP (Transmission Control Protocol)—Makes a connection with the
end host, checks whether the data is received, and resends it if it is
not. TCP is, therefore, called a connection-oriented protocol. TCP is
used by applications such as web browsers and email. Guaranteed
delivery takes longer and is used when it is important to know that the
data reached its destination.
• UDP (User Datagram Protocol)—Does not guarantee delivery because
it doesn’t maintain a connection to check whether data is received;
thus, UDP is called a connectionless protocol or best-effort protocol.
UDP is used for broadcasting, such as streaming video or audio over
the web, where guaranteed delivery is not as important as fast
transmission. UDP is also used to monitor network traffic.
Understanding Network Protocols
Layer 4: Transport Layer
Transport-layer protocols add control information in an area at the
beginning of the payload called the header to create a message ready
to be handed down to the network layer. The process of adding a
header to the data inherited from the layer above is called
encapsulation, which is kind of the same concept as putting a letter in
an envelope.
The transport layer header addresses the receiving application by a
number called a port. If the message is too large to transport in one
package across the network, TCP divides it into smaller messages
called segments, and in UDP, they’re called datagrams.
In the post office analogy, think of a message as a letter. The sender
puts the letter in an envelope and adds the name of the sender and
receiver, similar to how the transport layer encapsulates the payload
into a segment or datagram that identifies both the sending and
destination applications. However, this letter needs more addressing
information, not just the names of the sender and receiver. That’s the
job of lower OSI layers.
Understanding Network Protocols
Layer 3: Network Layer
The network layer, sometimes called the Internet layer, is responsible
for moving messages from one node to another until they reach the
destination host. This is the layer where routers typically function. The
principal protocol used by the network layer is IP (Internet Protocol).
IP adds its own network layer header to the segment or datagram, and
the entire network layer message is now called a packet. The network
layer header identifies the sending and receiving hosts by their IP
addresses. An IP address is an address assigned to each node on a
network, which the network layer uses to uniquely identify them across
multiple networks.
In the post office analogy, the network layer would be the trucking
system used by the post office and the IP addresses would be the full
return and destination addresses written on the envelope.
Understanding Network Protocols
Layer 3: Network Layer
IP relies on several supporting protocols to find the best route for a
packet when traversing several networks on its way to its destination.
These supporting protocols include ICMP (Internet Control Message
Protocol) and ARP (Address Resolution Protocol).
Along the way, if a network layer protocol is aware that a packet is
larger than the maximum size allowed for its network, it will divide the
packet into smaller packets in a process called fragmentation.
Understanding Network Protocols
Layer 2: Data Link Layer
Layers 2 and 1 are responsible for interfacing with the physical
hardware on the local network. The protocols at these layers are
programmed into the firmware of a computer’s NIC and other
networking hardware. Layer 2, the data link layer, is also commonly
called the link layer. The type of networking hardware or technology
used on a network determines the data link layer protocol used.
Examples of data link layer protocols are Ethernet and Wi-Fi. Ethernet
is used by switches on wired networks and Wi-Fi is used by access
points for wireless networks. Several types of switches exist. The
least intelligent (nonprogrammable) switches, which are called data
link layer switches or layer 2 switches, operate only at this layer.
More sophisticated switches might combine layer 2 functions with
higher-layer functions and are called layer 3 switches.
Understanding Network Protocols
Layer 2: Data Link Layer
The data link layer puts its own control information in a data link layer
header and also attaches control information to the end of the packet
in a trailer. The entire data link layer message is then called a frame.
The frame header contains the hardware addresses of the source and
destination NICs. This address is called a MAC (Media Access
Control) address, physical address, hardware address, or data link
layer address is embedded on every network adapter on the globe
These physical addresses are short-range addresses used only to find
nodes on the local network.
In the post office analogy, a truck might travel from one post office to
the next en-route to its final destination.
The address of a post office along the route would be similar to the
physical address of each device’s NIC that a frame reaches as it
traverses each LAN on its way to its destination.
Understanding Network Protocols
Layer 1: Physical Layer
Layer 1, the physical layer, is responsible for sending bits via a wired
or wireless transmission. These bits can be transmitted as
wavelengths in the air (for example, Wi-Fi), voltage on a copper wire
(for example, Ethernet on twisted-pair cabling), or light (for example,
Ethernet on fiber-optic cabling).
It’s interesting to consider that the higher layers of the OSI model work
the same for both wired and wireless transmissions. In fact, the only
layers that must deal with the details of wired versus wireless
transmissions are the data link layer and physical layer on the
firmware of the NIC. In the post office analogy, the data link and
physical layers compare with the various road systems a postal truck The term firmware refers
might use, each with its own speed limits and traffic rules, and any to programs embedded
into hardware devices.
flight systems a postal airplane might use, with its own processes and This software does not
flight traffic control. Whether a package stays on the ground or spends change unless a firmware
some time on a plane, the addressing rules for the sender and receiver upgrade is performed.
remain the same.
Understanding Network Protocols
Protocol Data Unit or PDU
There are several different names for a group of bits as it moves from one layer to
the next and from one LAN to the next. Although technicians loosely call this group
of bits a message or a transmission the technical name regardless of layer is PDU
(protocol data unit). The table below can help you keep straight all these names for
each layer.
Now let’s tie the layers together with the simple example shown in the figure above. This
transmission involves a browser and web server on their respective hosts, a switch, and a
router. As you follow the red line from browser to web server, notice the sending host
encapsulates the payload in headers and a trailer before sending it, much like an assistant
would place the boss’s business letter in an envelope before putting it in the mail.
Understanding Network Protocols
Summary of How the Layers Work Together
On the other end, the receiving host removes the headers and trailer in reverse order
before the message reaches the web server application, just as the receiver’s
assistant would remove the letter from the envelope before handing it to the recipient.
Removing a header and trailer from a lower layer’s PDU is called decapsulation.
Understanding Network Protocols
Steps through the OSI layers during a browser-to-web server transmission
Understanding Network Protocols
Steps through the OSI layers during a browser-to-web server transmission
Understanding Network Protocols
The TCP/IP model.
A four-layer model similar to the OSI model is
the TCP/IP model. Using the TCP/IP model,
the Application, Presentation, and Session
layers are wrapped together and are called the
Application layer. The Physical layer is so
simple, it’s ignored, which makes for four
layers:
Application layer, Transport layer, Internet layer
(the Network layer in the OSI model), and
Link layer (the Data Link layer in the OSI model).