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

CN45 - TCP

This document provides an overview of TCP (Transmission Control Protocol). It discusses how TCP provides reliable byte-stream delivery over unreliable networks through mechanisms like sequence numbers, acknowledgments, and retransmissions. It describes TCP's connection-oriented service model using sockets, and how TCP segments incoming data streams into packets. Keywords covered include connection oriented, segments, buffers, and byte-by-byte delivery. Multiple choice questions are also provided to test understanding of TCP concepts.

Uploaded by

Tharani Tharani
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)
40 views

CN45 - TCP

This document provides an overview of TCP (Transmission Control Protocol). It discusses how TCP provides reliable byte-stream delivery over unreliable networks through mechanisms like sequence numbers, acknowledgments, and retransmissions. It describes TCP's connection-oriented service model using sockets, and how TCP segments incoming data streams into packets. Keywords covered include connection oriented, segments, buffers, and byte-by-byte delivery. Multiple choice questions are also provided to test understanding of TCP concepts.

Uploaded by

Tharani Tharani
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/ 22

COMPUTER NETWORKS(16CSS07)

Sri Krishna Arts and Science College

Department of Computer Science


Computer Networks
Google Class room code – 2c25go
Map Code - C

Unit – 4 Lecture Hours – 45

TCP
COMPUTER NETWORKS(16CSS07)

Attendance

TCP
COMPUTER NETWORKS(16CSS07)

Snap
Talk

TCP
COMPUTER NETWORKS(16CSS07)

CONTENTS
• INTRODUCTION TO TCP
• THE TCP SERVICE MODEL
• THE TCP PROTOCOL

TCP
COMPUTER NETWORKS(16CSS07)

The Internet Transport Protocols: TCP


•UDP is a simple protocol and it has some niche uses,
such as client-server interactions and multimedia,
•but for most Internet applications, reliable, sequenced
delivery is needed.
•UDP cannot provide this, so another protocol is
required.
• It is called TCP and is the main workhorse of the
Internet.

TCP
5
COMPUTER NETWORKS(16CSS07)

Introduction to TCP

•TCP (Transmission Control Protocol) was


specifically designed to provide a reliable end-to-end
byte stream over an unreliable internetwork.
•An internetwork differs from a single network
because different parts may have wildly different
topologies, bandwidths, delays, packet sizes, and other
parameters.
•TCP was designed to dynamically adapt to properties
of the internetwork and to be robust in the face of
many kinds of failures.

TCP
6
COMPUTER NETWORKS(16CSS07)

MECHANISM :
1. Each machine supporting TCP has a TCP transport
entity, either a library procedure, a user process, or part
of the kernel.
2. In all cases, it manages TCP streams and interfaces to the
IP layer.
3. A TCP entity accepts user data streams from local
processes, breaks them up into pieces not exceeding 64
KB and sends each piece as a separate IP datagram.

TCP
COMPUTER NETWORKS(16CSS07)

4.When datagrams containing TCP data arrive at a machine,


they are given to the TCP entity, which reconstructs the
original byte streams.

ADVANTAGE :
1. Time out
2. Retransmit
3. Reassemble them into messages in the proper sequence.

TCP
COMPUTER NETWORKS(16CSS07)

The TCP Service Model

•TCP service is obtained by both the sender and receiver


creating end points, called sockets.
• Each socket has a socket number (address) consisting of
the IP address of the host and a 16-bit number local to that
host, called a port.
• A port is the TCP name for a TSAP.
• For TCP service to be obtained, a connection must be
explicitly established between a socket on the sending
machine and a socket on the receiving machine..

TCP
COMPUTER NETWORKS(16CSS07)

•A socket may be used for multiple connections at the


same time. In other words, two or more connections may
terminate at the same socket. Connections are identified by
the socket identifiers at both ends, that is, (socket1,
socket2). No virtual circuit numbers or other identifiers are
used.
•Port numbers below 1024 are called well-known ports
and are reserved for standard services.
•For example, any process wishing to establish a
connection to a host to transfer a file using FTP can
connect to the destination host's port 21 to contact its FTP
daemon.
TCP
COMPUTER NETWORKS(16CSS07)

Fig. Some assigned ports.

TCP
11
COMPUTER NETWORKS(16CSS07)

•a single daemon, called inetd (Internet daemon) in


UNIX, attach itself to multiple ports and wait for the first
incoming connection.
•When that occurs, inetd forks off a new process and
executes the appropriate daemon in it, letting that daemon
handle the request.
•In this way, the daemons other than inetd are only active
when there is work for them to do
•All TCP connections are full duplex and point-to-point.

TCP
COMPUTER NETWORKS(16CSS07)

• Full duplex means that traffic can go in both directions at


the same time.
•Point-to-point means that each connection has exactly two
end points.
• TCP does not support multicasting or broadcasting.
•A TCP connection is a byte stream, not a message stream.
•Message boundaries are not preserved end to end

TCP
COMPUTER NETWORKS(16CSS07)

Fig (a) Four 512-byte segments sent as separate IP datagrams. (b) The 2048
bytes of data delivered to the application in a single READ call.

TCP
COMPUTER NETWORKS(16CSS07)

•Files in UNIX have this property too. The reader of a file


cannot tell whether the file was written a block at a time, a
byte at a time, or all in one blow.
•As with a UNIX file, the TCP software has no idea of what
the bytes mean and no interest in finding out. A byte is just a
byte.
•When an application passes data to TCP, TCP may send it
immediately or buffer it (in order to collect a larger amount
to send at once), at its discretion.

TCP
COMPUTER NETWORKS(16CSS07)

Keyword

•Connection oriented
•Segments
•Buffer
•Byte by byte
•Sockets

TCP
COMPUTER NETWORKS(16CSS07)

MCQ

1. Which of the following is true with


respect to TCP
a) Connection-oriented
b) Process-to-process
c) Transport layer protocol
d) All of the mentioned

TCP
COMPUTER NETWORKS(16CSS07)

MCQ

2. In TCP, sending and receiving data


is done as
a) Stream of bytes
b) Sequence of characters
c) Lines of data
d) Packets

TCP
COMPUTER NETWORKS(16CSS07)

MCQ

3. TCP process may not write and


read data at the same speed. So we
need __________ for storage.
a) Packets
b) Buffers
c) Segments
d) Stacks

TCP
COMPUTER NETWORKS(16CSS07)

MCQ

4. TCP groups a number of bytes


together into a packet called
a) Packet
b) Buffer
c) Segment
d) Stack

TCP
COMPUTER NETWORKS(16CSS07)

summary
• TCP is a connection-oriented transport protocol that
sends data as an unstructured stream of bytes.
• By using sequence numbers and acknowledgment
messages, TCP can provide a sending node with
delivery information about packets transmitted to a
destination node.

TCP
COMPUTER NETWORKS(16CSS07)

Next Hour

•The TCP Protocol


•The TCP Segment Header

TCP

You might also like