Frequently Asked Questions for FreeBSD 2.X : 安裝 FreeBSD : 用一條並聯線(PLIP)連接兩台 FreeBSD。
Previous: 救命!我不能從 tape 安裝!
Next: 我可以在我的膝上型電腦用 PLIP(Parallel Line IP)安裝嗎?

2.13. 用一條並聯線(PLIP)連接兩台 FreeBSD。

找一條 laplink 線,確定兩邊電腦的核心都支援 lpt 驅動程式。

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

把 laplink 線插入並聯界面上。

用 root 身分在兩台電腦上設定 lp0 的網路界面參數。舉例,如果 你想用 max 連接 moritz:

                 max <-----> moritz
IP Address    10.0.0.1      10.0.0.2
      

max 端應該這樣開始:

	# ifconfig lp0 10.0.0.1 10.0.0.2
     

moritz 則這樣:

	# ifconfig lp0 10.0.0.2 10.0.0.1
     

好了!也請你看看 lp(4) 和 lpt(4) 的 manpages。

你也該把這些主機加到 /etc/hosts 裡面。

     127.0.0.1               localhost.my.domain localhost 
     10.0.0.1                max.my.domain max
     10.0.0.2                moritz.my.domain moritz
     

用以下方法檢查是否有正常動作:

on max:

$ 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
moritz              max              UH          4   127592       lp0

$ ping -c 4 moritz
PING moritz (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

--- moritz 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


Frequently Asked Questions for FreeBSD 2.X : 安裝 FreeBSD : 用一條並聯線(PLIP)連接兩台 FreeBSD。
Previous: 救命!我不能從 tape 安裝!
Next: 我可以在我的膝上型電腦用 PLIP(Parallel Line IP)安裝嗎?