1- What is TCP-IP Model ?
TCP/IP Model helps you to determine how a specific computer should be
connected to the internet and how data should be transmitted between
them. It helps you to create a virtual network when multiple computer
networks are connected together. The purpose of TCP/IP model is to allow
communication over large distances.
TCP/IP stands for Transmission Control Protocol/ Internet Protocol. TCP/IP
Stack is specifically designed as a model to offer highly reliable and end-to-
end byte stream over an unreliable internetwork.
Four Layers of TCP/IP model
In this TCP/IP tutorial, we will explain different layers and their
functionalities in TCP/IP model:
Application Layer
Transport Layer
Internet Layer
Network Interface
Application Layer:
This is the topmost layer, where network applications and protocols reside.
It is responsible for facilitating user interactions and providing services like
email, file transfer, and web browsing. Common protocols at this layer
include HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol),
SMTP (Simple Mail Transfer Protocol), and DNS (Domain Name System).
Transport Layer:
The transport layer manages data transfer between applications, ensuring
reliable and orderly communication. TCP and UDP (User Datagram Protocol)
are key protocols at this layer. TCP is connection-oriented and guarantees
data delivery, while UDP is connectionless and offers lower overhead,
making it suitable for real-time applications like streaming and gaming.
Internet Layer:
This layer handles routing and addressing, determining how data packets
traverse networks. The primary protocol at this layer is IP, which assigns
unique addresses to devices and enables packet routing. Other important
protocols include ICMP (Internet Control Message Protocol) for error
reporting and troubleshooting, and IGMP (Internet Group Management
Protocol) for managing multicast group membership.
Network Interface Layer:
The network interface layer, also known as the link layer or data link layer,
manages the physical transmission of data over network interfaces. It
encompasses hardware and software components involved in data transfer,
such as Ethernet, Wi-Fi, and other networking technologies. This layer deals
with physical addressing and framing.
2- The "Handshaking Theorem" in networking ?
The "Handshaking Theorem" in networking and communication protocols
generally refers to the process used to establish, maintain, and end
communication sessions between devices. While there's no universal
theorem named "Handshaking Theorem," handshaking processes are
common in protocols like TCP (Transmission Control Protocol) to ensure
reliable data transfer.
TCP Handshaking Process
TCP employs a "three-way handshake" to establish a reliable connection
between a client and a server:
1. SYN (Synchronization): The client sends a SYN packet to the server,
indicating the intent to establish a connection. It contains a sequence
number for the client.
2. SYN-ACK (Synchronization-Acknowledgment): The server responds with
a SYN-ACK packet, acknowledging the client's SYN and sending its own
SYN to the client. The SYN-ACK contains the server's sequence number
and acknowledges the client's initial sequence number.
3. ACK (Acknowledgment): The client sends an ACK packet to confirm
receipt of the server's SYN-ACK, completing the handshake. The
connection is established, and data transfer can begin.
Purpose and Benefits
The three-way handshake serves several purposes:
Synchronization: It ensures that both devices are in sync, allowing them to
exchange data in a reliable manner.
Error Handling: It helps prevent errors, such as packet loss or duplication, by
establishing a clear order of communication.
Connection Establishment: It confirms that both the client and server are
ready for data exchange, avoiding incomplete or unestablished connections.
Reliable Communication: By acknowledging each step, the handshake
creates a foundation for reliable data transfer and communication.
3- Multiple Access Protocols ?
Multiple Access Control
Multiple Access Protocols regulate how devices share a communication medium, such as a
network or a channel.
Why is Multiple Access Control Important?
In a network with multiple devices, efficient sharing of the communication medium is
essential to prevent conflicts and ensure fair and timely access.
Categories of Multiple Access Protocols
Multiple access protocols can be broadly classified into three categories:
1. Random access protocols
2. Controlled access protocols
3. Channelization protocols
1. Random Access Protocols
In random access protocols, all stations have equal priority, meaning no station has higher
priority than any other station. Any station can send data whenever the medium is idle. Here
are two examples of random access protocols:
ALOHA: Although ALOHA was created for wireless LANs, it can also be used for
shared mediums. It allows for simultaneous data transmission from numerous stations,
which can cause collisions and jumbled data.
CSMA (Carrier Sense Multiple Access): CSMA reduces collisions by requiring a
station to first listen to the medium to determine if it is busy before transmitting data.
If the medium is busy, the station waits for it to become idle before transmitting.
However, due to propagation delay, there is still a potential for collisions in CSMA.
CSMA/CD (Carrier Sense Multiple Access/Collision Detection): CSMA/CD
builds upon CSMA by adding collision detection. If a collision is detected during
transmission, all stations involved stop transmitting and wait a random amount of
time before retrying. This helps to reduce the likelihood of subsequent collisions.
[Link] Protocols
Channelization is a technique used in communication systems to divide the available
bandwidth into smaller, individual channels. Each channel is allocated for a specific purpose,
such as data transmission, voice communication, or other types of signals. Channelization
enables multiple transmissions to occur simultaneously without interfering with each other,
thus maximizing the efficiency of the communication system.
Here are three examples of channelization protocols:
Frequency Division Multiple Access (FDMA): FDMA allocates distinct frequency
bands to different communications so that each channel operates on a specific
frequency, allowing simultaneous transmissions without interference.
Time Division Multiple Access (TDMA): TDMA divides time into discrete intervals
and assigns each interval to a different user, enabling multiple users to share the same
frequency channel by transmitting in turn.
Code Division Multiple Access (CDMA): CDMA allows multiple users to transmit
simultaneously over the same frequency by encoding each user's signal with a unique
code, making the signals distinguishable from one another despite overlapping in time
and frequency.
[Link] Access Protocols
In controlled access protocols, a station transmits data only after it has received permission
from a central authority or through a predetermined scheme. This prevents collisions
altogether. Here are three examples of controlled access protocols:
Reservation: In reservation protocols, devices reserve bandwidth before transmitting
data.
Polling: In polling protocols, a central device asks each device on the network in turn
if it has data to transmit.
Token Passing: In token passing protocols, devices pass a special token around the
network. The device holding the token is allowed to transmit data.
4- What is Protocol data unit and provide brief structure for each
unit.
A Protocol Data Unit (PDU) is a structured packet of data at a particular layer in a
network protocol stack. Each layer has a specific type of PDU containing both data and
protocol-specific information (like headers and footers). The PDU changes as it moves
through the layers, gaining or shedding information.
Types of PDUs by Layer
Data Link Layer: The PDU is called a frame, containing source and destination
MAC addresses, data payload, and a frame check sequence for error detection.
Network Layer: The PDU is a packet, which includes source and destination IP
addresses, protocol information, and other header data.
Transport Layer: There are two types of PDUs here:
TCP: The PDU is a segment, containing source and destination port
numbers, sequence and acknowledgment numbers, and data payload.
UDP: The PDU is a datagram, with source and destination port numbers,
length, checksum, and data payload.
Session Layer: The PDU is simply called data, focusing on establishing,
maintaining, and terminating sessions.
Presentation Layer: The PDU is also called data. This layer manages data
translation, encryption, and compression to ensure interoperability.
Application Layer: Here, the PDU is called data, representing information
generated by applications like HTTP messages or email content.
5- TCP Header ?
TCP Header
In TCP data segment have two part one is data part another one is TCP Header part. The
header contains component which is mention below the picture. TCP header length is 20-
60Bytesi.e(160-480bits).
Source Port- It is 16 bit no. it defines source address of a data packet from which it comes.
By the help of source port no receiver as well as sender differentiate host .
Destination Port- It is also 16 bit no. It helps the data packet to reach its destination.
Sequence No:- In TCP every bytes can be counted. So sequence no is starting no given data
in a data packet which in the form of bytes. It uses random sequence no because
Acknowledgment No:-When sender sends data having starting sequence no 100 of a 10
bytes data packet to receiver. After receives the data packet by the receiver. The receiver will
send a acknowledgement no 110. That means acknowledgement no is the next excepting
data need from sender.
Header Length:- Header Length is the is 4 bit no which say that what is the length of the
TCP header. The 4 bit no is lies between 1 bytes to 15 bytes in binary. But previously we
know that the length of TCP is lies 20-60 by bytes. So we use scale of 4 formula .The 4 bit
no is multiply with 4 then we get the actual length of the header .
Extra Space:- 6 bit always reserved for future use.
Flag :- These are used for notification for activation specific level in side the TCP header.
These flags are takes 1 bit space.
URG(Urgent):- It is used for urgent connection with the application layer. No wait
of collection of data packet.
ACK(Acknowledgement):- It is used for activation of Acknowledgement no.
PSH(PUSH):- It is used for push the data into application layer.
RST(Reset):- It is used for reset connection.
SYN(Synchronization):- It is used for synchronized the communication to transfer the 1st
data packet.
FIN(Finshing):- It is used for terminating or finishing the data transfer.
Windows Size:- It is used for 16 bit no to inform the sender maximum amount of data can
be stored by receiver.
Checksum:- It helps in error control.
Urgent Pointer:- It used for to find urgent data of data packet
Options Paddy:- It used for to know the MSS(Maximum segment size) of segment for
sender.
Clint Server
Port A Port B
Seq 9000
SYN WS=12000
MSS=1200B
SYN
Port B Port A
Seq=3000
Ank=9001
ACK SYN 18000
MSS=600B
ACK+SYN
Seq=9001
Ack=3001
ACK
ACK
Short Question—
1-WWW vs HTTP
WWW (World Wide Web): A vast network of interconnected
web pages and multimedia content, accessible via the internet.
It uses hyperlinks and the Internet Protocol (IP) to connect and
navigate between different sites.
HTTP (Hypertext Transfer Protocol): A protocol that governs
communication between web clients (like browsers) and web
servers. It defines how requests and responses are structured
for accessing and transferring web content.
2- Is UDP a Connection-Oriented Protocol?
No. UDP (User Datagram Protocol) is a connectionless protocol,
which means it does not establish a dedicated connection
before sending data.
It sends packets without guaranteeing delivery, order, or
reliability.
3- Primary Function of Network Layer in OSI Model
The network layer manages routing and forwarding of data
packets across different networks.
It is responsible for determining the best paths for data
transmission and handling logical addressing (such as IP
addresses) to ensure packets reach their correct destinations.
4- Network Paradigm
A network paradigm is a conceptual framework or model that
describes the architecture, protocols, and communication
mechanisms used in a network. Common paradigms include
client-server, peer-to-peer, and cloud computing.
Each paradigm represents a different approach to networking,
with unique characteristics, benefits, and use cases.
5- Role of the Sync Flag
The sync (SYN) flag is a control bit in the TCP header used
during the TCP three-way handshake to initiate a connection
between a client and a server. It signals a synchronization
request and is critical for establishing a reliable connection
before data transfer begins.