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:
First, you have to get a laplink cable. Then, confirm that both computers have a
kernel with lpt(4) driver
support:
# grep lp /var/run/dmesg.boot
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
The parallel port must be an interrupt driven port, under FreeBSD 4.X, you should
have a line similar to the following in your kernel configuration file:
device ppc0 at isa? irq 7
Under FreeBSD 5.X, the /boot/device.hints file should
contain the following lines:
hint.ppc.0.at="isa"
hint.ppc.0.irq="7"
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) command.
Under FreeBSD 4.X like this:
# ifconfig lp0
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
and for FreeBSD 5.X:
# ifconfig plip0
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
Note: The device name used for parallel interface is different between
FreeBSD 4.X (lpX) and
FreeBSD 5.X (plipX).
Plug in the laplink cable into the parallel interface on both computers.
Configure the network interface parameters on both sites as root. For example, if you want connect the host host1 running FreeBSD 4.X with host2
running FreeBSD 5.X:
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 plip0 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 0 0 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