3 ## 19.15 Parallel Line IP (PLIP)
\r
5 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:
\r
8 * Creating a parallel (laplink) cable.
\r
10 * Connecting two computers with PLIP.
\r
12 ### 19.15.1 Creating a Parallel Cable
\r
14 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.
\r
16 **Table 19-1. Wiring a Parallel Cable for Networking**
\r
19 | A-name | A-End | B-End | Descr. | Post/Bit
20 DATA0<<BR>> -ERROR | 2<<BR>> 15 | 15<<BR>> 2 | Data | 0/0x01<<BR>> 1/0x08
21 DATA1<<BR>> +SLCT | 3<<BR>> 13 | 13<<BR>> 3 | Data | 0/0x02<<BR>> 1/0x10
22 DATA2<<BR>> +PE | 4<<BR>> 12 | 12<<BR>> 4 | Data | 0/0x04<<BR>> 1/0x20
23 DATA3<<BR>> -ACK | 5<<BR>> 10 | 10<<BR>> 5 | Strobe | 0/0x08<<BR>> 1/0x40
24 DATA4<<BR>> BUSY | 6<<BR>> 11 | 11<<BR>> 6 | Data | 0/0x10<<BR>> 1/0x80
25 GND | 18-25 | 18-25 | GND | - |
\r
27 ### 19.15.2 Setting Up PLIP
\r
29 First, you have to get a laplink cable. Then, confirm that both computers have a kernel with [lpt(4)](http://leaf.dragonflybsd.org/cgi/web-man?command#lpt§ion4) driver support:
\r
32 # grep lp /var/run/dmesg.boot
\r
33 lpt0: <Printer> on ppbus0
\r
34 lpt0: Interrupt-driven port
\r
37 The parallel port must be an interrupt driven port. You should have a line similar to the following in your kernel configuration file:
\r
40 device ppc0 at isa? irq 7
\r
43 Then check if the kernel configuration file has a `device plip` line or if the `plip.ko` kernel module is loaded. In both cases the parallel networking interface should appear when you directly use the [ifconfig(8)](http://leaf.dragonflybsd.org/cgi/web-man?command#ifconfig§ion8) command.
\r
47 lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
\r
50 Plug in the laplink cable into the parallel interface on both computers.
\r
52 Configure the network interface parameters on both sites as `root`. For example, if you want connect the host `host1` with `host2`:
\r
55 host1 <-----> host2
\r
56 IP Address 10.0.0.1 10.0.0.2
\r
59 Configure the interface on `host1` by doing:
\r
62 # ifconfig lp0 10.0.0.1 10.0.0.2
\r
65 Configure the interface on `host2` by doing:
\r
68 # ifconfig lp0 10.0.0.2 10.0.0.1
\r
71 You now should have a working connection. Please read the manual pages [lp(4)](http://leaf.dragonflybsd.org/cgi/web-man?command#lp§ion4) and [lpt(4)](http://leaf.dragonflybsd.org/cgi/web-man?command=lpt§ion=4) for more details.
\r
73 You should also add both hosts to `/etc/hosts`:
\r
76 127.0.0.1 localhost.my.domain localhost
\r
77 10.0.0.1 host1.my.domain host1
\r
78 10.0.0.2 host2.my.domain
\r
81 To confirm the connection works, go to each host and ping the other. For example, on `host1`:
\r
85 lp0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1500
\r
86 inet 10.0.0.1 --> 10.0.0.2 netmask 0xff000000
\r
91 Destination Gateway Flags Refs Use Netif Expire
\r
92 host2 host1 UH 0 0 lp0
\r
94 PING host2 (10.0.0.2): 56 data bytes
\r
95 64 bytes from 10.0.0.2: icmp_seq#0 ttl255 time=2.774 ms
\r
96 64 bytes from 10.0.0.2: icmp_seq#1 ttl255 time=2.530 ms
\r
97 64 bytes from 10.0.0.2: icmp_seq#2 ttl255 time=2.556 ms
\r
98 64 bytes from 10.0.0.2: icmp_seq#3 ttl255 time=2.714 ms
\r
100 --- host2 ping statistics ---
\r
101 4 packets transmitted, 4 packets received, 0% packet loss
\r
102 round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms
\r
108 CategoryHandbook-advancednetworking
\r