5.1. What do I need to start ?

Before you start building or configuring your network, you will need certain items. The most important of these are:

5.1.1. Current Kernel source(Optional).

Please note:

The majority of current distributions come with networking enabled. It may not be required to recompile the kernel. If you are running well known hardware you should be fine. For example: 3COM NIC, NE2000 NIC, or an Intel NIC. However, if you find yourself in the position that you do need to update the kernel, the following information is provided.

Because the kernel you are running now might not yet have support for the network types or cards that you wish to use, you will probably need the kernel source to recompile the kernel with the appropriate options.

For users of the major distributions such as Redhat, Caldera, Debian, or Suse, this no longer holds true. As long as you stay within the mainstream of hardware, there should be no need to recompile your kernel (unless there is a very specific feature that you need).

You can always obtain the latest kernel source from ftp.cdrom.com. This is not the official site, but they have LOTS of bandwidth and capacity. The official site is kernel.org, however, please use the above URL if you can. Please remember that ftp.kernel.org is seriously overloaded. Use a mirror.

Normally the kernel source will be untarred into the /usr/src/linux directory. For information on how to apply patches and build the kernel, you should read the Kernel-HOWTO. For information on how to configure kernel modules, you should read the ``Modules mini-HOWTO''. The README file found in the kernel sources and the Documentation directory are very informative: for the brave reader!

Unless specifically stated, I recommend you stick with the standard kernel release (the one with the even number as the second digit in the version number). Development release kernels (the ones with the odd second digit) may have structural or other changes that may cause problems working with other software on your system. If you are uncertain that you could resolve those sorts of problems, then don't use Development release kernels.

5.1.2. IP Addresses: an Explanation.

Internet Protocol Addresses are composed of four bytes. The convention is to write addresses in what is called `dotted decimal notation'. In this form, each byte is converted to a decimal number, (0-255). It drops any leading zeros (unless the number is zero) and written with each byte separated by a `.' character. By convention, each interface of a host or router has an IP address. It is legal for the same IP address to be used on each interface of a single machine, but usually each interface will have its own address.

Internet Protocol Networks are contiguous sequences of IP addresses. All addresses within a network have a number of digits within the address in common. The portion of the address that is common amongst all addresses within the network is called the `network portion' of the address. The remaining digits are called the `host portion'. The number of bits that are shared by all addresses within a network is called the netmask. It is the role of the netmask to determine which addresses belong to the network it is applied to and which don't belong. For example, consider the following:

       -----------------  ---------------
        Host Address       192.168.110.23
        Network Mask       255.255.255.0
        Network Portion    192.168.110.
        Host portion                  .23
        -----------------  ---------------
        Network Address    192.168.110.0
        Broadcast Address  192.168.110.255
        -----------------  ---------------

Any address that is 'bitwise anded' with its netmask will reveal the address of the network that it belongs to. The network address is therefore always the lowest numbered address within the range of addresses on the network, and it always has the host portion of the address coded in all zeroes.

The broadcast address is a special address that every host on the network listens to (in addition to its own unique address). This address is the one that datagrams are sent to if every host on the network is meant to receive it. Certain types of data, like routing information and warning messages, are transmitted to the broadcast address so that every host on the network can receive it simultaneously. There are two commonly used standards for the broadcast address. The most widely accepted one is to use the highest possible address on the network as the broadcast address. In the above example, this would be 192.168.110.255. For some reason other sites have adopted the convention of using the network address as the broadcast address. In practice it doesn't matter very much which you use, but you must make sure that every host on the network is configured with the same broadcast address.

For administrative reasons (some time early in the development of the IP protocol), some arbitrary groups of addresses were formed into networks. These networks were grouped into what are called classes. Classes provide a number of standard size networks that could be allocated. The ranges allocated are:

       --------------------------------------------------------------------------------
        | Network           | Netmask       | Network Addresses                 |
        | Class                         |                                |                                                                    |
        --------------------------------------------------------------------------------
        |    A    | 255.0.0.0                                   | 0.0.0.0    - 127.255.255.255   |
        |    B    | 255.255.0.0                         | 128.0.0.0  - 191.255.255.255 |
        |    C    | 255.255.255.0                       | 192.0.0.0  - 223.255.255.255 |
        |Multicast| 240.0.0.0                           | 224.0.0.0  - 239.255.255.255 |
        --------------------------------------------------------------------------------

What addresses you should use depends on exactly what it is that you are doing. You may have to use a combination of the following activities to get all the addresses you need:

Installing a Linux machine on an existing IP network

If you wish to install a Linux machine onto an existing IP network, then you should contact the network administrator and ask them for the following information:

  • Host IP Address

  • IP network address

  • IP broadcast address

  • IP netmask

  • Router address

  • Domain Name Server Address

You should then configure your linux network device with those details. You can not make them up and expect your configuration to work.

Building a brand new network that will never connect to the Internet

If you are building a private network, and you never intend that network to be connected to the Internet, then you can choose whatever addresses you like. However, for safety and consistency reasons, there have been some IP network addresses that have been reserved specifically for this purpose. These are specified in RFC1597 and are as follows:

       -----------------------------------------------------------
        |         RESERVED PRIVATE NETWORK ALLOCATIONS            |
        -----------------------------------------------------------
        | Network | Netmask       | Network Addresses             |
        | Class   |               |                               |
        -----------------------------------------------------------
        |    A    | 255.0.0.0     | 10.0.0.0    - 10.255.255.255  |
        |    B    | 255.255.0.0   | 172.16.0.0  - 172.31.255.255  |
        |    C    | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 |
        -----------------------------------------------------------

You should first decide how large you want your network to be, then choose as many of the addresses as you require.