SUPPORT


What is TCP / IP

IP (Internet Protocol)

The Internet Protocol, like the name suggests, is the basis of Internet communication. IP in itself can be likened to putting a stamp on a postcard and posting it to Guatemala. No guarantee is made that the card will reach the sender, but the odds are reasonable given previous usage. This means that from the postal carrier's point of view, the card can either be lost or discarded without any legal comeback, expensive notification or the need for an expensive card recovery system.
If we think of transferring this into the global networking arena, 'expensive' can be viewed as building in complicated algorithms and error detection and recovery systems into every piece of low-level network hardware between each communication machine across the globe. This would not only be expensive in terms of money but also in terms of bandwidth with every piece of low level network hardware producing its own error control and recovery packets.
With the use of IP, low level networking hardware, hubs, routers etc. do not need to be concerned with such overheads and can instead concentrate on the efficient transfer of packets and throughput speed. If a connection fails or a switch becomes overloaded, it can simply expunge excess packets it cannot transport and start again.
It is up to protocols acting above IP to implement some form of reliable connection based upon unreliable IP.

IP Address

In order for addressing to take place between one node and another node across the internet, each visible node on the internet must have a unique IP address which takes the form of four groups of numbers between 0 and 255, for example 193.218.86.42 . This allows just over 4 billion possible unique addresses.

When the address is viewed in binary form, we have 4 x 8 bits (Referred to as 'Octets') to produce a 32 bit wide number. IP address's a broken up into different classes dependant on the importance of the organisation (E.g. government) and the amount of address's required.
In order to identify the location of the host in a hierarchal manner, we have octets that uniquely identify the network - Net, and octets that uniquely identify the host within that network - Host. The Net section always contains the first octet. The Host section always contains the last octet.

ARP and the Relationship to MAC

IP addresses need to be able to be related to the MAC (Media Access Control) unique address of each network node or network card. A protocol contained within IP is known as ARP (Address Resolution Protocol) resolves an IP address of a machine to its physical MAC address.
For example, before machine A starts transmitting data to machine, it will send an ARP frame to the network where computer B is located - signified in the IP address, and at this point causes a broadcast to occur to all machines on that network. The ARP frame contains the senders (machine A's), MAC address, IP address together with a blank target MAC address and target IP address to be filled in.
If computer B is located in the same network as computer A, computer B will receive the ARP frame, note that it is meant for itself and will send an ARP reply containing the same information as the ARP frame but the target MAC address being filled in. If machine B is on another network that is terminated with an intelligent device, advanced switch etc. then it may return the required ARP frame filled in on behalf of machine B.
Machine A and B can now communicate using each others MAC addresses.

ARP stores the connection between the IP Address and the MAC address in an address translation table. Next time the computer needs the MAC address the solution stored in the table is used. To keep information fresh, the table is periodically cleared and refreshed.

IP Address Classes

  • Class A - For the largest networks, international Corporation etc. IP addresses with a first octet from 1 to 126 are part of this class - representing the Net section. The other three octets are used to identify each host. This means that there are 126 Class A networks each with 16,777,214 possible hosts.
  • Net Host 120. 24.53.107 Class B - For medium sized business's, national business etc. Signified by IP addresses with a first octet from 128 to 191. Class B addresses also include the second octet as part of the Net identifier. The other two octets are used to identify each host. This means that there are 16,384 Class B networks each with 65,534 possible hosts.
  • Net Host 160.24. 53.107 Class C - for small to medium business or institutions. Signified by IP addresses with a first octet from 192 to 223. Class C addresses also include the second and third octets as part of the Net identifier. The last octet is used to identify each host. This means that there are 2,097,152 Class C networks each with 254.
  • Net Host198.24.53. 107 Class D - Used for multicasts, signified by the use of an IP address of 224 in the first octet. The other 28 bits of the address are used to identify the group of computers the multicast message is destined for.
  • Net Host224. 24.53.107 Class E - used for development and experimental purposes only.The other 28 bits are used to identify the group of computers the multicast message is intended for.
  • Net Host240. 24.53.107 Broadcast - Messages that are intended for all computers on a network are sent as broadcasts - such as applications trying to establish potential node clients for their service. These messages always use the IP address 255.255.255.255.
  • Loopback - Used by the host computer to send a message back to itself. Normally used for testing and development work.

Subnet Mask

Subnet mask is a 32-bit wide address that indicates how many bits in an IP address are being used for the network ID or Net portion of the IP address. The subnet mask indicates the length of network ID by using all ones in the portion of its address that corresponds to the network ID of the address it is being used with, zeros to represent the host portion of the address.
Sub netting allows the network administrator (The person responsible for set-up and maintenance of the network) to further divide the host part of the address into two or more subnets. This may be done to divide a network into further discrete groups - via their subnet - and help localise traffic by placing a router between different subnets.
In this situation a part of the host address is reserved to identify the particular subnet. This is easier to see if we show the IP address in binary format. The full address is:
10010110.11010111.00010001.00001001
The Class B network part is:
10010110.11010111
and the host address is
00010001.00001001
If this network is divided into 14 subnets, however, then the first 4 bits of the host address (0001) are reserved for identifying the subnet.
The subnet mask is the network address plus the bits reserved for identifying the sub network. (By convention, the bits for the network address are all set to 1, though it would also work if the bits were set exactly as in the network address.) In this case, therefore, the subnet mask would be 11111111.11111111.11110000.00000000.
This value can be used to identify the subnet to which an IP address belongs by performing an operation known as a bit wise AND where the only the addition of two bits with a value of 1 will result in a value of 1, otherwise the result is 0. Using this from the class B address we get:
Subnet Mask 255.255.240. 000 11111111.11111111.11110000.00000000 IP Address 150.215.017.009 10010110.11010111.00010001.00001001
Subnet Address 150.215.016.000 10010110.11010111.00010000.00000000
The subnet address, therefore, is 150.215.016.000.

OSI Seven Layer Model

In order to model network protocols, the defacto standard is the OSI seven layer model (See Open Systems Interconnection (OSI) Reference Model).
This is a standard to model network protocols, segregating necessary tasks into separate discrete layers, with each layer communicating with other through a standard 'interface'.

Application Layer
describes how real work actually gets done.
E.g. would implement file system operations such as copying files into a shared network folder.

Presentation Layer
describes the syntax of data being transferred.
E.g. describes how floating point numbers can be exchanged between computers with different math formats.

Session Layer
describes the organization of data sequences larger than the packets handled by lower layers.
E.g. describes how request and reply packets are paired in a remote procedure call.

Transport Layer
describes the quality and nature of the data delivery.
E.g. defines if and how retransmissions will be used to ensure data delivery.

Network Layer
describes how a series of exchanges over various data links can deliver data between any two nodes in a network.
E.g. defines the addressing and routing structure of the Internet.

Data Link Layer
describes the logical organization of data bits transmitted on a particular medium.
E.g. defines the framing, addressing and check summing of Ethernet packets.

Physical Layer
describes the physical properties of the various communications media, as well as the electrical properties and interpretation of the exchanged signals.
E.g. defines the number of twists in a UTP Ethernet cable, the type of RJ45 connector and socket used etc.

IP works at the Network Layer, leaving the layer above to deal with reliability of data delivery - Transport.

Open Systems Interconnection

TCP/IP (Transmission Control Protocol / Internet Protocol)

By far, the vast majority of networks use the Transmission Control Protocol (TCP/IP) - based upon the Internet Protocol (IP).
TCP exists in the Transport Layer of the OSI model, using IP as the basis, but building upon that to provide additional protocol mechanisms to provide reliable data delivery.
The protocol allows the transmission of groups of bytes or 'Packets' between programs on different machines connected to the network. Packets may also be transmitted between programs on the same machine.

The main two types of communication used on top of IP are:

  • Connection Orientated - TCP/IP - using a transmit/receive/ acknowledge form of communication, it retransmits any missing packets and ensures that the receiving machine reads the bytes sent in the same order as they were transmitted. Uses the 'sliding-window' technique (See TCP Sliding Window & Packet Overview), timeouts and acknowledgements to achieve this.
  • Connectionless - UDP/IP (Unreliable Datagram Protocol) - using a pure transmission to target form of communication. No acknowledgements etc. and no packet receive ordering checks. Often referred as the unreliable protocol, with less overhead it does offer better time related performance and is applicable for many specific situations. An example of this is where a single packets loss during transmission does not affect overall performance - such as in video streaming. If the TCP/IP protocol was used unmodified, then the receiving machine would wait for the missing packet (Containing part of an image frame) to be retransmitted causing a glitch in the video presentation. Further the overhead of TCP/IP would reduce the frame rate.

Ports

For an application on one machine to talk to an application on another machine, it requires two elements - a machines name or IP address (E.g. 193.218.65.14) and a port number to connect to. There can be anything up to 65536 ports on a typical network machine - common ports used are 25 for SMTP (Sendmail), 23 for FTP, 21 for Telnet, 80 for HTTP (Web browsers connect to this port using HTTP to retrieve HTML documents) etc.
One analogy is to think of a high rise block of flats (Representing the computer and network connection) and a series of post boxes (Representing Ports) relating to each flat occupier (Representing services or programs on the computer communicating through TCP/IP and the network connection).
One flat occupier can receive correspondence from many different sources, such as HTTP requests received on Port 80 for web site pages to be returned. Simultaneously requests might be coming in on Port 21 by an FTP (File Transfer Protocol) application wishing to upload web pages to a web site residing on the computer.

TCP sliding window

Demon is a brand of THUS   |   © Copyright 2008 THUS