TCP/IP Primer

© 1997 Digital Integration (NZ) Ltd

 

If you are involved in planning, setting up or administering an internet based e-mail system, it is useful to have a basic working knowledge of TCP/IP. This section will provide you with the basics of how TCP/IP interconnectivity works and also some of the basic configurations for various systems that are available.

 

What is TCP/IP?

TCP/IP is a defined method of transferring data from one computer program to another, regardless of the operating system or hardware. The term 'TCP/IP' is an acronym for Transmission Control Protocol / Internet Protocol'. TCP/IP was developed in the late 60's by the U.S. Department of Defence (DOD).

One of the key benefits of this protocol is its method of breaking down a large piece of data into 'packets' and sending these from one point to another using any currently available path. Each packet will may take a completely separate path, or even be returned to the originator to be resent. This dispersion of data, especially in the case of defence departments, allows data to reach its destination even when parts of the network are down. As you can see in the example, even when a number of hosts and transmission links are down, data will still find a way to the destination. Multiply this by a factor of millions of PC's, routers and communication lines, such as the worldwide internet, and you can see how it becomes very difficult, if not impossible, to destroy a countries communications.

So, TCP/IP is a standard which defines the means of getting data, reliably, from source to destination over a multitude of connected networks, hence the term 'Internet'.

 

TCP/IP Numbering

Many software programs which use TCP/IP have two way conversations with each other. In order to do this they need to know how to reach the other program. Just as we might have a phone number at the office, TCP/IP programs need to know the number of their peer. This is acheived through the use of TCP/IP addresses, or numbers.

TCP/IP numbers are defined as four numbers between 0 and 255, separated by dots, i.e. 192.168.0.1. Within this numbering scheme there are three 'Classes' of numbering schemes. Class A, B and C.

Each class breaks the four numbers into two sections, a network identifier and a host (also called node) identifier. The reason for breaking these into segments is to allow TCP/IP routers which transfer data between systems and networks to find other computers without randomly searching all known networks. Imagine if every computer on the planet that is connected to the internet all looking up data at the same time without knowing where to go to get the information. The net would be clogged up and unusable within seconds. By numbering networks and interconnecting them, smart routers find and remember the shortest path to the destination. Similarly data that is being sent within a single network never needs to leave that network, which is how dial-on-demand routers work.

Each class uses up to three of the first bits of the first IP number to determine its class.

A Class A address uses the remainder of the first byte to determine its network number and the last three bytes for host numbers. This allows for a total of 127 networks in this class with millions of nodes on the network.

Class B uses the remainder of the first two bytes for its network number and the last two for the host numbers, supporting about 16,000 networks and about 60,000 nodes per network.

Class C, the most common, uses the first three bytes to identify the network and the last byte for the hosts. This allows millions of networks with 255 hosts per network. Many large companies will often implement a number of class C networks rather that a more unruly class B system.

For each class there are a set of reserved addresses which may be freely used for your internal network, as long as you do not try to connect these IP numbers to the internet you should be fine. Do not setup your network with randomly picked numbers as you will, however unlikely, have trouble connecting to a site which actually owns the network address. Using an IP address translation system such as the one provided with Novell BorderManager or WinGate for Windows NT/95 you can have a single 'real' IP address assigned by your ISP dynamically or statically which will convert, and pretend, that the data coming from your network is actually all coming from the one 'real' IP address. The data is then converted back to the initiating hosts 'private' address on the way in.

The reserved addresses for private use are:

Class A: 10.0.0.0 - 10.255.255.255.255

Class B:172.16.0.0 - 172.31.255.255

Class C: 192.168.0.0 - 192.168.255.255

In a basic, single wire or hub, network for two hosts to talk to each other they must be on the same TCP/IP network number with different host numbers. In the example below, we see a class C network with a network number of 192.168.0 and a host range from 1-254. Note the host with address 192.168.3.5, this station will not be able to access the local TCP/IP network because it is on another network number.

If you have multiple network segments you will require a router to pass TCP/IP traffic between them. Most popular network servers will serve this purpose. The diagram shows a typical TCP/IP network with a server that has two network cards. These two cards MUST have different TCP/IP networks.

As this is not a full manual on how to use and implement TCP/IP we will only touch on subnet masks. Subnet masks are a filter which allows a single TCP/IP network number to be split into multiple networks, thus the name subnetting. To learn more about this, any decent book on the TCP/IP protocol should be a good guide. Suffice to say however the following are the default subnet masks you should use for each class:

Class A subnet mask: 255.0.0.0

Class B subnet mask: 255.255.0.0

Class C subnet mask: 255.255.255.0

 

DNS

The Domain Name System gives TCP/IP addresses a human readable format. Put quite simply, DNS names are human readable IP addresses. When you enter a DNS name into an application such as a browser (i.e. www.di.co.nz) it looks up the associated hosts IP address either in a local table (normally the HOSTS file) or asks a DNS server which will either return the IP address or fetch it for the application.

 

TCP/IP Ports

A program that is accessible via TCP/IP such as i-Mail makes itself available through TCP 'Ports'. These ports are the interface between TCP/IP applications and must be unique for each program that 'listens' for clients on any given IP address. An example is a POP3 mail server such as i-Mail which, by default uses port 110 as this is the standard port for POP3 servers. Similarly SMTP uses port 25. By defining standard ports for TCP/IP applications developers can write applications for both servers and clients, regardless of the hardware or operating system. It is possible to run some software with non-standard ports, however both the client and server applications must support the unique configuration.

 

 

 

© 1997 Digital Integration (NZ) Ltd