0% found this document useful (0 votes)
49 views11 pages

Unit 6

The document provides an overview of the OSI and TCP/IP models, detailing their respective layers and functions. The OSI model consists of seven layers, each with specific roles in data communication, while the TCP/IP model has four layers designed for practical internet communication. Key differences include the number of layers, layer functionality, and real-world application, with TCP/IP being the standard for modern networking.

Uploaded by

chirag240302
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)
49 views11 pages

Unit 6

The document provides an overview of the OSI and TCP/IP models, detailing their respective layers and functions. The OSI model consists of seven layers, each with specific roles in data communication, while the TCP/IP model has four layers designed for practical internet communication. Key differences include the number of layers, layer functionality, and real-world application, with TCP/IP being the standard for modern networking.

Uploaded by

chirag240302
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/ 11

2.

2 Layers in the OSI Model

The OSI (Open Systems Interconnection) model is a conceptual framework used to understand network
interactions in seven layers. These layers work together to facilitate data communication between devices
in a network, and each layer has a specific function.

2.2.1 Overview of the OSI Model Layers

The OSI model consists of 7 layers as follows:

1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer

These layers are stacked vertically, with each layer serving the one above it while being served by the one
below it. Each layer provides a service to the layer above and relies on the service provided by the layer
below.

2.2.2 Layer 1: The Physical Layer

The Physical Layer is the lowest layer of the OSI model. It deals with the transmission and reception of
unstructured raw data (bits) over a physical medium. The main goal of the Physical Layer is to send and
receive electrical, optical, or radio signals through the physical medium, such as cables or wireless
systems.

Functions of the Physical Layer:

Data Encoding: Converts raw binary data into signals suitable for transmission over the physical
medium. For example, turning binary 0s and 1s into electrical signals.
Transmission Techniques: It determines whether data is transmitted as baseband (digital signals)
or broadband (analog signals).
Physical Medium Transmission: Specifies the type of cables or wireless systems used to carry the
signals, e.g., fiber optics, coaxial cables, or Wi-Fi.

Examples:

Ethernet cables: Used for wired network connections.


Wi-Fi: Wireless transmission of data.
USB cables: For data transmission between devices.

2.2.3 Layer 2: The Data Link Layer

The Data Link Layer ensures error-free transfer of data frames between devices on the same network.
It packages the raw bits from the Physical Layer into frames, ensuring that data is correctly transmitted.
Functions of the Data Link Layer:

Frame Traffic Control: Manages the flow of data and prevents overflow.
Error Checking: Ensures data integrity by checking for errors and retransmitting if necessary.
Frame Sequencing: Ensures the correct order of frames.
Access Control: Determines when a device can access the network.
Frame Acknowledgment: Confirms receipt of data.
Link Establishment and Termination: Establishes and terminates communication between
devices.

Examples:

Ethernet: A common data link protocol.


Wi-Fi (802.11): Wireless data link protocol.
PPP (Point-to-Point Protocol): Used for direct connections between two devices.

Data Link Sub-layers:

1. Logical Link Control (LLC): Manages traffic control and error control.
2. Media Access Control (MAC): Determines how devices access the transmission medium.

2.2.4 Layer 3: The Network Layer

The Network Layer is responsible for routing data across different networks. It ensures that data is
transferred from the source to the destination, even if those devices are on different networks. This layer
is key to routing and addressing.

Functions of the Network Layer:

Routing: Determines the best path for data to travel across networks.
Addressing: Assigns logical addresses (such as IP addresses) to devices.
Fragmentation and Reassembly: If the data packet size exceeds the network's maximum size, it is
fragmented and reassembled at the destination.
Error Handling: Reports delivery errors.

Examples:

IP (Internet Protocol): A key protocol in the Network Layer for addressing and routing.
Routers: Devices that operate at the Network Layer and forward data based on IP addresses.

2.2.5 Layer 4: The Transport Layer

The Transport Layer ensures end-to-end communication reliability. It provides mechanisms for data
flow control, error correction, and data segmentation. It allows the application layers to transfer data
reliably or with minimal overhead, depending on the protocol.

Functions of the Transport Layer:

Segmentation: Divides large data into smaller segments for transmission.


Flow Control: Regulates the rate of data transfer to prevent congestion.
Error Control: Ensures the data is received correctly; retransmits data if necessary.
Reliable Data Transfer: Guarantees delivery of data through protocols like TCP.

Examples:

TCP (Transmission Control Protocol): Provides reliable, connection-oriented communication.


UDP (User Datagram Protocol): Offers connectionless communication, used where speed is
prioritized over reliability.

2.2.6 Layer 5: The Session Layer

The Session Layer manages the sessions between applications on different devices. It ensures that data
is properly organized and synchronized between communicating applications, making sure that data
flows without interruption.

Functions of the Session Layer:

Session Establishment: Initiates, manages, and terminates sessions between applications.


Synchronization: Ensures the data flow between two devices is in sync.
Dialog Control: Determines whether communication is half-duplex or full-duplex.

Examples:

RPC (Remote Procedure Call): A session protocol for remote communication.


NetBIOS (Network Basic Input/Output System): Provides session management in a local network.

Types of Sessions:

Simplex: Data flows in one direction only (e.g., radio transmissions).


Half-Duplex: Data flows in both directions, but not simultaneously (e.g., walkie-talkies).
Full-Duplex: Data flows in both directions simultaneously (e.g., telephones).

2.2.7 Layer 6: The Presentation Layer

The Presentation Layer is responsible for translating data into a format that the application layer can
understand. It deals with the syntax and semantics of the data, such as encryption, compression, and
translation between different data formats.

Functions of the Presentation Layer:

Data Translation: Converts data between different formats (e.g., from ASCII to EBCDIC).
Data Encryption/Decryption: Provides security through encryption.
Data Compression: Compresses data to reduce size and improve efficiency.

Examples:

SSL/TLS (Secure Sockets Layer/Transport Layer Security): Encryption protocols.


JPEG, GIF: Image formats handled by this layer.

2.2.8 Layer 7: The Application Layer


The Application Layer is the closest to the end user and interacts directly with application software. It
defines the protocols that allow user-facing applications to access the network services.

Functions of the Application Layer:

Resource Sharing: Allows access to remote resources (e.g., files, printers).


Network Management: Helps manage network activities, like monitoring or reporting.
Application Support: Provides services for applications such as email, web browsing, and file
transfer.

Examples:

HTTP (Hypertext Transfer Protocol): Used for web browsing.


SMTP (Simple Mail Transfer Protocol): Used for sending emails.
FTP (File Transfer Protocol): Used for transferring files.

Key Takeaways

The Physical Layer focuses on raw data transmission.


The Data Link Layer provides error-free communication and access control.
The Network Layer is responsible for addressing, routing, and packet delivery.
The Transport Layer manages end-to-end data transfer reliability.
The Session Layer ensures the organization of data and communication sessions.
The Presentation Layer handles data translation, encryption, and compression.
The Application Layer supports user applications and provides network services.

Practice Questions

1. What is the function of the Data Link Layer, and what are its key sub-layers?
2. How does the Transport Layer handle data flow control to prevent congestion?
3. Explain the difference between full-duplex and half-duplex communication.
4. Why is the Presentation Layer important for application communication?

2.3 TCP/IP Model

The TCP/IP model is a set of communication protocols that powers the internet. It is more practical and
directly used for real-world networking than the OSI model. The TCP/IP model is typically described
using four layers, though some variations may include the Physical Layer.

The four layers are:

1. Application Layer
2. Transport Layer
3. Internet Layer
4. Network Access Layer

2.3.1 Layers in the TCP/IP Model


The TCP/IP model has fewer layers than the OSI model and is designed specifically to support internet
communication. While the OSI model is more theoretical, the TCP/IP model is directly applicable to the
Internet’s structure.

Here’s a comparison of the layers between OSI and TCP/IP:

OSI’s Application Layer corresponds to TCP/IP’s Application Layer.


OSI’s Transport Layer corresponds to TCP/IP’s Transport Layer.
OSI’s Network Layer corresponds to TCP/IP’s Internet Layer.
OSI’s Data Link and Physical Layers are combined in the TCP/IP Network Access Layer.

The TCP/IP model focuses on the data flow across the internet and how different devices (hosts)
interact with each other.

2.3.2 TCP/IP Application Layer

The Application Layer is the topmost layer in the TCP/IP model, which interfaces directly with user
applications. It is responsible for enabling communication between software applications running on
different hosts within a network.

Functions of the Application Layer:

Defines network services that applications use for communication.


Provides communication services for end-user applications, including services like email, file
transfer, and web browsing.
Identifies and establishes the application protocol used for communication (e.g., HTTP, FTP, SMTP).
Application interfaces are provided by the software running at this layer.

Common Protocols at the Application Layer:

HTTP (Hypertext Transfer Protocol): Used for web browsing (port 80).
FTP (File Transfer Protocol): Used for file transfer (ports 20/21).
SMTP (Simple Mail Transfer Protocol): Used for sending emails (port 25).
DNS (Domain Name System): Used for resolving domain names to IP addresses (port 53).
POP3 (Post Office Protocol 3): Used for retrieving emails from a mail server (port 110).

Examples:

Web Browsing: When you type a URL in a browser, it uses HTTP to communicate with a web server.
Email Sending: SMTP is used to send emails from your email client to the mail server.

2.3.3 TCP/IP Transport Layer

The Transport Layer in the TCP/IP model is responsible for providing reliable data transfer between two
hosts. This layer ensures that data is properly transmitted over the network and is reliable and in the
correct sequence.

Functions of the Transport Layer:


Segmentation: The Transport Layer divides data into smaller packets (segments) that are easier to
manage and transmit.
Flow Control: Manages data transfer rate to prevent congestion at the receiving end.
Error Control: Detects and corrects errors that may occur during data transmission.
End-to-End Communication: Provides reliable communication between applications on two
different hosts.

Common Protocols at the Transport Layer:

TCP (Transmission Control Protocol): Provides reliable, connection-oriented communication. It


ensures that data is delivered in the correct order and retransmits lost data. It also handles flow
control, error detection, and retransmission of lost data.
Example: HTTP, which is used for web browsing, runs over TCP to ensure data is transferred
reliably.
UDP (User Datagram Protocol): A connectionless, unreliable protocol that does not ensure data
reliability. It is used in applications where speed is more critical than reliability.
Example: Streaming services use UDP for real-time video or audio transmission.

2.3.4 TCP/IP Internet Layer

The Internet Layer is responsible for routing data packets across different networks and ensuring that
data reaches its destination, even if the destination is across multiple intermediate networks.

Functions of the Internet Layer:

Packet Routing: Routes data across different networks, determining the best path for data
transmission.
Addressing: Assigns logical addresses to devices (IP addresses).
Packet Delivery: Ensures that packets reach the correct destination based on their IP address.
Error Reporting: Handles reporting of errors in packet delivery.

Common Protocols at the Internet Layer:

IP (Internet Protocol): Responsible for packet addressing and routing. It defines the logical
addressing scheme used for routing data across networks.
Example: IPv4 and IPv6 are the two versions of the Internet Protocol, with IPv4 being more
widely used.
ICMP (Internet Control Message Protocol): Used for error reporting and diagnostic functions.
Example: Ping uses ICMP to test network connectivity.
ARP (Address Resolution Protocol): Resolves IP addresses to MAC (Media Access Control)
addresses on local networks.
Example: When a device needs to send data to another device on the same network, ARP helps
map the destination IP address to the MAC address.

2.3.5 TCP/IP Network Access Layer

The Network Access Layer (also called the Link Layer or Data Link Layer) defines the protocols used to
access the physical network medium. It handles the physical transmission of data, including how data is
formatted and transmitted over a specific type of network.

Functions of the Network Access Layer:

Physical Transmission: Responsible for transmitting raw bits over a physical medium (e.g., cables,
fiber optics, wireless).
Data Framing: Data is framed into packets or frames at this layer before being sent across the
physical medium.
Media Access Control: Ensures that devices on the network have access to the transmission
medium without conflicts.

Protocols at the Network Access Layer:

Ethernet: The most common LAN (Local Area Network) protocol for wired communication.
Wi-Fi (Wireless Fidelity): Used for wireless communication between devices.
PPP (Point-to-Point Protocol): Used for direct communication between two devices, often used in
dial-up or VPN connections.
Frame Relay: A WAN protocol used for transferring data over wide-area networks.

Key Takeaways

TCP/IP Model: A practical and widely adopted networking model with 4 layers: Application,
Transport, Internet, and Network Access.
Application Layer: Facilitates communication between user applications, with protocols like HTTP
and FTP.
Transport Layer: Ensures reliable data transfer with protocols like TCP and UDP.
Internet Layer: Responsible for routing and addressing, with protocols like IP and ICMP.
Network Access Layer: Handles the physical transmission of data, including Ethernet and Wi-Fi.

Practice Questions

1. What is the primary role of the Transport Layer in the TCP/IP model?
2. Which protocol is used in the TCP/IP model for error reporting and diagnostic functions?
3. Explain the key difference between TCP and UDP.
4. What is the function of the Internet Protocol (IP) at the Internet Layer?

2.4 Comparison of OSI and TCP/IP Models

The OSI (Open Systems Interconnection) model and TCP/IP model are both essential for
understanding networking. However, they differ in terms of their structure, functionality, and real-world
application. Here's a comparison of the two:

Similarities Between OSI and TCP/IP Models:

Layered Approach: Both models use a layered structure to explain networking functions. Each layer
performs specific tasks and relies on the layers below it to provide its services.
Application Layer: Both models feature a layer responsible for user application interactions (in OSI,
it's Layer 7; in TCP/IP, it's the Application Layer).
Transport Layer: Both models have a transport layer, which manages end-to-end communication
between devices.
Use of Protocols: Both models depend on protocols to function properly, such as HTTP, FTP, TCP, IP,
etc.

Differences Between OSI and TCP/IP Models:

1. Number of Layers:
OSI: 7 layers (Physical, Data Link, Network, Transport, Session, Presentation, Application).
TCP/IP: 4 layers (Application, Transport, Internet, Network Access).
2. Layer Functionality:
OSI is a conceptual framework used for understanding how different networking processes
work.
TCP/IP is more practical and was designed for real-world networking, particularly for the
internet.
3. Layer Grouping:
OSI divides functions into distinct layers (Presentation and Session are separate from
Application).
TCP/IP combines several OSI layers (Session, Presentation, and Application) into a single
Application Layer.
OSI has a separate Data Link Layer for framing data, while TCP/IP includes this within the
Network Access Layer.
4. Protocol Dependency:
OSI is protocol-independent and can support any protocol in its layers.
TCP/IP is protocol-dependent, using specific protocols like TCP, IP, UDP, and others.
5. Real-World Usage:
OSI is used primarily as a theoretical model to understand networking concepts.
TCP/IP is the de facto standard for modern network communication, particularly the internet.

2.5 TCP/IP Protocols

The TCP/IP model is powered by a range of protocols that work at different layers to ensure reliable
communication across networks. Let’s explore the key protocols at each layer of the TCP/IP model.

2.5.1 Application Layer Protocols

The Application Layer is the topmost layer in the TCP/IP model and directly interacts with the user's
application software. It includes a variety of protocols that enable different types of network
communication.

Key Protocols at the Application Layer:

1. HTTP (Hypertext Transfer Protocol):


Used for web browsing.
Port: 80
Example: When you open a website, your browser communicates with the web server via HTTP
to fetch the requested pages.
2. FTP (File Transfer Protocol):
Used for transferring files between systems.
Ports: 20 (Data), 21 (Control)
Example: FTP is commonly used to upload or download files from a remote server.
3. SMTP (Simple Mail Transfer Protocol):
Used for sending emails.
Port: 25
Example: When you send an email, SMTP ensures it is delivered to the recipient's mail server.
4. POP3 (Post Office Protocol 3):
Used for retrieving emails from a mail server.
Port: 110
Example: POP3 allows email clients to download messages from a server so they can be read
offline.
5. DNS (Domain Name System):
Translates domain names (e.g., www.example.com) to IP addresses.
Port: 53
Example: DNS helps resolve a web address (like google.com) into an IP address that can be used
to access the server.
6. Telnet:
Used for remote login to devices over a network.
Port: 23
Example: Telnet is used to access a device's command-line interface remotely.
7. SNMP (Simple Network Management Protocol):
Used for managing and monitoring network devices.
Port: 161
Example: SNMP helps network administrators monitor the health and performance of devices
like routers and switches.
8. SSH (Secure Shell):
A secure alternative to Telnet for remote login.
Port: 22
Example: SSH is used for secure communication with remote servers over the internet.

2.5.2 Transport Layer Protocols

The Transport Layer is responsible for end-to-end communication, ensuring that data is transferred
reliably across the network. It handles data segmentation, error control, flow control, and more.

Key Protocols at the Transport Layer:

1. TCP (Transmission Control Protocol):


A connection-oriented protocol that ensures reliable communication.
Key features: Error detection, reliable data delivery, flow control, and segmentation.
Example: HTTP traffic runs over TCP to ensure that web pages are loaded reliably and in order.
2. UDP (User Datagram Protocol):
A connectionless protocol, offering faster transmission but without error detection or
correction.
Key features: No error control, no flow control, and faster transmission.
Example: Streaming video or real-time voice communications use UDP to minimize latency.
2.5.3 Internet Layer Protocols

The Internet Layer is responsible for routing data packets to their correct destination, whether it’s
within a local network or across the internet. This layer handles addressing, packet forwarding, and error
reporting.

Key Protocols at the Internet Layer:

1. IP (Internet Protocol):
IPv4: The most widely used version of IP, which uses 32-bit addresses.
IPv6: The newer version of IP, using 128-bit addresses to provide a larger address space.
Example: IP is responsible for routing data between devices on different networks.
2. ICMP (Internet Control Message Protocol):
Used for error reporting and diagnostics.
Example: The Ping utility uses ICMP to check network connectivity by sending echo requests and
receiving replies.
3. ARP (Address Resolution Protocol):
Resolves IP addresses to MAC addresses in a local network.
Example: When a device needs to send a packet to another device on the same local network, ARP
is used to find the MAC address corresponding to an IP address.
4. RARP (Reverse Address Resolution Protocol):
Resolves MAC addresses to IP addresses (opposite of ARP).
Example: Used by diskless workstations to find out their IP address during boot.
5. IGMP (Internet Group Management Protocol):
Manages multicast group memberships.
Example: IGMP is used in video streaming to manage which devices want to receive multicast
streams.

Key Takeaways

OSI vs. TCP/IP: OSI is a theoretical model with 7 layers, while TCP/IP is a practical model with 4
layers. TCP/IP is widely used in real-world networking, including the internet.
TCP/IP Application Layer: Includes protocols like HTTP, FTP, and SMTP that directly interact with
end-user applications.
Transport Layer: Ensures reliable or efficient data transfer with TCP and UDP.
Internet Layer: Handles routing and addressing with protocols like IP and ICMP.
Network Access Layer: Deals with physical data transmission protocols such as Ethernet and Wi-Fi.

Practice Questions

1. What is the main difference between TCP and UDP? Provide examples of when each would be
used.
2. How does DNS help with network communication?
3. Explain the role of ICMP in networking.
4. What is the purpose of ARP, and how does it work?

You might also like