You are on page 1of 11

Department of Computer Science

Assignment Title:Assignment#2
Course Title:Data Communication and Network
Course Code: CS-205
Submitted By:M.Faiz ul Hassan
Registration No:21-UON-0929
Submitted To:Mr.Zishan Zafar
Dated: Thursday, July 20, 2023

University of Narowal

Page 1 of 11
Content:
 Introduction to TCP/IP Protocol Architecture
 Historical Background
 Importance and Adoption of TCP/IP
 Layers of the TCP/IP Protocol Stack
 Application Layer
 Transport Layer
 Internet Layer
 Link Layer
 Interaction between Layers
 Threats to TCP/IP Communication
 Summery

Page 2 of 11
Introduction to TCP/IP:
TCP/IP, which stands for Transmission Control Protocol/Internet Protocol, serves as the
foundation of the internet, enabling seamless communication between devices such as
computers, smartphones, and servers. Think of it as a language or a set of rules that
computers follow to interact and share information with one another.
The TCP component acts as a reliable messenger. It ensures that data transmitted from one
device to another arrives without errors and in the correct order. Imagine sending a letter
and receiving confirmation that it reached its destination accurately and without any issues.
On the other hand, IP functions like a street address. Its role is to route data packets to their
intended destinations. Similar to how a postal service finds the best route to deliver a letter,
IP determines the most efficient path for data to travel from your device to its intended
target.
TCP/IP plays a vital role in our daily internet activities. It allows us to browse the web, send
emails, stream videos, and engage in various online tasks. It operates behind the scenes, like
magic, making everything work smoothly. Thanks to TCP/IP, we can connect with people
worldwide and access a wealth of information at our fingertips. So, the next time you enjoy
the wonders of the internet, remember TCP/IP is the driving force that brings it all together.

Historic background:
The TCP/IP protocol architecture has its roots in the 1970s when the U.S. Department of
Defense funded research projects for creating a reliable communication system. This system
was meant for military and academic purposes and aimed to withstand partial outages and
prevent single points of failure. The result was the development of a network based on
packet switching, where data is divided into small packets and sent through the network
independently to its destination.

In 1969, the Advanced Research Projects Agency (ARPA) created ARPANET, the precursor to
the modern internet, which used packet-switching technology. The term "Internet" was first
used in 1972 when ARPANET was connected to the NPL network in England, establishing an
international connection.
Vinton Cerf and Robert Kahn's 1973 paper, "A Protocol for Packet Network
Intercommunication," laid out the principles of the TCP/IP protocol suite. This paper
introduced the Transmission Control Program (TCP) for reliable data transmission and the
Internet Protocol (IP) for routing packets across networks.

Page 3 of 11
TCP/IP became the standard networking protocol for ARPANET in 1980, and in 1983, it was
officially adopted as the protocol suite for the entire network. This date is considered a
crucial milestone in the history of the modern internet.
The commercialization of the internet began in the early 1990s, leading to an exponential
growth in users and the World Wide Web's proliferation. TCP/IP continued to evolve to
meet the internet's demands and has remained the dominant and universal protocol suite
for data communication and networking worldwide.

Importance and adoption of TCP/IP:


The adoption of TCP/IP is incredibly important as it has revolutionized the way we
communicate and share information. TCP/IP serves as the backbone of the internet,
allowing different devices like computers, smartphones, and tablets to talk to each other.
One significant advantage of TCP/IP is that it ensures reliable data transmission. Imagine
sending an important message, and you want to make sure it reaches the recipient without
any mistakes. TCP takes care of that, making sure data arrives correctly and in the right
order.
Another crucial aspect is IP, which is like an address system for the internet. Just like a
postal address helps a letter find its way to the correct destination, IP ensures that data
packets find the most efficient path to reach their intended target.

Thanks to TCP/IP, the internet has grown exponentially, connecting people from all over the
world. It has become the standard for networking, making it easier for devices to work
together and enabling a wide range of services, from sending emails to streaming videos
and much more.

Overall, the adoption of TCP/IP has been vital for the development and success of the
internet, making it an essential part of our daily lives and connecting us to the vast world of
information and possibilities.

LAYERS OF TCP/IP PROTOCOL STACK:


The TCP/IP protocol stack consists of four layers, and each layer has its specific role in
communication between devices. Let's break them down:

1. Link Layer (or Network Interface Layer): This is the lowest layer responsible for
handling the physical connection between devices on the same local network. It
takes care of sending data frames over physical mediums like Ethernet cables or Wi-

Page 4 of 11
Fi. Its main job is to make sure data travels reliably between nearby devices within
the same network.
2. Internet Layer: The Internet Layer contains the Internet Protocol (IP). Its primary
function is to route data packets across different networks to reach their final
destination. It decides the best path for data transmission and uses IP addresses to
manage addressing. Routers play a crucial role in this layer, as they forward data
packets based on destination IP addresses.
3. Transport Layer: The Transport Layer manages end-to-end communication between
applications running on different devices. It offers two significant protocols:
a. Transmission Control Protocol (TCP): TCP provides reliable, connection-oriented
communication. It ensures that data is delivered correctly and in the right order. Before
transferring data, TCP establishes a connection and handles flow control, error correction,
and retransmission if needed. Applications like web browsing, email, and file transfers use
TCP, where data accuracy is vital.
b. User Datagram Protocol (UDP): UDP provides connectionless communication, making it
faster but less reliable than TCP. It is suitable for real-time applications like video streaming
and online gaming, where some data loss or small delays are tolerable.
4. Application Layer: The Application Layer is the topmost layer, containing various
application-specific protocols. These protocols enable communication between
applications and services running on different devices. Examples of Application Layer
protocols include:
 Hypertext Transfer Protocol (HTTP): Used for web browsing.
 Simple Mail Transfer Protocol (SMTP): Used for sending emails.

 File Transfer Protocol (FTP): Used for file transfers.


 Domain Name System (DNS): Resolves domain names to IP addresses.
 Post Office Protocol version 3 (POP3) and Internet Message Access Protocol
(IMAP): Used for retrieving emails from a mail server.
Each layer in the TCP/IP stack has its specific tasks, working together to ensure smooth
communication and data exchange across networks, ultimately making the internet function
as we use it every day.

Page 5 of 11
Application layer:
The Application Layer is the highest layer in the TCP/IP protocol stack. Its main role is to
provide communication services directly to user applications, allowing them to interact with
the network. In simpler terms, it enables applications like web browsers, email clients, and
file transfer programs to work with the internet.
Here are some important functions of the Application Layer:
1. Data Representation: The Application Layer ensures that data from applications is
properly formatted and encoded for transmission over the network.
2. Application-Specific Protocols: It includes various protocols designed for specific
applications, such as HTTP for web browsing, SMTP for sending emails, FTP for file
transfers, and DNS for translating domain names into IP addresses.
3. User Interface Integration: The Application Layer can integrate user interfaces,
allowing users to interact with applications more easily.
4. Data Exchange and Transfer: It enables the exchange and transfer of data between
applications running on different devices, making it possible for applications to share
information and work together.

Page 6 of 11
5. Error Handling: Some error handling mechanisms are implemented at this layer to
deal with data errors and ensure data integrity during transmission.
6. Security: The Application Layer may include security protocols like SSL or TLS to
secure data transmission over the internet.
In essence, the Application Layer acts as a bridge between user applications and the
underlying layers of the TCP/IP stack, enabling a wide range of online activities that we use
every day, such as browsing the web, sending emails, and sharing files.

Transport layer:
The Transport Layer is a crucial part of the TCP/IP protocol stack. It sits between the
Application Layer, where user applications operate, and the lower layers responsible for
data transmission.
Here are the main functions of the Transport Layer:
1. Segmentation and Reassembly: The Transport Layer breaks data into smaller parts
called "segments" before sending it over the network. On the receiving end, it
reassembles these segments to reconstruct the original data.
2. Connection Establishment and Termination: The Transport Layer manages the
establishment and termination of connections between devices. It ensures that
devices can communicate effectively before data exchange begins and closes the
connection when communication is complete.
3. Reliable Data Delivery (TCP): TCP is a protocol within the Transport Layer that
ensures reliable data delivery. It guarantees that data is sent accurately and in the
correct order. If any data is lost or damaged during transmission, TCP requests
retransmission, ensuring data integrity.
4. Connectionless Communication (UDP): UDP is another protocol in the Transport
Layer. Unlike TCP, UDP does not establish a connection before data transfer and
does not guarantee reliability. It is used in situations where speed is essential, such
as real-time video streaming or online gaming.
5. Flow Control: The Transport Layer manages data flow between devices to prevent
data overload. It makes sure the sender does not overwhelm the receiver with too
much data at once, avoiding congestion and potential data loss.

6. Error Checking: The Transport Layer checks data for errors during transmission. If
any errors are detected, it takes appropriate action to ensure data accuracy.
7. Port Numbers: The Transport Layer uses port numbers to identify specific
applications on devices. This allows multiple applications to run simultaneously, each
using a unique port number for communication.
In conclusion, the Transport Layer plays a critical role in facilitating reliable and efficient
communication between applications on different devices. It ensures data is transmitted

Page 7 of 11
accurately and efficiently, contributing to the seamless functioning of the internet and
enabling various online activities we use daily.

Internet layer:
The Internet Layer is a crucial part of the TCP/IP protocol stack, situated between the Link
Layer and the Transport Layer. Its main job is to route data packets across different
networks, allowing devices from separate networks to communicate with each other.
Key functions of the Internet Layer include:
1. Packet Routing: The Internet Layer finds the best path for data packets to travel
through the network, ensuring efficient data transmission.
2. Internet Protocol (IP): It uses IP addresses to identify devices on the network. IP
addresses act like digital addresses, making sure data reaches the right destination.
3. IPv4 and IPv6: There are two versions of IP addresses, IPv4 (32-bit address) and IPv6
(128-bit address), providing a large number of unique addresses to accommodate all
devices on the internet.
4. Packet Fragmentation and Reassembly: The Internet Layer can break large data
packets into smaller pieces for easy transmission and reassemble them at the
destination.
5. TTL (Time to Live): Data packets have a TTL value that limits the number of routers
they can pass through. This prevents packets from circling forever in case of network
issues.
6. Routers: Routers play a vital role in the Internet Layer, forwarding data packets
between networks to ensure they reach their intended recipients.
The Internet Layer's seamless functioning enables global connectivity, allowing us to access
information, communicate, and engage in various online activities with people and services
from all over the world.

Link layer:
The Link Layer, also known as the Network Interface Layer, is an important part of the
TCP/IP protocol stack. It is the lowest layer, responsible for connecting devices within the
same local network. The main goal of the Link Layer is to ensure reliable data transmission
over the physical connections, like wired Ethernet cables or wireless connections such as
Wi-Fi.
Here are the key features and functions of the Link Layer:

Page 8 of 11
1. Physical Addressing: The Link Layer uses Media Access Control (MAC) addresses to
identify devices within the local network uniquely. Each device has its own MAC
address, acting like a digital ID for communication.
2. Frame Encapsulation: The Link Layer wraps the data received from the upper layers
into frames for sending it over the network. A frame includes the source and
destination MAC addresses, along with error-checking information.
3. Error Detection and Correction: The Link Layer includes mechanisms to detect and
correct errors that may occur during data transmission. This ensures that data
arrives accurately at the destination.
4. Data Link Protocols: Different data link protocols are used in the Link Layer,
depending on the type of physical connection. For example, Ethernet is used for
wired connections, and Wi-Fi (IEEE 802.11) is used for wireless connections.
5. Switching and Bridging: The Link Layer is involved in network switching and bridging.
Ethernet switches use MAC addresses to forward data only to the intended device,
improving network efficiency.

6. Access Control: The Link Layer manages access to the physical medium, ensuring
smooth data transmission without collisions. This is particularly important in shared
network environments.

7. Media Types: The Link Layer supports various types of physical media, like copper
cables, optical fibers, and wireless radio signals, to cater to different network setups.

In conclusion, the Link Layer is responsible for connecting devices within the same local
network and ensuring reliable data transmission. Its functions, such as physical addressing,
frame encapsulation, error detection, and access control, are essential for devices to
communicate effectively in a network and lay the groundwork for higher-level
communication in the TCP/IP protocol stack.

Intraction Between layers:


The TCP/IP protocol stack operates in a layered manner, where each layer interacts with the
layers above and below it. Let's understand these interactions:

1. Application Layer to Transport Layer: When an application on a device wants to


send data, it talks to the Transport Layer. The application gives the data to be
transmitted, and the Transport Layer decides which protocol to use, TCP or UDP,
based on the application's needs. It then prepares the data with headers for
transportation.
2. Transport Layer to Internet Layer: After the Transport Layer prepares the data, it
hands it over to the Internet Layer. Here, the Transport Layer adds source and
destination port numbers to the data, while the Internet Layer adds source and
destination IP addresses. The result is a complete data packet, ready for routing.

Page 9 of 11
3. Internet Layer to Link Layer: The Internet Layer passes the data packet to the Link
Layer. The Link Layer adds hardware addresses (MAC addresses) to the data packet,
allowing it to be sent within the local network. It converts the packet into frames
suitable for transmission over the physical medium, such as cables or wireless
signals.

4. Link Layer to Physical Medium: Finally, the Link Layer sends the frames over the
physical medium, like wires or wireless connections. The frames travel through the
local network, passing through switches or access points, until they reach the
destination device.
5. Receiving Device: When the frames arrive at the destination device, the process
happens in reverse. The Link Layer removes hardware addresses, and the packet
goes to the Internet Layer. The Internet Layer removes IP addresses and hands the
data to the Transport Layer. The Transport Layer processes the data according to the
specific protocol (TCP or UDP) and delivers it to the application.
This layered approach makes communication organized and efficient. It allows different
devices and networks to work together using TCP/IP, ensuring smooth and seamless data
transmission across the internet.

Threats to TCP/IP:
1. Denial of Service (DoS) Attacks: This is when someone floods a website or network
with too much traffic, causing it to crash or become unavailable. It's like when too
many people try to enter a small shop, and no one can get in or out.
2. Man-in-the-Middle (MitM) Attacks: In this attack, a sneaky person secretly
intercepts and changes the communication between two parties. It's like if someone
secretly listens to your phone call and changes the information you're sharing.
3. Packet Sniffing: This is when someone captures and reads the information passing
through a network. It's like a nosy person listening to your conversations to find out
what you're talking about.
4. IP Spoofing: In this threat, someone fakes their IP address to pretend they are
someone else. It's like wearing a mask and pretending to be a different person to
trick others.

Page 10 of 11
5. Port Scanning: This happens when someone looks for open doors (ports) on a
computer or network to find weak points for attack. It's like a burglar checking all the
windows and doors of a house to see which ones are unlocked.
6. Malware and Viruses: These are harmful programs that infect computers and cause
damage. They are like nasty bugs that get inside a computer and make it sick.
7. Phishing Attacks: This threat involves fake emails or websites that trick people into
giving away personal information like passwords or credit card numbers. It's like
someone pretending to be a trusted friend and asking for your secrets.
To stay safe from these threats, make sure to use strong passwords, be cautious with emails
and links, and keep your computer and software updated. It's like locking your doors and
windows to protect your house from intruders. Also, don't share personal information with
strangers and be aware of any suspicious activities online. Being cautious and informed will
help keep you safe in the digital world.

Summery:
TCP/IP is a vital protocol suite for the internet, enabling communication between
devices. It operates in layers, ensuring reliable data transmission. ARPANET played a
key role in its development. TCP/IP's adoption revolutionized global communication,
but it also faces threats like DoS attacks and phishing. It remains the backbone of the
internet, connecting us to information and people worldwide.

Refrences:
Web (GOOGLE)
( https://www.guru99.com/tcp-ip-model.html
https://www.techtarget.com/searchnetworking/definition/TCP-IP )
CHAT GPT
(https://deepai.org/chat)

Page 11 of 11

You might also like