ST-CS-10-339-75
March 2002

SECTION III

NETWORK CONFIGURATION  (S)

1.  Introduction to TCP/IP  (S)

TCP/IP is responsible for getting data generated by an application from one computer to another. This page explains the basic principle of TCP/IP. It is important that the this is understood since this knowledge is crucial to understanding network layer configuration.

In our case, the application is Half-life and the data generated by that (player movements, guns firing, etc) is sent from the players computer to the server. (The server of course is also sending data to the player).

A typically configured Half-life client generates about 1500 bytes of data per second, which needs to be sent to the server. Data is not sent the instant it is generated; it is kept on the players computer until enough data has been accumulated (usually about 600 bytes or so, which takes about 0.4 seconds) and this "packet" of data is then sent.

The reason it is done this way (packets) has to do with design decisions about how TCP/IP should work made several decades ago.

The Internet is basically composed of many seperate networks. A network is a group of computers which are all connected together. Each network connects to several other different networks (so there are many different routes between any given two networks). It's basically a big splodge of networks and connections. When a player dials up on his 56k modem, his computer temporarily becomes part of the network his ISP maintains.

Every computer has a unique identifier - it's IP address. An IP address consists of four number, which range from 0 to 255, seperated by periods, e.g. 63.12.121.1. Each number has a different meaning;

major_network . network . minor_network . specific_computer

Each network is assigned (by a central organisation) a range of IP addresses which it can use for the computers in its network. For example, an organisation might be given the IP addresses 62.*.*.*. It can use any IP addresses which have 62 as their first number. A smaller organisation might be given 80.125.*.* - it can use any IP addresses starting with 80.125.

When a computer wants to send data to another computer, it has to know the other computer's IP address. In our case, our player knows the IP address of the CS server he wishes to connect to. The application on the computer (Half-life) generates a packet of data and gives this to the TCP/IP software, which in turn attaches a header to it (specifying the IP address of the destination) and then chucks it out into the network.

Each computer maintains a list of computers which take care of packets which have to go to a computer inside a given range of IP addresses. A simple computer, such as the one running a Half-life client, will only know about one range of IP addresses - all of them, 0.0.0.0 to 255.255.255.255 - and will have one computer to send packets to (the gateway on the network).

That computer in turn will be a bit brighter, and know about several sets of IP addresses (e.g. 58.*.*.*, that's IBM, 59.*.*.*, that's AOL, and so on), and will send packets to the appropriate computer for each range - and that computer is run by that organisation and will know about the networks maintained by that organisation.

And important subtlety here is that there can be more than one appropriate computer for each range of IP addresses (e.g. more than one computer is maintained which knows how to deal with IP addresses in a given range). This is done in case the first computer goes down, or if the link to that computer is very busy or has failed; the second computer can be used instead, making the system more robust.

So the IBM computer which recieves all packets for 58.*.*.* will know about 58.1.*.* (accounting) and 58.2.*.* (engineering) and so on, and will in turn send the packet to the computer which looks after that network - which in turn will send the packet on to a computer which knows about the minor network (58.1.1.*, billing, 58.1.2.*, payroll, etc) which finally will know about the specific computer the packet was sent to.

So; the point of all this is that a packet of data is dispatched by the players computer, travels through several other computers and network links and finally reaches the destination.

Each packet can end up taking a seperate route, depending on the decisions made by the computers along the way as to exactly which appropriate computer the packet should be send to.