0% found this document useful (0 votes)
611 views23 pages

TCP Ip

TCP relies on IP for end-to-end delivery of the data. TCP and UDP multiplexing enables the receiving computer to know which application to give the data to. If the second TCP segment is lost, the web client replies an ack field equal to 2000.

Uploaded by

api-216820839
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
611 views23 pages

TCP Ip

TCP relies on IP for end-to-end delivery of the data. TCP and UDP multiplexing enables the receiving computer to know which application to give the data to. If the second TCP segment is lost, the web client replies an ack field equal to 2000.

Uploaded by

api-216820839
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

TCP/IP Overview

The TCP/IP Model


The Department of Defense (DoD) developed the TCP/IP reference model to provide a communication network that could continue to function in war time.

TCP/IP Applications

Transport Layer Protocols


The functions of TCP and UDP

Segment upper-layer application data

The Transmission Control Protocol


Each TCP/IP application typically chooses to use either TCP

or UDP based on the applications requirements. TCP provides error recovery, but it consumes bandwidth and uses more processing cycles. TCP relies on IP for end-to-end delivery of the data. Regardless of whether two computers are on the same Ethernet, or are separated by the entire Internet, TCP performs its functions the same way.

TCP Header and Functions

Multiplexing using port numbers. Error recovery Flow control Connection establishment and termination End-to-end ordered data transfer Segmentation

Multiplexing Using Port Number

The computer might be running many applications, such as a web browser, an e-mail package, or an FTP client. TCP and UDP both have a feature called multiplexing. TCP and UDP multiplexing enables the receiving computer to know which application to give the data to.

Error Recovery (Reliability)

To accomplish error recovery, TCP numbers data bytes using Sequence and Acknowledgment fields in the TCP header.

The Sequence number reflects the number of the first byte in the segment.
The Acknowledgment number implies the next byte to be received; this is called forward acknowledgment.

Error Recovery (cont)

If the second TCP segment is lost, the web client replies an ACK field equal to 2000, implying that the web client is expecting byte number 2000 next.

The TCP function at the web server then could recover lost data by resending the second TCP segment.
The TCP protocol allows for resending just that segment and then waiting, hoping that the web client will reply with an ack 4000.

Positive ACK
With positive acknowledgment and retransmission (PAR), the source sends a packet, starts a timer, and waits for an acknowledgment before sending the next packet. If the timer expires before the source receives an acknowledgment, the source retransmits the packet and starts the timer over again.

Flow Control Using Windowing


The Window field implies the maximum number of unacknowledged bytes allowed outstanding at any instant in time. The Window field is used by the receiver to tell the sender how much data it can send before it must stop and wait for the next acknowledgment. When there is no errors, the receiver grants a larger window to the sender. The window slides up and down based on network performance sliding window.

Connection Establishment

SYN: Synchronize
ACK: Acknowledgment

TCP three-way connection establishment occurs before any of the other TCP features can begin their work. The connection exists between the two sockets. TCP initialises the Sequence Number and Acknowledgment Number fields to any number that fits into the 4-byte fields.

Connection Termination

FIN: Finish

Before the device on the right sends the third TCP segment in the sequence, it notifies the application that the connection is coming down. It then waits on an akcnowledgment from the application before sending the third segment.

Data Segmentation Ordered Data Transfer


Each different type of data link protocol typically has a limit on the maximum transmission unit (MTU) that can be sent. MTU refers to the size of the Layer 3 packet that sits inside the data field of a frame - the default MTU size is 1500 bytes. TCP handles the fact that an application might give it millions of bytes to send by segmentingthe data into smaller pieces, called segments. Because an IP packet can often be no more than 1500 bytes, and because IP and TCP headers are 20 bytes each, TCP typically segments large data into 1460 bytes (or smaller) segments. The TCP receiver performs re-ssembly when it receives the segments and it must reorder segments that arrive out of sequence. UDP push its data to the upper layer to be reordered by upper protocols

The User Datagram Protocol

UDP is connectionless and provides no reliability, no windowing, and no reoredering of the received data. However, UDP provides data transfer, segmentation, and multiplexing using port numbers. The most advantage of UDP over TCP is that there are fewer bytes of overhead and it transfers data faster than TCP. UDP does not require waiting on acknowledgments or holding the data in memory until it is acknowledged.

The

Internet Layer Protocols

IP Protocol is responsible for: defining packet format and addressing scheme routing packets to remote hosts transferring data between the internet layer and the network access layer

Internet Layer Protocols


IP - connectionless, best-effort delivery routing of

packets.

ICMP - control and messaging capabilities.


ARP - determines the data link layer address for

known IP addresses. address.

RARP - determines the IP address for a known MAC

Internet Control Message Protocols


Used for Error reporting & management purposes.

Described in RFC 792. Message types include


Destination Unreachable. Host Unreachable. Port Unreachable.

Address Resolving using ARP

ARP request IP:150.151.10.6 MAC:?

IP:150.151.10.5 MAC: 00:F2:C3:43

IP:150.151.10.5

Resolves IP to Ethernet MAC addresses.

A router acts as a Proxy ARP

Reverse ARP
RARP request MAC:00:F2:C3:43 What's my IP?

IP:150.151.10.5 MAC: 00:F2:C3:43

MAC:00F2:C3:43

Resolves Ethernet MAC addresses to IP. Commonly found is diskless workstations

Network Access Protocols

The Network Access Layer is the host-to-network layer of the TCP/IP model.
Encapsulation of IP packets into frames Interface to the physical medium

Comparing TCP/IP with the OSI Model

You might also like