next up previous
Next: DNS Configuration Up: Preparation Previous: Packages

Subsections


Configuring Your Private Network

Before starting on this adventure, you need to configure the private network correctly so that hosts and network numbers are recognised correctly and so that external host names can be found.


Host and Network Configuration

To configure the private network, you will need to allocate IP numbers to the machines on your network and set up hosts files on the Unix systems that contain the correct host names. If you are setting your systems up from scratch, the configuration scripts will probably set up much of what is in here automatically.

I'm assuming that you have an Ethernet network here. If you have some exotica, such as token-ring, then you will need to find the appropriate names for things.


Choosing a network number

The private network must have a network number which comes from a particular set of numbers set aside by the NIC for use as private networks.[16,4] This way, any packets which stray out of your network will be rejected by Internet routers and not run amok on the information superhighway.

Your choices are: 10, 172.16-172.31 and 192.168.0-192.168.255. It's logically sensible to choose a class C network, such as 192.168.23, but you can also pick a class B or class A network and subnet, if you wish. For reasons of pure spite, I'm going to use an example network which is the class A network, 10, subnetted to be 10.5.3.

From this network number, you need to assign IP numbers to each machine. In this example, the IP numbers are 10.5.3.1 for solaris 10.5.3.21 for win95 and 10.5.3.22 for linux.


Unix-specific Configuration

The Unix systems (solaris and linux) can use files in the /etc directory to identify hosts and network information. As we configure the other parts of the system, we will add to these files, but for now, we can set up the various files as needs be.


The /etc/hosts file

The /etc/hosts file contains symbolic names for (usually) local hosts. It contains tab separated entries for each host and its IP address. A sample hosts file is:



127.0.0.1    localhost loghost
#
#    Private network
#
10.5.3.1     solaris
10.5.3.21    win95
10.5.3.22    linux


Comments have a hash symbol (#) in front of them. 127.0.0.1 is the loopback address, essentially meaning ``this machine''. Hosts can have multiple aliases (eg. loghost for localhost in the above example).


The /etc/networks file

The /etc/networks file contains symbolic names for networks, in a similar format to the the /etc/hosts file. A sample networks file is:



loopback    127       # Intra-machine communication network
private     10.5.3    # Local private network


It is not strictly necessary to set up the networks file, but it does help.


The /etc/netmasks file

If you have been sensible, and chosen a private network from the 192.168.0-192.168.255 range, then you do not have to worry about setting up the /etc/netmasks file. Strictly speaking, you do not have to do this with the other networks as well. However, you can set things up so that you are running a small subnetwork.

The /etc/netmasks file says how much of the IP number you have is network and how much is host number. In the example that I am using, the first three IP numbers represent the network and the last number is the host number. A sample /etc/netmasks file is:



# Network   Mask
#
10.0.0.0    255.255.255.0



Solaris-specific Configuration

This section contains configuration specific to Solaris systems.

The /etc/hostname.le0 file consulted at startup to see what host this machine is. The file contains a single line giving the host name (solaris in this case).

The /etc/nsswitch.conf file tells the Solaris systems where to go to get names. Solaris can, as well as using the files described above, use a variety of network based name servers.

A pre-built nsswitch.conf called /etc/nsswitch.files already exists. You can use this file by copying it onto the /etc/nsswitch.conf file. When (if?) you set up a DNS server, you will need to modify /etc/nsswitch.conf to allow DNS lookup; this is covered in section 3.4 on DNS.

The /etc/services file needs to be extended. Solaris does not come with POP3, the mail retrieval protocol listed in its services file. If you plan to use programs that use POP3 on the Solaris system, you will probably have to add the following line to /etc/services:



pop-3    110/tcp    pop3    # Post Office


Routing configuration for the Solaris system, which is itself a gateway is somewhat tricky and is covered in the section on installing DP (section 4.2.3).


Linux-specific Configuration

This section contains configuration details specific to Linux. The Linux distribution that was used here was Slackware 3.2 -- distributions have come a long way since then.

The /etc/HOSTNAME file performs the same function as the Solaris /etc/hostname.le0 file and contains the same sort of information.

The /etc/rc.d/rc.inet1 file contains some configuration commands for the Ethernet interface on Linux systems. You will need to edit this file to contain appropriate IP address and gateway information. In the sample network, we have the following lines:



# Edit for your setup.
IPADDR="10.5.3.22"    # REPLACE with YOUR IP address!
NETMASK="255.255.255.0"    # REPLACE with YOUR netmask!
NETWORK="10.5.3.0"    # REPLACE with YOUR network address!
BROADCAST="10.5.3.255"    # REPLACE with YOUR broadcast address, if you
            # have one. If not, leave blank and edit below.
GATEWAY="10.5.3.1"    # REPLACE with YOUR gateway address!



Windows 95-specific Configuration

To start using Windows 95, you will need to install the network driver and TCP/IP network protocol, assuming that you have not done so already. Once this is done, open the Network section of the Control Panel and choose the TCP/IP properties. For the example network, we have:

Tab Field Value
IP Address Specify an IP Address
  IP Address 10.5.3.21
  Subnet Mask 255.255.255.0
WINS Configuration Disable WINS Resolution
Gateway Add Gateway 10.5.3.1
DNS Configuration See section 3.4.3 on DNS


next up previous
Next: DNS Configuration Up: Preparation Previous: Packages
Doug Palmer 2003-02-15