 It is a connection oriented protocol.
 It has Reliable feature for the services of IP.
 It uses Flow and Error control mechanism at the
transport level.
 It creates a virtual connection between two TCPs to
send data.
 It does not support multicasting and broadcasting.
1. Process-to-Process Communication
2. Stream Delivery Service
3. Full-Duplex Communication
4. Connection-Oriented Service
5. Reliable Service
Port Protocol Description
7 Echo Echoes a received datagram back to the sender
9 Discard Discards any datagram that is received
13 Daytime Returns the date and time
23 TELNET Terminal Network
25 SMTP Simple Mail Transfer Protocol
53 DNS Domain Name Server
67 BOOTP BootStrap Protocol
80 HTTP Hypertext Transfer Protocol
111 RPC Remote Procedure Call
 TCP is a Stream-oriented protocol.
 It allows sending and receiving of data as a stream of
bytes.
 It needs buffer for storage in sending and receiving sides.
 The sending side buffer has 3 chambers.
1. Empty chamber to be filled by sending process.
2. Holds the sent bytes until it is acknowledged.
3. Contains bytes to be sent.
 The receiver side buffer has 2 chambers.
1. Empty chamber to be filled by the bytes received.
2. Contains bytes that can be read by receiving process.
 In TCP data can flow in both the direction at the same
time.
 The segments move in both direction.
In connection-oriented protocol the following occurs:
 The two TCPs establish a connection between them.
 Data are exchanged in both the directions.
 The connection is terminated.
It is a virtual connection and not a physical one.
 TCP uses an acknowledgement mechanism to check the
safe and sound arrival of data.
1. Numbering System
2. Flow Control
3. Error Control
4. Congestion Control
 In TCP, there is no field for segment number.
 There are 2 fields called the sequence number and
acknowledged number which refers to byte number.
 Byte Number- TCP numbers the data stored in sending buffer. It
generates a random number between 0 and 232 -1. It is used for flow
and error control.
 Sequence Number- It is the first byte carried in the segment. It is not
defined except for connection establishment, termination or abortion.
 Acknowledgement Number- It is used to confirm the bytes it has
received. It also defines the next byte number expected to be
received.
 The amount of data to be sent is controlled to prevent the
receiver from overflow.
 It is used to provide reliable service.
 It is used in error detection.
 It is byte-oriented.
 The amount of data sent is determined by the
level of congestion in the network .
 A packet in TCP is called a segment.
 It consists of a header followed data from the
application program.
 The header is 20 bytes without options and up to
60 bytes with options.
 Source port address- It is a 16-bit field which defines the port
number of the application program that is sending the segment.
 Destination port address- It is a 16-bit field which defines the
port number of the application program that is receiving the segment.
 Sequence number- It is a 32-bit field which defines the number
assigned to the first byte of data contained in the segment.
 Acknowledgement number- It is the 32-bit field which defines
the byte number that the receiver of the segment is expecting to
receive.
 HLEN- This 4-bit field indicates the number of 4-byte words in the
TCP header.
 Reserved- This is a 6-bit field reserved for future use.
 Control- It has 6 different control bits or flag that can be set. They
are:
o URG- The value of the urgent pointer field is valid.
o ACK- The value of the acknowledgement field is valid.
o PSH- Push the data.
o RST- To reset the connection.
o SYN- Synchronize sequence numbers during connection.
o FIN- Terminate the connection.
 Window size- It is a 16-bit field which defines the size of the
window in bytes.
 Checksum- It is a 6-bit field same UDP but its inclusion is
mandatory in TCP.
 Urgent pointer- It is a 16-bit field which is used when a segment
contains urgent data and it is valid only when the urgent flag is sent.
 Options- There can be up to 40-bytes of optional information that
in the TCP header.
 TCP establishes a virtual path between the
source and destination.
 Transmission requires three phases:
1. Connection Establishment
2. Data Transfer
3. Connection Termination
 The data is being sent simultaneously when two TCPs
are connected.
 The two machines should get approval from the other
party before the data is transferred.
 Three-way handshaking- The connection establishment
in TCP is called three-way hand shaking.
 Simultaneous Open- It occurs when both processes issue
an active open. In this case, both TCPs transmit a
SYN+ACK segment to each other and one single
connection is established between them.
 SYN flooding attack-It is a serious security problem
which happens when a attacker sends a large number
of SYN segment to server , pretending that is coming
from various clients by fake IP address. SYN+ACK
segments are sent to fake clients and is lost so the
server runs out of resources and may crash.
Some strategies to avoid the attack are:
• Imposing limit on connection request.
• Filtering out datagrams coming from unwanted source.
• Postpone resource allocation until the entire connection
is setup , using cookie.
 Data and acknowledgement are carried in the same
segment and travel in the same direction.
 Pushing data- The sending and receiving TCP buffers
the data when they arrive and delivers them to the
application program when ready or when it is
convenient for the receiving TCP. So the efficiency of
TCP increases.
 Urgent data- Application program needs to send
urgent bytes sometimes. The sending application
program wants a piece of program to be read out. It is
handled by URG bit.
 Termination of a connection is usually initiated
by the client.
 It allows either three-way handshaking or four-
way handshaking.
 TCP uses a sliding window to handle flow
control.
 It is a technique whose primary purpose is to
properly match the transmission rate of the
sender to that of the receiver and network.
 The transmission should be high for good
performance and protect against congestion.
 The sliding window is byte oriented and size is
variable.
 The TCP sliding window spans a portion of the buffer containing
bytes received from the process. The bytes inside the window are the
bytes that can be in transit without worrying about acknowledgment.
The imaginary window has two walls, left and right.
 The window can be opened, closed, or shrunk. Opening a window
moves the right wall to the right, thereby more bytes are eligible for
sending. Closing the window moves the left wall to the right, which
implies some bytes have been acknowledged. Shrinking the window
moves the right wall to the left, preventing bytes to be sent.
 The size of the window at one end is minimum of receiver window
(rwnd) and congestion window (cwnd). The receiver window value is
determined by the other end to act as flow control. The congestion
window is a value determined by the network to avoid congestion.
 It includes mechanism for detecting corrupted
segments, lost segments, out of order segments and
duplicated segments.
 Error detection and correction in TCP is achieved of
three simple tools
1. Checksum
2. Acknowledgement
3. Retransmission
1. Checksum
TCP includes a mandatory 16-bit checksum in every segment, which is used
to check for a corrupt segment. If corrupted, it is discarded by the destination
TCP and is considered as lost.
2. Acknowledgement
TCP uses acknowledgments to confirm the receipt of data segments. Control
segments that carry no data but consume a sequence number are also
acknowledged. ACK segments are never acknowledged and do not consume
sequence number.
3.Retransmission
The heart of error control mechanism is retransmission of segments. When a
segment is corrupted, lost, or delayed, it is retransmitted. Currently, a
segment is retransmitted either when a retransmission timer expires or when
the sender receives three duplicate ACKs.
• Retransmission after RTO
• Retransmission after 3 duplicate ACKs
• Out-of-order segments
Normal Operation—The client TCP sends one segment and the server
TCP sends three. When the client receives the first segment from the
server, it does not have any more data to send and sends only an ACK
segment. The acknowledgment is delayed for 500 ms to see if any more
segments arrive. When the timer matures, it triggers an
acknowledgment. When the next segment arrives, another
acknowledgment timer is set. However, before it matures, the third
segment arrives. The arrival of the third segment triggers another
acknowledgment.
NO. TCP UDP
1. It is connection oriented. It is connectionless
2. It is byte stream. It is message stream.
3. It does not support multicasting
and broadcasting.
It support broadcasting.
4. It provide error control &flow
control.
It does not provide error control &
flow control.
5. It supports full duplex
transmission
It does not support full duplex
transmission.
6. It is reliable. It is unreliable.
7. TCP packet is called segment. UDP packet is called datagram.
Sundra Anand
Prem Kumar.N

Transmission control protocol

  • 2.
     It isa connection oriented protocol.  It has Reliable feature for the services of IP.  It uses Flow and Error control mechanism at the transport level.  It creates a virtual connection between two TCPs to send data.  It does not support multicasting and broadcasting.
  • 3.
    1. Process-to-Process Communication 2.Stream Delivery Service 3. Full-Duplex Communication 4. Connection-Oriented Service 5. Reliable Service
  • 4.
    Port Protocol Description 7Echo Echoes a received datagram back to the sender 9 Discard Discards any datagram that is received 13 Daytime Returns the date and time 23 TELNET Terminal Network 25 SMTP Simple Mail Transfer Protocol 53 DNS Domain Name Server 67 BOOTP BootStrap Protocol 80 HTTP Hypertext Transfer Protocol 111 RPC Remote Procedure Call
  • 5.
     TCP isa Stream-oriented protocol.  It allows sending and receiving of data as a stream of bytes.  It needs buffer for storage in sending and receiving sides.  The sending side buffer has 3 chambers. 1. Empty chamber to be filled by sending process. 2. Holds the sent bytes until it is acknowledged. 3. Contains bytes to be sent.  The receiver side buffer has 2 chambers. 1. Empty chamber to be filled by the bytes received. 2. Contains bytes that can be read by receiving process.
  • 7.
     In TCPdata can flow in both the direction at the same time.  The segments move in both direction.
  • 8.
    In connection-oriented protocolthe following occurs:  The two TCPs establish a connection between them.  Data are exchanged in both the directions.  The connection is terminated. It is a virtual connection and not a physical one.
  • 9.
     TCP usesan acknowledgement mechanism to check the safe and sound arrival of data.
  • 10.
    1. Numbering System 2.Flow Control 3. Error Control 4. Congestion Control
  • 11.
     In TCP,there is no field for segment number.  There are 2 fields called the sequence number and acknowledged number which refers to byte number.  Byte Number- TCP numbers the data stored in sending buffer. It generates a random number between 0 and 232 -1. It is used for flow and error control.  Sequence Number- It is the first byte carried in the segment. It is not defined except for connection establishment, termination or abortion.  Acknowledgement Number- It is used to confirm the bytes it has received. It also defines the next byte number expected to be received.
  • 12.
     The amountof data to be sent is controlled to prevent the receiver from overflow.
  • 13.
     It isused to provide reliable service.  It is used in error detection.  It is byte-oriented.
  • 14.
     The amountof data sent is determined by the level of congestion in the network .
  • 15.
     A packetin TCP is called a segment.  It consists of a header followed data from the application program.  The header is 20 bytes without options and up to 60 bytes with options.
  • 17.
     Source portaddress- It is a 16-bit field which defines the port number of the application program that is sending the segment.  Destination port address- It is a 16-bit field which defines the port number of the application program that is receiving the segment.  Sequence number- It is a 32-bit field which defines the number assigned to the first byte of data contained in the segment.  Acknowledgement number- It is the 32-bit field which defines the byte number that the receiver of the segment is expecting to receive.  HLEN- This 4-bit field indicates the number of 4-byte words in the TCP header.  Reserved- This is a 6-bit field reserved for future use.
  • 18.
     Control- Ithas 6 different control bits or flag that can be set. They are: o URG- The value of the urgent pointer field is valid. o ACK- The value of the acknowledgement field is valid. o PSH- Push the data. o RST- To reset the connection. o SYN- Synchronize sequence numbers during connection. o FIN- Terminate the connection.  Window size- It is a 16-bit field which defines the size of the window in bytes.  Checksum- It is a 6-bit field same UDP but its inclusion is mandatory in TCP.  Urgent pointer- It is a 16-bit field which is used when a segment contains urgent data and it is valid only when the urgent flag is sent.  Options- There can be up to 40-bytes of optional information that in the TCP header.
  • 19.
     TCP establishesa virtual path between the source and destination.  Transmission requires three phases: 1. Connection Establishment 2. Data Transfer 3. Connection Termination
  • 20.
     The datais being sent simultaneously when two TCPs are connected.  The two machines should get approval from the other party before the data is transferred.  Three-way handshaking- The connection establishment in TCP is called three-way hand shaking.
  • 22.
     Simultaneous Open-It occurs when both processes issue an active open. In this case, both TCPs transmit a SYN+ACK segment to each other and one single connection is established between them.  SYN flooding attack-It is a serious security problem which happens when a attacker sends a large number of SYN segment to server , pretending that is coming from various clients by fake IP address. SYN+ACK segments are sent to fake clients and is lost so the server runs out of resources and may crash. Some strategies to avoid the attack are: • Imposing limit on connection request. • Filtering out datagrams coming from unwanted source. • Postpone resource allocation until the entire connection is setup , using cookie.
  • 23.
     Data andacknowledgement are carried in the same segment and travel in the same direction.
  • 24.
     Pushing data-The sending and receiving TCP buffers the data when they arrive and delivers them to the application program when ready or when it is convenient for the receiving TCP. So the efficiency of TCP increases.  Urgent data- Application program needs to send urgent bytes sometimes. The sending application program wants a piece of program to be read out. It is handled by URG bit.
  • 25.
     Termination ofa connection is usually initiated by the client.  It allows either three-way handshaking or four- way handshaking.
  • 28.
     TCP usesa sliding window to handle flow control.  It is a technique whose primary purpose is to properly match the transmission rate of the sender to that of the receiver and network.  The transmission should be high for good performance and protect against congestion.  The sliding window is byte oriented and size is variable.
  • 29.
     The TCPsliding window spans a portion of the buffer containing bytes received from the process. The bytes inside the window are the bytes that can be in transit without worrying about acknowledgment. The imaginary window has two walls, left and right.  The window can be opened, closed, or shrunk. Opening a window moves the right wall to the right, thereby more bytes are eligible for sending. Closing the window moves the left wall to the right, which implies some bytes have been acknowledged. Shrinking the window moves the right wall to the left, preventing bytes to be sent.  The size of the window at one end is minimum of receiver window (rwnd) and congestion window (cwnd). The receiver window value is determined by the other end to act as flow control. The congestion window is a value determined by the network to avoid congestion.
  • 30.
     It includesmechanism for detecting corrupted segments, lost segments, out of order segments and duplicated segments.  Error detection and correction in TCP is achieved of three simple tools 1. Checksum 2. Acknowledgement 3. Retransmission
  • 31.
    1. Checksum TCP includesa mandatory 16-bit checksum in every segment, which is used to check for a corrupt segment. If corrupted, it is discarded by the destination TCP and is considered as lost. 2. Acknowledgement TCP uses acknowledgments to confirm the receipt of data segments. Control segments that carry no data but consume a sequence number are also acknowledged. ACK segments are never acknowledged and do not consume sequence number. 3.Retransmission The heart of error control mechanism is retransmission of segments. When a segment is corrupted, lost, or delayed, it is retransmitted. Currently, a segment is retransmitted either when a retransmission timer expires or when the sender receives three duplicate ACKs. • Retransmission after RTO • Retransmission after 3 duplicate ACKs • Out-of-order segments
  • 32.
    Normal Operation—The clientTCP sends one segment and the server TCP sends three. When the client receives the first segment from the server, it does not have any more data to send and sends only an ACK segment. The acknowledgment is delayed for 500 ms to see if any more segments arrive. When the timer matures, it triggers an acknowledgment. When the next segment arrives, another acknowledgment timer is set. However, before it matures, the third segment arrives. The arrival of the third segment triggers another acknowledgment.
  • 34.
    NO. TCP UDP 1.It is connection oriented. It is connectionless 2. It is byte stream. It is message stream. 3. It does not support multicasting and broadcasting. It support broadcasting. 4. It provide error control &flow control. It does not provide error control & flow control. 5. It supports full duplex transmission It does not support full duplex transmission. 6. It is reliable. It is unreliable. 7. TCP packet is called segment. UDP packet is called datagram.
  • 35.