Introducing the new PLIP Handbook chapter.
Content chainsawed from various FAQs. This is a short chapter, and I'm not certain just how "advanced" it is, but it doesn't fit in any other section of the FAQ.
This commit is contained in:
parent
28dafeea40
commit
dbe4533ce3
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=11928
1 changed files with 214 additions and 0 deletions
|
@ -60,6 +60,10 @@
|
|||
<listitem>
|
||||
<para>How to manage the <command>inetd</command> daemon.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>How to connect two computers via PLIP</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Before reading this chapter, you should:</para>
|
||||
|
@ -5431,6 +5435,216 @@ server-program-arguments</programlisting>
|
|||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="plip">
|
||||
<title>Parallel Line IP (PLIP)</title>
|
||||
|
||||
<indexterm><primary>PLIP</primary></indexterm>
|
||||
<indexterm><primary>Parallel Line IP</primary></indexterm>
|
||||
|
||||
<para>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:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Creating a parallel (laplink) cable.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>connecting two computers with PLIP.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<sect2 id="create-parallel-cable">
|
||||
<title>Creating a Parallel Cable</title>
|
||||
|
||||
<para>You can purchase a parallel cable at most computer supply
|
||||
stores. If you can't do that, or you just want to know how
|
||||
it's done, here's how you make one out of a normal parallel
|
||||
printer cable.</para>
|
||||
|
||||
<table>
|
||||
<title>Wiring a parallel cable for networking</title>
|
||||
|
||||
<tgroup cols="5">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>A-name</entry>
|
||||
|
||||
<entry>A-End</entry>
|
||||
|
||||
<entry>B-End</entry>
|
||||
|
||||
<entry>Descr.</entry>
|
||||
|
||||
<entry>Post/Bit</entry>
|
||||
</row>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literallayout>DATA0
|
||||
-ERROR</literallayout></entry>
|
||||
|
||||
<entry><literallayout>2
|
||||
15</literallayout></entry>
|
||||
|
||||
<entry><literallayout>15
|
||||
2</literallayout></entry>
|
||||
|
||||
<entry>Data</entry>
|
||||
|
||||
<entry><literallayout>0/0x01
|
||||
1/0x08</literallayout></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literallayout>DATA1
|
||||
+SLCT</literallayout></entry>
|
||||
|
||||
<entry><literallayout>3
|
||||
13</literallayout></entry>
|
||||
|
||||
<entry><literallayout>13
|
||||
3</literallayout></entry>
|
||||
|
||||
<entry>Data</entry>
|
||||
|
||||
<entry><literallayout>0/0x02
|
||||
1/0x10</literallayout></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literallayout>DATA2
|
||||
+PE</literallayout></entry>
|
||||
|
||||
<entry><literallayout>4
|
||||
12</literallayout></entry>
|
||||
|
||||
<entry><literallayout>12
|
||||
4</literallayout></entry>
|
||||
|
||||
<entry>Data</entry>
|
||||
|
||||
<entry><literallayout>0/0x04
|
||||
1/0x20</literallayout></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literallayout>DATA3
|
||||
-ACK</literallayout></entry>
|
||||
|
||||
<entry><literallayout>5
|
||||
10</literallayout></entry>
|
||||
|
||||
<entry><literallayout>10
|
||||
5</literallayout></entry>
|
||||
|
||||
<entry>Strobe</entry>
|
||||
|
||||
<entry><literallayout>0/0x08
|
||||
1/0x40</literallayout></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literallayout>DATA4
|
||||
BUSY</literallayout></entry>
|
||||
|
||||
<entry><literallayout>6
|
||||
11</literallayout></entry>
|
||||
|
||||
<entry><literallayout>11
|
||||
6</literallayout></entry>
|
||||
|
||||
<entry>Data</entry>
|
||||
|
||||
<entry><literallayout>0/0x10
|
||||
1/0x80</literallayout></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GND</entry>
|
||||
|
||||
<entry>18-25</entry>
|
||||
|
||||
<entry>18-25</entry>
|
||||
|
||||
<entry>GND</entry>
|
||||
|
||||
<entry>-</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="plip-setup">
|
||||
<title>Setting up PLIP</title>
|
||||
|
||||
<para>Get a laplink cable.</para>
|
||||
|
||||
<para>Confirm that both computers have a kernel with lpt driver
|
||||
support.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>dmesg | grep lp</userinput>
|
||||
lpt0 at 0x378-0x37f irq 7 on isa
|
||||
lpt0: Interrupt-driven
|
||||
lp0: TCP/IP capable interface</screen>
|
||||
|
||||
<para>Plug in the laplink cable into the parallel interface on
|
||||
both computers.</para>
|
||||
|
||||
<para>Configure the network interface parameters for lp0 on both
|
||||
sites as root. For example, if you want connect the host host1
|
||||
with host2</para>
|
||||
|
||||
<programlisting> host1 <-----> host2
|
||||
IP Address 10.0.0.1 10.0.0.2</programlisting>
|
||||
|
||||
<para>Configure the interface on host1 by doing:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>ifconfig lp0 10.0.0.1 10.0.0.2</userinput></screen>
|
||||
|
||||
<para>Configure the interface on host2 by doing:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>ifconfig lp0 10.0.0.2 10.0.0.1</userinput></screen>
|
||||
|
||||
|
||||
<para>You now should have a working connection. Please read the
|
||||
man pages &man.lp.4; and &man.lpt.4; for more details.</para>
|
||||
|
||||
<para>You should also add both hosts to
|
||||
<filename>/etc/hosts</filename>.</para>
|
||||
|
||||
<programlisting>127.0.0.1 localhost.my.domain localhost
|
||||
10.0.0.1 host1.my.domain host1
|
||||
10.0.0.2 host2.my.domain</programlisting>
|
||||
|
||||
<para>To confirm the connection works, go to each host and ping
|
||||
the other. For example, on host1:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>ifconfig lp</userinput>0
|
||||
lp0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1500
|
||||
inet 10.0.0.1 --> 10.0.0.2 netmask 0xff000000
|
||||
&prompt.root; <userinput>netstat -r</userinput>
|
||||
Routing tables
|
||||
|
||||
Internet:
|
||||
Destination Gateway Flags Refs Use Netif Expire
|
||||
host2 host1 UH 4 127592 lp0
|
||||
&prompt.root; <userinput>ping -c 4 host2</userinput>
|
||||
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</screen>
|
||||
|
||||
</sect2>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue