You are on page 1of 11

Republic of the Philippines

POLYTECHNIC UNIVERSITY OF THE PHILIPPINES


Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

Kim Cedric A. Rodriguez BSECE 3-1

Practical Assignment: Exploring the OSI Model

I. Introduction
To comprehend how many protocols and technologies cooperate to enable
network communication, one useful conceptual framework is the OSI (Open Systems
Interconnection) model. It separates network communication into seven tiers which are
the physical, data link, network, transport, session, presentation and application layer,
each with distinct roles and duties. To troubleshoot network problems, optimize
performance, and build effective networks, it is a great experience for us students to have
a thorough understanding of these layers.
In this experiment, we use Wireshark, a powerful network protocol analyzer, to
explore and understand the role of each layer in the OSI model through practical
exploration. Wireshark allows us to capture and analyze network traffic, providing insights
into the protocols and data exchanges happening at each layer of the OSI model.
We are also able to explore how data moves through the OSI layers through
practical exercises with Wireshark, starting at the Physical Layer—where data is sent as
electrical or optical signals—and working our way up to the Application Layer, where data
is seen to the user. We examined how protocols at each layer cooperate to facilitate
dependable and effective communication, as well as how each layer adds its own header
information to the data as it moves across the network.
It is a good way of experiencing how the OSI model and how each layer contributes
to the entire process of network communication. Additionally, it makes us skilled at using
Wireshark as a tool for troubleshooting and network analysis.
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

II. Methodology
1. Setting Up Wireshark: Install Wireshark on a computer connected to a network. Ensure
that the computer has network connectivity and can capture packets.
2. Capturing Packets: Start Wireshark and select the network interface through which you
want to capture packets in my case I chose Wi-Fi. Begin capturing packets by clicking on
the "Start" button in Wireshark.
3. Generating TCP Traffic: Generate TCP traffic by accessing a website, sending an email,
or performing any other network activity that uses TCP. This will generate TCP packets
that Wireshark will capture.
4. Analyzing OSI Layers:
• Physical Layer: Analyze the Physical Layer by examining the Ethernet frame.
Look at the source and destination MAC addresses, frame length, and other
physical layer attributes.
• Data Link Layer: Examine the Data Link Layer by inspecting the Ethernet header.
Identify the type of Ethernet frame and any additional information added by the
data link layer.
• Network Layer: Investigate the Network Layer by examining the IP header.
Identify the source and destination IP addresses, IP version, TTL (Time to Live),
and other network layer parameters.
• Transport Layer: Analyze the Transport Layer by inspecting the TCP header.
Identify the source and destination port numbers, sequence numbers,
acknowledgment numbers, and TCP flags.
• Application Layer: Finally, examine the Application Layer by looking at the
payload of the TCP packet. This could be the contents of a web page, an email
message, or any other application data.
5. Interpreting Results: Use the captured packets to understand how data flows through
the OSI layers in a TCP packet. Look for patterns and anomalies that can help you
understand the behavior of the network and the protocols involved.
6. Documenting Findings: Record the findings, including observations about each OSI
layer and how they contribute to the overall communication process. Note any challenges
faced during the analysis and how they were overcome.
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

7. Concluding Remarks: Summarize the experiment, highlighting the importance of


understanding the OSI model and how Wireshark can be used as a tool for network
analysis. Reflect on the insights gained from the experiment and how they can be applied
in real-world scenarios.
III. Analysis

Layer 1: Physical Layer


An essential function of the Physical Layer, the first of the OSI model's seven layers, is to
define the requirements for creating, preserving, and severing physical connections between
networked devices. It includes many different things, like the kind of physical medium—copper
wires, fiber-optic cables, or wireless transmission—that is utilized for communication. The
Physical Layer also controls bit synchronization between sender and recipient, establishes the
transmission rate, and describes how binary data is encoded into signals for transmission. Along
with defining the physical network topology and bit order, it also addresses noise, signal
attenuation, and strength on the communication channel to guarantee dependable data
transmission. The Physical Layer in wireless communication is in charge of demodulating
received analog waveforms back into digital signals and modulating digital signals into analog
waveforms for transmission. In general, the Physical Layer creates the physical link and controls
the technical parts of data transfer within a network.
The actual TCP packet in Wireshark does not directly represent the Physical Layer. The
physical layer details, such as voltage levels, cabling, and physical medium characteristics, are
not captured by Wireshark since it only records packets at the data link layer (Layer 2) and higher.
Typically, Wireshark begins capturing at the frame level of an Ethernet or other data link
layer connection, which comprises the payload and the Ethernet header which contains source
and destination MAC addresses. If it's an IP packet, the TCP header and IP header with the
source and destination IP addresses are included in the payload. Information such as source and
destination port numbers, sequence numbers, acknowledgment numbers, and TCP flags are all
contained in the TCP header. Therefore, even though Wireshark doesn't display Physical Layer
details directly, it can capture and display data from the Data Link Layer and higher, including TCP
headers for TCP packets.
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

Layer 2: Data Link


The Data Link Layer performs a number of vital tasks that are essential to network
communication. One of its main responsibilities is managing physical addressing, which involves
identifying devices inside a local network uniquely using MAC (Media Access Control) addresses.
The Data Link Layer also controls access to the actual network media, making sure that data can
only be transmitted by one device at a time to prevent collisions. Additionally, it has detection and
frame delimiting capabilities, which aid in helping devices recognize the limits of data frames.
Additionally, the layer manages error detection and treatment, ensuring data integrity via methods
like checksums and automatic repeat requests (ARQ). Managing the data flow between devices
to avoid congestion and guarantee effective data transmission is another crucial role, known as
flow control. Furthermore, especially in shared media environments such as Ethernet, the Data
Link Layer controls how devices access the network medium. Lastly, it has the Logical Link
Control (LLC) sublayer, which, regardless of the network technology in use, offers frame
synchronization, flow control, and error control. All things considered, the Data Link Layer is
essential for maintaining dependable point-to-point and point-to-multipoint communication,
controlling access to the actual network medium, and offering error detection and correction tools.

The TCP packet in Wireshark is encapsulated by the Ethernet frame, which is the Data
Link Layer. For local network delivery, the source and destination MAC addresses are contained
in the Ethernet header, which is a part of the Ethernet frame. IP packets (0x0800) are the payload
type indicated in the Ethernet Type field. Critical data such as source and destination port
numbers, sequence and acknowledgment numbers, and TCP flags are contained in the TCP
header, which is part of the IP packet. Through accurate routing and delivery of data, this header
promotes dependable data transfer. And lastly, the actual sent data, such files, emails, and web
pages, is carried by the TCP data, also referred to as the payload.
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

Layer 3: Network
The Network Layer, as defined by the OSI model, is essential to network communication
because it offers services that make it easier for specified end devices to communicate with one
another via the network. Its main purpose is logical addressing, which is identifying devices on
the network individually and figuring out the optimum route for data transmission using logical
addressing, such IP addresses. Moreover, the Network Layer manages routing, employing
protocols and routing algorithms such as IP routing to determine the best route for data transfer
from the source to the destination across several networks. Along with these duties, it also
handles packet switching, disassembling data from the Transport Layer into packets, adding
headers—such as IP headers—for routing, and reassembling packets at the destination.

Additionally, the Network Layer controls congestion by keeping an eye on and preventing
network congestion through the implementation of technologies that slow down data transmission
when needed. In order to maintain data integrity during transmission, it also incorporates error
handling, which combines error detection and correction techniques. Network layer functions also
include internetworking, which defines common protocols and technologies to enable data flow
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

between disparate networks, hence facilitating communication. Moreover, when fragmentation of


packets is required because of network limitations, the Network Layer manages this process,
reassembling the packets at the destination. Broadly speaking, the Network Layer is in charge of
facilitating end-to-end communication, creating, preserving, and severing connections between
devices, and guaranteeing the efficient and reliable delivery of data across networks.

In Wireshark, the IP header is the main way that the Network Layer in a TCP packet is
represented. The IP header, which holds crucial data for the Network Layer, is visible within the
Ethernet frame when collecting packets on an IP network. The source and destination IP
addresses are included in this header, which is essential for directing IP packets between devices
connected to a local network or the internet. The IP header also includes data for the type of
service, checksum, header length, and IP protocol version. The TCP header is nested inside the
IP packet and contains information such as TCP flags, sequence and acknowledgment numbers,
source and destination port numbers, and more. For the TCP protocol to provide dependable data
transfer, several specifics are essential. The TCP data, or payload, carries the actual transmitted
data, such as web pages, emails, or files. This encapsulation within the IP packet and Ethernet
frame demonstrates how the Network Layer is represented in a TCP packet in Wireshark,
illustrating the process of routing and transmitting data between devices on a network.
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

Layer 4: Transport
In the OSI model, the Transport Layer is in charge of giving applications end-to-end
communication services. Segmentation and reassembly, which entails breaking up data from the
application layer into smaller chunks for transmission and reassembling them at the receiving
end, is one of its main purposes. Furthermore, connection control—which includes creating,
maintaining, and severing connections between apps—is handled by the Transport Layer. In
order to avoid overwhelming a slower receiver, this layer also manages flow management, which
controls the data flow between sender and receiver. To further guarantee data integrity, the
Transport Layer includes error detection and correction techniques like checksums and, in the
case of TCP, automatic retransmission of dropped packets. Multiplexing and demultiplexing,
which combines data from various applications into a single stream and then separates it at the
receiving end, is another crucial function that enables multiple programs to use the network
simultaneously.

Additionally, the Transport Layer allows numerous services to run simultaneously by


using protocol ports to identify distinct services or applications on the same device. Ensuring
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

dependable and effective data transfer between various devices is mostly dependent on the
Transport Layer, which handles tasks like flow control, error detection and repair, segmentation,
reassembly, connection management, and so forth.

The TCP header of a recorded TCP packet in Wireshark displays the Transport Layer,
which is represented by the TCP (Transmission Control Protocol). The source and destination
port numbers, sequence numbers, acknowledgment numbers, and TCP flags are among the
important details for the Transport Layer that are contained in this header. For TCP to reliably
handle the data transfer between sender and recipient, several details are necessary.
Encapsulated within the IP packet, which is housed within the Ethernet frame, is the TCP
segment. In order to route an IP packet between devices on a network, it is necessary to contain
both the source and destination IP addresses. In turn, the Ethernet frame supplies the physical
addressing required for local network delivery. The TCP data payload carries the actual
transmitted data, such as web pages, emails, or files. This layered representation in Wireshark
illustrates how the Transport Layer is encapsulated within the IP and Ethernet layers, enabling
reliable data transmission between devices on a network.
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

Layer 5: Session
The Session Layer is not clearly represented in a TCP packet in Wireshark. According to
the OSI model, by creating, maintaining, and ending sessions or connections, the Session Layer
is essential to enabling communication between apps. Session establishment is one of its main
purposes, enabling apps on various devices to start a session before data exchange takes place.
The Session Layer also oversees the continuous communication session, which includes data
sharing and application synchronization. Additionally, it manages data segmentation, which
involves breaking up data into smaller pieces for transmission and putting them back together at
the other end to guarantee effective and error-free communication. Session multiplexing—which
allows for many sessions or connections between several programs on the same device—is
another crucial function of the session layer that makes simultaneous communication possible.
Furthermore, the Session Layer controls the dialog between applications, ensuring that
each side takes turns sending data and responding to requests. Finally, the Session Layer is
responsible for gracefully terminating the session once the data exchange is complete, ensuring
that all resources allocated for the session are released properly. In summary, the Session Layer
plays a crucial role in facilitating efficient and reliable communication between applications by
managing the establishment, management, and termination of sessions or connections.

Layer 6: Presentation
In Wireshark, the Presentation Layer is not explicitly represented in a TCP packet but is
considered as an essential component of the OSI model. It is responsible for ensuring that data
transferred between computers is secure and readable. It serves as a translator, translating data
between the application layer's format and one that can be sent over a network. To guarantee
that data is provided in an accessible and useable format by the application layer, this entails
duties like converting between character encodings like ASCII and Unicode and between data
formats like XML and JSON.

Furthermore, data compression, which lowers the volume of data transferred over the
network and increases efficiency, is handled by the Presentation Layer. In addition, it manages
data encryption, guaranteeing safe data transmission and shielding it from unwanted access. In
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

essence, the Presentation Layer plays a crucial role in ensuring that data is exchanged efficiently,
securely, and in a format that can be understood by both the sending and receiving systems.

Layer 7: Application
The Presentation Layer is not clearly displayed in a TCP packet in Wireshark but according
to the OSI model, the Application Layer acts as a bridge between user applications and the
underlying network. Its main function is to give user applications direct access to network services,
allowing software operating on various devices to communicate and share data. To enable
application access to the network and data transmission, this layer communicates with the lower
layers (Transport, Network, Data Link, and Physical). Providing a user interface and services for
user interaction, structuring data for transmission and display, and providing different application-
level services including file transfers (FTP), web browsing (HTTP), email (SMTP), and remote
access (SSH) are some of the main duties performed by the Application Layer.
Additionally, the application Layer provides a network virtual terminal for remote login and
resource sharing capabilities, allowing users to share network resources like printers, files, and
databases. Overall, the Application Layer plays a critical role in enabling networked applications
to communicate, exchange data, and access network resources, thereby facilitating user
interaction with the network.

IV. Conclusion
In summary, this project offered a practical examination of the OSI model through the use of
the potent network protocol analyzer Wireshark. We were able to obtain a useful grasp of how
data moves via the OSI model's layers by recording and examining TCP packets.
This experiment showed us that the Data Link Layer (Layer 2) and higher are the starting
points for data that Wireshark gathers. This includes the Transport Layer (Layer 4), Network Layer
(Layer 3), and occasionally even the Application Layer (Layer 7). On the other hand, neither the
Presentation Layer (Layer 6) nor the Physical Layer (Layer 1) are directly captured by Wireshark.
We also saw how protocols at each layer cooperate to guarantee dependable and effective
communication, and how each layer adds its own header information to the data as it moves
across the network. For instance, we observed how the Network Layer controls packet switching
and routing, whereas the Transport Layer handles data fragmentation and reassembly.
Republic of the Philippines
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
Office of the Vice President for Academic Affairs
College of Engineering
Electronics Engineering (ECE) Department

All things considered, this exercise improved our knowledge of the OSI model and the ways
in which Wireshark may be utilized as a network analysis tool. We learned about the intricacies
of network communication and the crucial function that each layer plays in guaranteeing the
successful transfer of data across networks by investigating the OSI layers through hands-on
exercises.

You might also like