IT Lecture Notes by Mark Kelly, McKinnon Secondary
TCP/IP |
TCP/IPA combination of two packet-switching protocols (Transport Communications Protocol and Internet Protocol) that forms the basis of all Internet communications. TCP is the protocol used to break messages into packets in the sending computer, and also to reassemble them in the destination computer. TCP on the receiving computer keeps track of the packets as they are received. Since all the consecutively-numbered packets that make up the original file might have taken different routes across the internet, some get delayed or lost. If TCP on the receiving computer detects that the next packet has not arrived, it notifies the sending computer to ask for another copy of the packet. If nothing is heard from the sender, the receiver asks again and again at increasing intervals until it decides to give up and break the connection. TCP is so highly developed on the Internet that it can be used to establish functioning connections that work even if half the packets get lost on the way. IP is the protocol that routes packets across the Internet from source to destination. Each IP packet contains the data to be transmitted, plus the sender's and recipient's IP addresses.
|
For those who like the gory details, here's the structure of an IP packet
|
How error checking is done Cyclic Redundancy Check (CRC) takes the sum of all the 1s in the packet's data and adds them together. The result is stored as a hexadecimal value in the packet. The receiving device adds up the 1s in the payload and compares the result to the value stored in the trailer. If the values match, the packet is good. But if the values do not match, the receiving device sends a request to the originating device to resend the packet. |
Another explanation...
|
Adapted from http://www.nic.funet.fi/index/FUNET/history/internet/en/tcpip.html |
|
The Internet Protocol, or IP, packet forms the basis of the operation of the entire Internet . Each packet contains the data to be transmitted, plus an address field whose contents include the sender's and recipient's IP addresses. These numbers correspond to the post code and street number on a post card, i.e. the packet is delivered using the IP number. As with a postcard, an IP packet can take different routes and, especially during busy periods, get delayed or lost on the way. The success of the Internet is founded on the way that IP packets are simple and fast to pass on, i.e. route, from one network to another, because there is no need to keep a record of each packet, or to stop and wait for acknowledgements at each intermediate node. For most purposes, however, it is necessary that all the data chopped up into packets arrive at its destination unchanged and in the right order. For this, TCP (Transmission Control Protocol) has been defined. With TCP, the receiver tells the sender if it got all the consecutively numbered packets, or whether some should be sent again. If nothing is heard from the receiver, it may be that the acknowledgements have simply got lost, or the connection has broken. In this situation, the sender performs retransmissions at increasingly long intervals, until finally, usually after several minutes, it decides to break the connection. TCP is so highly developed on the Internet that it can be used to establish functioning, but slow, connections that work even if half the packets get lost on the way. Not all applications, for instance Internet phone calls, can wait for retransmission of lost packets, and so they are designed to use unreliable datagrams. Alongside TCP, Unreliable Datagram Protocol (UDP) has been defined, which allows, for example, speech information to be sent in RTP (Real Time Protocol) packets with time stamps. Because a computer can have several connections at once, the connection protocol generally uses the port numbers of the sender and receiver. These can be compared to post boxes inside a building. The receiving program looks at the messages received by its post box and sorts them into separate piles according to their sender, to wait for a reply, e.g. a web page. |
Back to the IT Lecture Notes index
Created November 26, 2002
Last changed:
November 15, 2006 1:58 PM
IT Lecture notes copyright © Mark Kelly 2001-