11.2. PLIP for Linux-2.0

PLIP device names are `plip0', `plip1 and plip2.

Kernel Compile Options:
	Network device support  --->
	    <*> PLIP (parallel port) support

PLIP (Parallel Line IP) is similar to SLIP in that it is used for providing a Point-to-Point network connection between two machines. However, it is designed to use the parallel printer ports on your machine. It doesn't use the serial ports (a cabling diagram in included in the cabling diagram section later in this document). Because it is possible to transfer more than one bit at a time with a parallel port, it is possible to attain higher speeds with the PLIP interface. PLIP will attain higher speeds than those achieved by using a standard serial device. In addition, even the simplest of parallel printer ports can be used (in lieu of you having to purchase comparatively expensive 16550AFN UART's for your serial ports). PLIP uses a lot of CPU compared to a serial link. It is not a good option if, for example, you are able to obtain some cheap ethernet cards. However, it will work when nothing else is available (and will work quite well). You should expect a data transfer rate of about 20 kilobytes per second (when a link is running well).

The PLIP device driver competes with the parallel device driver for the parallel port hardware. If you wish to use both drivers, then you should compile them both as modules. This ensures that you are able to select which port you want to use for PLIP, and that you can select which ports you want for the printer driver. Refer to the ``Modules mini-HOWTO'' for more information on kernel module configuration.

Please note that some laptops use chipsets that will not work with PLIP. These chipsets do not allow some combinations of signals. PLIP relies on these signals, but printers don't use them.

The Linux PLIP interface is compatible with the Crynwyr Packet Driver PLIP/ .This will mean that you can connect your Linux machine to a DOS machine running any other sort of tcp/ip software via PLIIP.

In the 2.0.* series kernel, the PLIP devices are mapped to i/o port and IRQ as follows:

	device	i/o	IRQ
	------	-----	---
	plip0	0x3bc	5
	plip1	0x378	7
	plip2	0x278	2

If your parallel ports don't match any of the above combinations, then you can change the IRQ of a port. Change the IRQ by using the ifconfig command with the `irq' parameter (be sure to enable IRQ's on your printer ports in your ROM BIOS if it supports this option). As an alternative, you can specify ``io='' and ``irq='' options on the insmod command line (if you use modules). For example:

	root# insmod plip.o io=0x288 irq=5

PLIP operation is controlled by two timeouts: their default values are probably ok in most cases. You will more than likely need to increase them if you have an especially slow computer. In this case the timers to increase are actually on the other computer. A program called plipconfig exists that allows you to change these timer settings without recompiling your kernel. This program is supplied with many Linux distributions.

To configure a PLIP interface, you will need to invoke the following commands (or add them to your initialization scripts):

	root# /sbin/ifconfig plip1 localplip pointopoint remoteplip
	root# /sbin/route add remoteplip plip1

Here, the port being used is the one at I/O address 0x378; localplip amd remoteplip are the names or IP addresses used over the PLIP cable. I personally keep them in my /etc/hosts database:

	# plip entries
	192.168.3.1   localplip
	192.168.3.2   remoteplip

The pointopoint parameter has the same meaning as for SLIP. It specifies the address of the machine at the other end of the link.

In almost all respects, you can treat a PLIP interface as though it were a SLIP interface. However, neither dip nor slattach can be used.

Further information on PLIP may be obtained from the ``PLIP mini-HOWTO''.

11.2.1. PLIP for Linux-2.2

During development of the 2.1 kernel versions, support for the parallel port was changed to an improved setup.

Kernel Compile Options:
	General setup  --->
	    [*] Parallel port support
	Network device support  --->
	    <*> PLIP (parallel port) support

The new code for PLIP behaves like the old one. You can use the same ifconfig and route commands as in the previous section. However, initialization of the device is different due to the advanced parallel port support.

The ``first'' PLIP device is always called ``plip0'' (where first is the first device detected by the system; similarly to what happens for Ethernet devices). The actual parallel port being used is one of the available ports, as shown in /proc/parport. For example, if you have only one parallel port, you'll only have a directory called /proc/parport/0.

If your kernel didn't detect the IRQ number used by your port, ``insmod plip'' will fail. In this case just write the correct number to /proc/parport/0/irq,then reinvoke insmod.

Complete information about parallel port management is available in the file Documentation/parport.txt(part of your kernel sources).