0% found this document useful (0 votes)
13 views

TCP Ip

TCP/IP is a set of protocols that support network communication and is designed to support communication between computers from different manufacturers. It has four layers: physical, data link, network, and transport. The physical layer handles signal transmission and Ethernet is a common standard. The data link layer handles frame encapsulation and error checking. The network layer handles addressing, routing, and path determination using IP addresses. The transport layer handles reliable transmission with TCP or fast transmission with UDP.

Uploaded by

Hein Khant Shane
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

TCP Ip

TCP/IP is a set of protocols that support network communication and is designed to support communication between computers from different manufacturers. It has four layers: physical, data link, network, and transport. The physical layer handles signal transmission and Ethernet is a common standard. The data link layer handles frame encapsulation and error checking. The network layer handles addressing, routing, and path determination using IP addresses. The transport layer handles reliable transmission with TCP or fast transmission with UDP.

Uploaded by

Hein Khant Shane
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 69

TCP/IP

TCP/IP
● TCP/IP is a network model designed to support network communication, even if
the computers are from different manufacturers.
● In computer networks, the agreed-upon set of ground rules that make
communication possible are called protocols. TCP/IP is a set of protocols that
support network communication,
What is communication
● Two computers connected via LAN Cable sharing data with the help of Network
Interface Cards (hardware present in each computer) forms a network, and

● The process of sending messages from one place to another through a wired or
wireless medium is called communication
● message can be a file, a voice conversation, a streaming video or anything
which can be communicated in digital form
● These messages are not sent as a single unit; instead, they are broken into
small data units.
● These data units are transmitted through the network and restored at the
receiver into the original message.
4 layers TCP/IP
● Application layer

● Network layer

● Data Link layer

● Physical layer
Physical layer

● The physical layer is the place where actual communication takes place

● Converts this binary sequence into signals and transmits them over local
media.
● Signal can be electrical if the local media is Copper Cable or LAN cable, the
Light signal in case of Optical Fiber and a Radio signal in case of Air/Vacuum.
● Signal generated by the Physical Layer depends on the type of media used to
connect two devices.
Physical layer
● Ethernet is the most common protocol use in physical layer

● The protocol also specifies the type of cables that can be used for data
transmission
Physical layer protocol Cable to be used
• Ethernet • Twisted Pair cable
• Coaxial cable
• Fiber optic cable
• Fast Ethernet • Twisted Pair Cable
• Gigabit Ethernet • Fiber Optic Cable
Data link layer
The data unit in the data link layer is called an Ethernet frame. The data
link layer is divided into two sublayers:
1. Medium-access control or MAC sublayer, and
2. Logical link control or LLC sub-layer
Medium-access control or MAC sublayer

The MAC sublayer is responsible for Data


encapsulation and accessing the media.
Data encapsulation
● The MAC sublayer adds a header and a trailer to the IP packet received from
the network layer.

● The header contains the MAC addresses of the sender and receiver. The trailer
contains 4 bytes of error checking data used to detect errors in the received
Ethernet frame.

● What is the MAC address? It is a unique 6-byte address embedded in the NIC
of a device by its manufacturer.
Accessing media
For accessing the media, the access method Ethernet uses is called Carrier
Sense Multiple Access/Collision Detection or CSMA/CD.
Carrier sense multiple access/Collision Detection
(CSMA/CD)

In this method, each computer listens to the cable before sending data through the
network. If the network is clear, the computer will transmit. If the first computer is
already transmitting on the cable, the second computer will wait and try again
when the line is clear.
Logical link layer

The next is the LLC sub-layer. It offers flow control, and


error control
Flow control
● Flow control is a technique that restricts the amount of data that a sender can
send without overwhelming the receiver.
● The receiving devices have a limited processing speed and a limited memory to
store the incoming data.
● If these limits are exceeded, then the incoming data will be lost.

● To avoid this, the receiver should inform the sender to slow down the
transmission rate before these limits are met.
● In the data link layer, flow control restricts the number of frames the sender can
send without overwhelming the receiver.
Error control
Error control in the data link layer primarily refers to error detection and
retransmission.
Error control detection

Error detection is done by using the error checking bytes


added in the trailer of the frame.
Retransmission
● The frame retransmission is done using Automatic Repeat Request or
ARQ.

● The receiver sends an ACK to the sender when a frame is received.

● When the ACK is not received, the sender sends the frame again. So, if
a frame gets lost or damaged, then the ACK is not sent.

● As a result, the sender sends the frame again. This process is called
Automatic Repeat Request (ARQ).
Network layer
● The transport layer passes TCP segments or UDP datagrams to the
Network Layer.

● The network layer adds logical addresses or IP addresses to the TCP


segments or UDP datagrams to form IP packets and then uses routers
to send the IP packets to other networks.

● The network layer also determines the best path for data delivery.
Network layer
So the functions of the network layer are:

● Logical Addressing
● Routing
● Path determination
Logical addressing
● Every computer in a network has a unique IP address.
● The network layer assigns sender and receiver’s IP addresses to each
segment or datagram to form an IP Packet.
● IP addresses are assigned to ensure that each IP packet can reach the
correct destination present in different networks.
Routing
Routing is a method of moving an IP packet from source to destination present in
different networks. Routing is not needed if the source and destination computers
are present in the same network.
For communications within a network, the task is usually simple. The ARP module
takes the destination IP address from the IP packet and returns the MAC address
of the destination computer. It is then used to create an Ethernet frame which is
delivered directly to the destination as it is present in the same network, . no
routing is needed.
● To create an Ethernet frame, we need the MAC address of the destination
computer.
● However, in this case, the destination is present in a different network. So, the
ARP module cannot provide us with the destination’s MAC address because it
can provide the MAC address only if the computers are present in the same
network.
● So, the ARP module in network one cannot provide the MAC addresses of the
computers present in network two and vice-versa. Since the intermediate to the
networks is the router R, the destination MAC address is kept as the router’s
MAC address, and the frame is forwarded to the router.
● Router finds that the MAC address in the frame matches its address. So, it
extracts the IP packet from the frame and forwards it to the network layer.
● The network layer finds a mismatch for the destination IP address. So it sends
the IP packet down to the data link layer and updates the destination MAC
address with the MAC address of computer B.
● It is one network, so the ARP module works here.

● Finally, the ethernet frame is delivered to computer B.

● Please note that the destinations IP address never changes for inter-network
communication, but the physical address or the MAC address changes with
every hop.
● So, IP addresses are a must to transfer data among multiple networks.
Path determination
● A computer can be connected to an internet server or a computer in several
ways.
● Choosing the best possible path for data delivery from source to destination is
called Path Determination.

● Layer 3 devices use protocols such as OSPF (Open Shortest Path First), BGP
(Border Gateway Protocol), IS-IS (Intermediate System to Intermediate
System) to determine the best possible path for data delivery.
● Because routing takes place at the network layer or layer 3, routers and
gateways are sometimes called layer three switches.

● IP is unreliable. It does not guarantee delivery nor check for errors. These tasks
are the responsibility of the transport layer.
Transport layer
● At the sending node, the transport layer receives the message from the
application layer. When the message reaches the transport layer, one of the
transport layer protocols, i.e., TCP or UDP, is selected.

● TCP supports segmentation. So, if the message is large, TCP divides it into
smaller pieces and adds a header to form a TCP segment.

● On the other hand, UDP does not support segmentation, so the applications
using UDP should send messages short enough to fit into one UDP datagram.
UDP

● UDP datagrams are considered unreliable because there is no guarantee that


all datagrams sent will be received in the destination and in the correct
order.
● UDP lacks error checking and correction. It makes UDP fast and efficient
for DNS, DHCP, SNMP, and RIP protocols. UDP is also suited for streaming
videos.
UDP
● When the application layer invokes the UDP protocol, UDP encapsulates the
application message into UDP datagrams. The datagram is then passed to the
network layer for transmission.
● At the receiving end, the network layer sends the UDP datagram to the
transport layer. UDP then extracts the application message from the datagram
and passes it to the application layer.
TCP
● TCP, on the other hand, is reliable and guarantees in-order
delivery of data from the sender to the receiver. The data
transmission via TCP has three phases:
○ Connection establishment

○ Data transfer

○ Connection termination
Connection Establishment phase
● In the Connection Establishment phase:-

● the sender TCP or client sends a packet to the receiver TCP or server
requesting a connection. The server then sends an acknowledgement to the
client.
● The client further acknowledges the server.

● It completes the process of connection establishment. Since a connection is set


up before data transmission, TCP is a connection-oriented protocol, and the
connection establishment process is called Three-Way TCP Connection
Handshake
Data transfer
Once the connection is established, the next phase is the Data Transfer. During
data transfer, TCP offers some key features which UDP does not provide, and it
includes
● Error-free data transfer

● Ordered-data transfer

● Retransmission of lost data

● Discarding duplicate packets, and

● Congestion throttling
Application layer
The application layer is used by user applications that pass messages
from one computer to another in a network. For example, Internet
Explorer, Google Chrome, Firefox, Microsoft Outlook, and so on. Note
that the user applications do not reside on the application layer, but they
use application layer protocols to perform their activities.
Application layer
● List of protocol
○ DNS

○ DHCP

○ FTP

○ HTTP

○ SMTP
DNS
Domain Name System translates IP addresses into Domain Names and vice-
versa.

FTP
File Transfer Protocol is used to transfer files on the Internet
HTTP
HyperText Transfer Protocol is used for sending and receiving webpages

SMTP
Simple Mail Transfer Protocol is used for email messages on the Internet

You might also like