0% found this document useful (0 votes)
6 views3 pages

Understanding OSI and TCP/IP Models

Network topology describes the interconnection of nodes in a network, crucial for penetration testers to understand alongside the OSI model, which outlines the data flow through seven layers. Each layer, from the physical to the application layer, plays a vital role in ensuring data transmission, and failure at any layer can disrupt connectivity. The TCP/IP model, a more efficient version with four layers, streamlines data transfer and is widely used in current network operations, while the three-way handshake is essential for establishing secure connections.

Uploaded by

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

Understanding OSI and TCP/IP Models

Network topology describes the interconnection of nodes in a network, crucial for penetration testers to understand alongside the OSI model, which outlines the data flow through seven layers. Each layer, from the physical to the application layer, plays a vital role in ensuring data transmission, and failure at any layer can disrupt connectivity. The TCP/IP model, a more efficient version with four layers, streamlines data transfer and is widely used in current network operations, while the three-way handshake is essential for establishing secure connections.

Uploaded by

cheepinapiganesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Network topology refers to the pattern of interconnection of nodes within a network,

describing how devices are physically or logically connected to share data and resources.
While configuring networks is typically the role of a network administrator, understanding
network topologies and related concepts like the OSI (Open System Interconnect) model is
crucial for a penetration tester.

The OSI reference model is not a protocol; rather, it is a model that describes how data
flows from one computer to another. It explains the journey of data, for example, when you
type "[Link]" on your system, and how it travels to a data center like Google San Diego.
The OSI model consists of seven distinct layers, which the data traverses sequentially.

Let's explore each layer of the OSI model, starting from the bottom (the physical layer) and
moving upwards:

 1. Physical Layer:
o This is the bottom-most layer.
o When you type something (e.g., "[Link]"), the computer understands
binary (zeros and ones). The processor converts human-understandable
language into binaries.
o The Network Interface Card (NIC), also known as an Ethernet card or LAN
port, is responsible for converting these binaries into electrical signals for
data transmission over a physical cable. If using Wi-Fi, it converts binaries
into frequency.
o The converted data is then passed to the cable.
 2. Data Link Layer:
o The cable connects to a networking device like a router, switch, or hub.
o This layer collects all necessary information, including the MAC address of
the device. The MAC address is a fixed address for every electronic device,
similar to an IMEI number for a mobile phone, unlike an IP address which can
be dynamic.
o It also determines the type of data being received.
 3. Network Layer:
o This layer deals with logical or IP addresses.
o Its primary function is to determine the best path to the destination. For
example, when traveling from Hyderabad to San Diego, it identifies the
shortest distance and time, ensuring efficient data routing.
o Networking devices communicate through IP addresses.
 4. Transport Layer:
o This layer defines ports and ensures reliability.
o After the data determines its path via the IP address, this layer checks if the
destination port number is open and ready to accept the connection.
o For example, for an HTTPS website, port 443 must be open; for HTTP, port
80; and for FTP, port 21.
 5. Session Layer:
o Once the IP address is identified and the port is ready, the session layer
establishes connectivity.
o It isolates individual sessions, ensuring that multiple users accessing the same
application (e.g., Facebook) only see their own data.
o It manages the session's start and end; a session might end upon logout or
after an idle timeout (e.g., 5 minutes for net banking applications).
 6. Presentation Layer:
o This layer handles the type of data being sent or received.
o It is responsible for encryption and decryption of data, especially for secure
connections like HTTPS.
o It also executes front-end and back-end code, displaying graphical
representations, flashes, and animations that users see. This layer effectively
prepares data for presentation to the application layer.
 7. Application Layer:
o This is the only layer visible to the user.
o It provides network access to applications, such as web browsers like Google
Chrome, Firefox, Opera, or Brave.
o All user interactions with a network start and end at this layer.

Importance and Connectivity It is critical to understand that if any single layer in the OSI
model fails to function, internet access or connectivity will be lost. The entire process,
from typing a request to receiving a response, happens within milliseconds. For example, if
each layer takes 1 millisecond, a request and response through all seven layers would take
approximately 14 milliseconds (7ms for the request, 7ms for the response).

TCP/IP Model: A Compressed Version Due to the increasing usage of the internet and a
need for faster data flow, an advanced, compressed version of the OSI model emerged,
known as the TCP/IP model. This model typically has four layers and aims to reduce the
time taken for data transfer. Unlike the sequential processing in OSI, the TCP/IP model
performs some jobs in parallel.

 Network Access Layer: Combines the functions of the Physical and Data Link
layers.
 Internet Layer: Renamed from the Network layer, as it's the first stage to go outside
the internal network.
 Transport Layer: Remains similar to the OSI Transport layer, dealing with ports and
reliability.
 Application Layer: Combines the Session, Presentation, and Application layers of
the OSI model.

This parallel processing significantly reduces the time taken for data transfer. For instance, in
the TCP/IP model, a request and response might take about 8 milliseconds (4ms each way),
representing almost a 90% decrease compared to the OSI model's 14 milliseconds. While all
current network operations utilize the TCP/IP model, the OSI model is still frequently
asked about in interviews as a fundamental concept.

Three-Way Handshake in TCP/IP Communication Before a session is established in


TCP/IP communication, a critical process known as the three-way handshake occurs. This
ensures that a genuine connection is made between the client and the server. The steps are as
follows:

1. The client sends a SYN (synchronize) packet to the server, which includes the
client's IP address and port number.
2. The server then responds with a SYN+ACK (synchronize-acknowledgement)
packet back to the client.
3. Finally, the client sends an ACK (acknowledgement) packet back to the server.
Once this three-way handshake is successfully completed, the session is established, and all
subsequent traffic (especially for HTTPS connections) will be encrypted.

Understanding these models is foundational for anyone in cybersecurity, especially ethical


hackers and penetration testers, as it provides insight into how networks are structured and
how data traverses them, which is essential for identifying potential vulnerabilities and
planning penetration tests.

You might also like