TCP/IP is an abbreviation of Transmission Control Protocol / Internet Protocol Suite

The suite, correctly called Internet Protocol Suite, is made up of several protocols TCP and IP are just the most well known ones so TCP/IP has become the popular name.

TCP/IP is built using the OSI model and some specifications from the United States Department of Defence. As shown in the diagram TCP/IP uses only layers 3 to 7 in the model.

The Protocols

As well as containing TCP and IP the Internet Protocol Suite also has the following protocols:

  • Serial Line Internet Protocol (SLIP)
  • Point-to-Point Protocol (PPP)
  • Internet Control Message Protocol (ICMP)
  • Interior Gateway Protocol (IGP)
  • Exterior Gateway Protocol (EGP)
  • User Datagram Protocol (UDP)
  • Telnet
  • File Transfer Protocol (FTP)
  • Trivial File Transfer Protocol (TFTP)
  • Simple Mail Transfer Protocol (SMTP)
  • Gopher protocol
  • Hypertext Transport Protocol (HTTP)

For the purposes of this document I will only focus on the major ones.

 

File Transfer Protocol (FTP)
This is possibly one of the most used protocols other than HTTP. FTP provides a standard way for computers to access directory listings, retrieve and upload files on remote computers. This protocol works regardless of the operating system that either system is using. Often this takes place when a home user with Windows 9x accesses a UNIX FTP server over the Internet.

 

Simple Mail Transfer Protocol (SMTP)
This is the protocol that e-mail clients (programs) use to access and retrieve e-mail messages from a mail server.



HyperText Transport Protocol (HTTP)
HTTP is the protocol that gives life to the Internet. Without it there would be no text and image based web sites. It defines the process used to transmit text and binary files (eg. images and sound) to web browsers and programs that depend on online content.

 

Telnet
Telnet is a service that allows remote computers or terminals to access and logon to a central system this is often implemented over LAN’s to provide company users access to UNIX based systems.

 

Basic Principal

Transmission Control Protocol is responsible for breaking data down into "Datagrams" (sections of larger files / messages) and passing them to the IP layer. At the receiving end TCP reassembles the datagrams into the larger file in the process checking for errors and reordering sections that arrive out of order (something that often happens on larger networks).

In order to achieve this flow control and error checking TCP attaches "headers" to each datagram. These headers are a lot like headers on the pages of a book they contain information about the current section of data and its purpose.

 

Octets

An octet is a chunk of data eight bits in size.

Because of its cross platform use TCP has to have its own "word size", that is it has a set number of bits that make up one chunk. By using an independent size TCP is able to operate on systems that have a byte size other than 8 bits.

 

The Header

Every datagram that TCP sends over the network has a header attached. The header contains information regarding the sender, receiver, size of the next datagram to be sent and where the current one fits into the larger file.

Source and Destination Ports
When TCP is communicating with another computer it is possible for their to be other simultaneous conversations going on between the two systems and others. So TCP assigns each transfer a port number.

Because the two systems could choose different numbers it necessary to include source port so that the receiving computer knows where to send receipt acknowledgment and the destination port so that the receiving computer knows which conversation the datagram is part of.

 

Sequence Number
Because TCP/IP is a connectionless technology each datagram can take a totally different route to its designation. This means that some of the datagrams will inevitably arrive out of their original order. TCP assigns each datagram a Sequence Number so that it can reassemble the data correctly.

TCP does not assign a number to each datagram (eg. 1, 2, 3, 4…). Instead it states how far from the first octet that it begins (eg. 0, 500, 1000, 1500, 2000).

 

Acknowledgment Number
When a datagram reaches the receiving computer it has to send back a datagram containing an Acknowledgment Number. This number is an echo of the Sequence Number. It tells the sending computer that it has received a particular datagram. If the sending computer does not receive acknowledgment with in a set amount of time it assumes the data is lost and sends it again.

 

Window
This feature is like a throttle. While Acknowledging the receiving computer specifies how much data it is able to receive. The sending computer will then continue to send datagrams until it reaches the maximum then it must wait until it receives a another datagram with a window number larger than zero.

This prevents the receiving computer from being overloaded by the incoming data. It also promotes efficient operation because fewer datagrams are lost because the machine is tied up processing others.

 

Checksum
The checksum is used by TCP to decide if a datagram has become corrupt during sending. It works by performing a mathematical calculation on the message data and writing it to the header. The receiving computer performs the same calculation and compares the results with the header. If the results are different it requests the datagram to be sent again.

 

Urgent Pointer
This tells the receiving computer to jump ahead to a particular octet and begin processing there. This can be used for interrupting to send a command to the remote computer.

 

Internet Protocol (IP)

IP has a simple purpose to get each datagram to its destination. Unlike TCP, IP is concerned with how the datagrams get there. IP breaks up datagrams into smaller pieces called packets. Each packet then has another set of headers added to it.

IP uses an addressing system called strangely enough… IP numbers. Each computer on an IP run network has a unique IP number (this rule can be bent). The number is made from four octets each capable of ranging between 0 and 255 but not including them.

 

Domain Names and IP Numbers

Because IP is designed to be a protocol that works over many interconnected networks it needs a system that allows client computers to describe the location of its target which could be separated by many networks.

As noted above IP numbers have four sections, each section narrows down the location of the target computer. The first two numbers refer to a larger network like a university or an ISP. The third number refers to anyone of 244 LAN’s within that network. The last number identifies a physical computer connected to that LAN.

An IP address: 205.167.0.1

It would be quite difficult to operate a network where each computer is referred to by only a number. This would not make the Internet very user friendly. To get around this problem Domain Name Servers are used. Domain Name Servers are able to take a string of user friendly text such as "www.geocities.com" and return the IP number to the requesting program (usually a web browser) in an invisible fashion.

 

Routing

This is the term used to describe what happens to packets sent through a network. Routing is something that IP specialises in. IP passes packets through each node in the network. Each time a packet arrives at a node the node assesses the best route for the packet to be sent down to get to its target in the fastest most reliable fashion.

 

The Header

Just like TCP each IP packet has its own header attached. It includes the source, destination and error checking facilities.

 

Only the header items that need explanation are listed below.

 

Version
This contains the current version of TCP/IP being used.

 

Fragment Offset
Like TCP, IP has a system for showing what part of a larger whole the current packet is. This number shows what part of the datagram the packet makes up.

 

Time to Live
Time to live prevents packets being caught in a loop. When data is being sent through a network a situation can arise where a server redirects a packet and then has it directed back at it. Being an automated system the packet will just keep bouncing around. To prevent this, each time a packet passes through a node the time to live number is reduced. When it reaches zero the packet is discarded.

 

Protocol
Because IP can be used with protocols other than TCP each packet needs to show which protocol it is to be used with.

 

Header Checksum
IP has its own check sum that insures that the header information in each packet has not been damaged.

 

Source and Destination Address
These two sections are the IP numbers of the sending computer and the destination. Servers / nodes read these numbers to determine how to route the packet.