Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search
Next Previous Contents

5. Setting up the configuration files.

NOTE: Some distributions, like Debian, use different config files. If you have a standard installation and you don't find the rc.inet* files, look for (different) config files in the /etc/init.d directory.

First of all remember to backup all the files you will change,

#cp rc.inet1 rc.inet1.BACKUP 

may be a good idea.

Now, if you don't have it done already, you must choose the IP addresses of the two machines. In my examples I'll use a couple of example IPs for the IPs that you'll write, in the standard xxx.xxx.xxx.xxx format.

In the /etc/rc.d/inet1.rc file of both the machines add this (better if in the last part of the file):


/sbin/route add -net ${NETWORK} netmask ${NETMASK}

Where NETWORK and NETMASK should be set up previously. If you don't know how to do it, please read the NET-2-HOWTO.

If after this route command you get a message like this:

SIOCADDRT: network unreachable

then use this instead:


/sbin/route add -net ${NETWORK} netmask ${NETMASK} dev plip1  

where, as usually, you'll have to use the interface name reported by the kernel messages (see above).

You may safely ignore these variables only in the following case:

If you only want to connect two machines on a standalone network, you may pick-up any IP address, say 200.0.0.1 and 200.0.0.2 respectively. In this case you can safely put NETWORK="200.0.0.0" and NETMASK="255.255.255 .0". These are the example IPs that I use in my Quick PLIP Installation (see below).

NOTE: 200.0.0.1 and 200.0.0.2 are only example IPs, I advice not to use these numbers definitively because they could be the addresses of real hosts on Internet!

I strongly advice to choose your address between the "private address" intervals:

          10.0.0.0        -   10.255.255.255
          172.16.0.0      -   172.31.255.255
          192.168.0.0     -   192.168.255.255

In the file /etc/hosts of both the machines you should add the entries with the IP of the machines that you connect via PLIP. In my example, the entries are:


200.0.0.1       one             # this is the "one" IP address
200.0.0.2       two             # this is the "two" IP address

Where one and two are the names you have chosen for the two hosts.

If you want to activate the NFS, beside answering yes during the kernel configuration, you must add in /etc/exports the entries that describe the directories that you wish to export. In my example, to be able to mount the directory /usr, you should add this entry:


 /usr                          two (ro)

For more informations about NFS, please read the specific documentation; don't report me problems with the NFS, I won't be able to help.

Now reboot your system.


Next Previous Contents