0% found this document useful (0 votes)
8 views27 pages

Tcpip

The document provides an overview of the TCP/IP protocol suite, detailing its five-layer model and the roles of each layer in facilitating communication between hosts. It explains the responsibilities of the physical, data-link, transport, and application layers, including encapsulation and decapsulation processes at both the source and destination hosts. Key protocols and functions at each layer are highlighted, emphasizing the importance of logical communication and error handling in network operations.

Uploaded by

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

Tcpip

The document provides an overview of the TCP/IP protocol suite, detailing its five-layer model and the roles of each layer in facilitating communication between hosts. It explains the responsibilities of the physical, data-link, transport, and application layers, including encapsulation and decapsulation processes at both the source and destination hosts. Key protocols and functions at each layer are highlighted, emphasizing the importance of logical communication and error handling in network operations.

Uploaded by

malalaasya05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

TCP/IP is a protocol suite

(a set of protocols organized in different layers) used in the


Internet today.

It is a hierarchical protocol made up of interactive modules, each


of which provides a specific functionality.

The original TCP/IP protocol suite was defined as four software layers built upon
the hardware. Today, however, TCP/IP is thought of as a five-layer model
Layered Architecture
• To show how the layers in the TCP/IP protocol suite are
involved in communication between two hosts, we assume
that we want to use the suite in a small internet made up of
three LANs (links), each with a link-layer switch. We also
assume that the links are connected by one router.
• Let us assume that computer A communicates with computer B.
• As the figure shows, we have five communicating devices in this
communication: source host (computer A), the link-layer switch in link
1, the router, the link-layer switch in link 2, and the destination host
(computer B).
• Each device is involved with a set of layers depending on the role of
the device in the internet.
• The two hosts are involved in all five layers; the source host needs to
create a message in the application layer and send it down the layers
so that it is physically sent to the destination host.
• The destination host needs to receive the communication at the
physical layer and then deliver it through the other layers to the
application layer.
• The router is involved in only three layers; there is no transport or
application layer in a router as long as the router is used only for
routing.
• Although a router is always involved in one network layer, it is
involved in n combinations of link and physical layers in which n is
the number of links the router is connected to. The reason is that
each link may use its own data-link or physical protocol.
• For example, in the above figure, the router is involved in three
links, but the message sent from source A to destination B is
involved in two links.
• Each link may be using different link-layer and physical-layer
protocols; the router needs to receive a packet from link 1 based
on one pair of proto cols and deliver it to link 2 based on another
pair of protocols.
• A link-layer switch in a link, however, is involved only in two
layers, data-link and physical. Although each switch in the above
figure has two different connections, the connections are in the
same link, which uses only one set of protocols. This means that,
unlike a router, a link-layer switch is involved only in one data-link
and one physical layer
Layers in the TCP/IP Protocol Suite
• After the above introduction, we briefly
discuss the functions and duties of layers in
the TCP/IP protocol suite.
•Using logical connections makes it easier for us to think about
the duty of each layer.
•As the figure shows, the duty of the application, transport, and
network layers is end-to-end.
•the duty of the data-link and physical layers is hop-to-hop, in
which a hop is a host or router.
•In other words, the domain of duty of the top three layers is
the internet, and the domain of duty of the two lower layers is
the link.
•In the top three layers, the data unit (packets) should not be
changed by any router or link-layer switch.
• In the bottom two layers, the packet created by the host is
changed only by the routers, not by the link-layer switches.
Figure 2.7 shows the second principle discussed previously for protocol
layering. We show the identical objects below each layer related to each
device.
•Note that, although the logical connection at the network layer
is between the two hosts, we can only say that identical objects
exist between two hops in this case because a router may
fragment the packet at the network layer and send more
packets than received
•Note that the link between two hops does not change the
object.
Description of Each Layer
Physical Layer
•We can say that the physical layer is responsible for carrying individual bits in a
frame across the link.
•Although the physical layer is the lowest level in the TCP/IP protocol suite, the
communication between two devices at the physical layer is still a logical
communication because there is another, hidden layer, the transmission media,
under the physical layer.
•Two devices are connected by a transmission medium (cable or air). We need to
know that the transmission medium does not carry bits; it carries electrical or
optical signals.
•So the bits received in a frame from the data-link layer are trans formed and
sent through the transmission media, but we can think that the logical unit
between two physical layers in two devices is a bit. There are several protocols
that transform a bit to a signal.
Transmission Media:

• The physical connection between two devices


is made through a transmission medium,
which can be either cables (like twisted-pair,
fiber-optic cables) or air (wireless
communication).
• The transmission medium does not directly
carry bits; instead, it transmits signals
(electrical or optical) that represent the bits.
Logical Communication:
• Despite being the lowest layer, the physical
layer enables logical communication between
devices by ensuring that signals are accurately
transmitted and interpreted.
• From a logical perspective, the unit of data at
this layer is the bit, even though the actual
signals sent over the medium are different in
nature.
Signal Transformation
• The physical layer converts bits into
appropriate forms of signals (either electrical
or optical) depending on the medium used.
• Protocols at this layer define how these bits
are transformed into signals to be carried over
the medium.
Data-link Layer:
• In an internet, multiple links (LANs and WANs)
are connected by routers.
• There are often multiple paths that a datagram
can take from the host to its destination.
• Routers are responsible for determining the most
efficient route. Once the next link is chosen by a
router, the data-link layer manages the process of
transmitting the datagram across that link.
These links can vary widely and include:
• Wired LANs with link-layer switches
• Wireless LANs
• Wired WANs
• Wireless WANs
• Each type of link may use different protocols, but the data-link
layer has the essential role of ensuring that the packet is
successfully transmitted across any type of link.
• The TCP/IP model does not mandate a specific protocol for the
data-link layer. Instead, it accommodates a wide range of both
standard and proprietary protocols.
• Any protocol that can encapsulate a datagram and move it across
a link is considered acceptable.
• At the data-link layer, the datagram is encapsulated into a
packet, referred to as a frame.
• Some link-layer protocols offer both error detection and
correction, ensuring that transmitted data is free from errors.
Transport Layer:
The Transport Layer plays a crucial role in ensuring end-to-end
communication between hosts in a network.

Key Functions:
• Encapsulation and Transmission: The transport layer at the
source host takes messages from the application layer,
encapsulates them into transport layer packets (called
segments in TCP or user datagrams in UDP), and transmits
them to the destination transport layer.
• End-to-End Communication: Even though the application
layer provides an end-to-end connection, the transport layer
separates tasks, handling data transmission independently
from the application. This separation allows flexibility by
providing multiple protocols suited for different needs.
As we said, there are a few transport-layer protocols in the
Internet, each designed for some specific task.

1. Transmission Control Protocol (TCP):


o Connection-Oriented: TCP establishes a connection
between two hosts before transferring data. It creates a
virtual "pipe" for sending a continuous stream of bytes.
o Flow Control: Ensures that the data sent matches the
receiving capability of the destination, preventing data
loss due to overwhelming the receiver.
o Error Control: TCP checks for errors in data transmission
and ensures that any corrupted segments are
retransmitted.
o Congestion Control: Helps avoid network congestion by
adjusting the transmission rate based on the current
network conditions.
2. User Datagram Protocol (UDP):

o Connectionless: Unlike TCP, UDP does not establish a connection before


sending data. Each user datagram is sent independently, without reference to
previous or subsequent datagrams.
o Simplicity: UDP is lightweight, with minimal overhead. However, it does not
provide flow control, error control, or congestion control.
o Use Case: Best suited for applications that need to send small, independent
messages, where speed is critical and retransmission (as in TCP) would be
inefficient.

3. Stream Control Transmission Protocol (SCTP):


o Designed for Modern Applications: SCTP is tailored for emerging multimedia
applications, offering more advanced features suited to high-demand data
transmissions.

By providing these different protocols, the transport layer allows application


programs to choose the one that best suits their specific requirements,
whether they prioritize reliability, simplicity, or speed.
Application Layer: The application layer in a network facilitates end-to-end
communication between two application layers. It appears as though a
direct bridge exists between them, but in reality, communication passes
through all layers of the networking model.
At this layer, the communication happens between two processes (programs
running on separate machines). One process sends a request, and the other
process responds. This process-to-process communication is the core
responsibility of the application layer.

Key protocols in the application layer include:


• HTTP (Hypertext Transfer Protocol): Used for accessing the World Wide
Web (WWW).
• SMTP (Simple Mail Transfer Protocol): The primary protocol for sending
and receiving email.
• FTP (File Transfer Protocol): Enables the transfer of files between hosts.
• TELNET and SSH (Secure Shell): Facilitate remote access to a site.
• SNMP (Simple Network Management Protocol): Allows administrators to
manage Internet resources both globally and locally.
• DNS (Domain Name System): Helps find the network-layer address (IP
address) of a computer for other protocols.
• IGMP (Internet Group Management Protocol): Collects information on
group membership for multicast communication.
Encapsulation at the Source Host
At the source host, the encapsulation process involves the following steps:
1. Application Layer: The data generated by the application is called a
message. This message typically doesn't have a header or trailer, but if it
does, the whole unit is still referred to as a message. This message is passed
to the transport layer.
2. Transport Layer: The transport layer treats the message as a payload. It
adds a transport layer header, which includes details like the source and
destination application program identifiers and information necessary for
tasks such as flow control, error control, or congestion control. The resulting
packet is known as a segment (in TCP) or a user datagram (in UDP). This
transport layer packet is then passed to the network layer.
3. Network Layer: At this layer, the transport layer packet is treated as the
payload. A network layer header is added, which contains the source and
destination IP addresses, as well as additional information for error
checking and fragmentation. The final packet is referred to as a datagram,
which is then passed to the data-link layer.
4. Data-Link Layer: The network layer packet is encapsulated in a data-link
layer frame. A header is added here, which includes the addresses of the
sending host and the next hop (e.g., a router). The frame is then passed to
the physical layer for transmission over the network.
Encapsulation and Decapsulation at the Router
Routers perform both encapsulation and decapsulation, as they are
connected to multiple network links. Here's how this works:

1. Decapsulation at Data-Link Layer: When the router receives a frame, the


data-link layer extracts the datagram from the frame and passes it to the
network layer.
2. Network Layer Processing: The router's network layer examines the
source and destination addresses within the datagram header. Using its
forwarding table, the router determines the next hop for the datagram.
The content of the datagram is not altered unless it requires
fragmentation to pass through the next link. Once processed, the
datagram is passed to the data-link layer of the next link.
3. Encapsulation at Data-Link Layer: The datagram is encapsulated into a
new frame suitable for the next link, and the frame is passed to the
physical layer for transmission.
Decapsulation at the Destination Host

At the destination host, the reverse process of encapsulation—decapsulation—


occurs:
1. Data-Link Layer: The frame is received, and the data-link layer removes its
header to extract the network layer datagram.
2. Network Layer: The network layer removes its header to extract the
transport layer segment or user datagram.
3. Transport Layer: The transport layer removes its header to deliver the
original message to the application layer. During decapsulation, error
checking is performed at each layer to ensure data integrity.

The process continues until the original message reaches the application layer,
where it can be used by the application program.

You might also like