19.14 Parallel Line IP (PLIP)

PLIP lets us run TCP/IP between parallel ports. It is useful on machines without network cards, or to install on laptops. In this section, we will discuss:

19.14.1 Creating a Parallel Cable

You can purchase a parallel cable at most computer supply stores. If you cannot do that, or you just want to know how it is done, the following table shows how to make one out of a normal parallel printer cable.

Table 19-1. Wiring a parallel cable for networking

A-name A-End B-End Descr. Post/Bit

DATA0
-ERROR

2
15

15
2

Data

0/0x01
1/0x08

DATA1
+SLCT

3
13

13
3

Data

0/0x02
1/0x10

DATA2
+PE

4
12

12
4

Data

0/0x04
1/0x20

DATA3
-ACK

5
10

10
5

Strobe

0/0x08
1/0x40

DATA4
BUSY

6
11

11
6

Data

0/0x10
1/0x80

GND 18-25 18-25 GND -

19.14.2 Setting up PLIP

Get a laplink cable.

Confirm that both computers have a kernel with lpt(4) driver support.

    # dmesg | grep lp
    lpt0 at 0x378-0x37f irq 7 on isa
    lpt0: Interrupt-driven
    lp0: TCP/IP capable interface

Plug in the laplink cable into the parallel interface on both computers.

Configure the network interface parameters for lp0 on both sites as root. For example, if you want connect the host host1 with host2:

                     host1 <-----> host2
    IP Address    10.0.0.1      10.0.0.2

Configure the interface on host1 by doing:

    # ifconfig lp0 10.0.0.1 10.0.0.2

Configure the interface on host2 by doing:

    # ifconfig lp0 10.0.0.2 10.0.0.1

You now should have a working connection. Please read the manual pages lp(4) and lpt(4) for more details.

You should also add both hosts to /etc/hosts:

    127.0.0.1               localhost.my.domain localhost
    10.0.0.1                host1.my.domain host1
    10.0.0.2                host2.my.domain

To confirm the connection works, go to each host and ping the other. For example, on host1:

    # ifconfig lp0
    lp0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1500
            inet 10.0.0.1 --> 10.0.0.2 netmask 0xff000000
    # netstat -r
    Routing tables
    
    Internet:
    Destination        Gateway          Flags     Refs     Use      Netif Expire
    host2              host1              UH          4   127592       lp0
    # ping -c 4 host2
    PING host2 (10.0.0.2): 56 data bytes
    64 bytes from 10.0.0.2: icmp_seq=0 ttl=255 time=2.774 ms
    64 bytes from 10.0.0.2: icmp_seq=1 ttl=255 time=2.530 ms
    64 bytes from 10.0.0.2: icmp_seq=2 ttl=255 time=2.556 ms
    64 bytes from 10.0.0.2: icmp_seq=3 ttl=255 time=2.714 ms
    
    --- host2 ping statistics ---
    4 packets transmitted, 4 packets received, 0% packet loss
    round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.