Next Previous Contents

8. PLIP on the Source side

This section describes how to set the plip interface in the source server. If you run into troubles, I suggest to read the PLIP MINI-HOWTO.

Check if your lp device is not set. You should not have this entry:

     $ cat /proc/devices 
     Character devices:
     ...
     6 lp
     ...
    

If you have it, kill the lpd daemon and remove the lp module:

     $ /etc/rc.d/init.d/lpd.init stop
     Shutting down lpd: lpd

     $ rmmod lp
    

If you can't remove the lp module then you have to recompile the kernel with lp service as a module.

Now, the "6 lp" line is disappeared from the /proc/devices file, which is a reflection of the kernel possibilities.

You are not obliged to eliminate the lp device because it can work with it but it isn't sure (it works for me). Check it yourself.

Check if your parallel port is handle:

     $ ls /proc/parport/
     0/
     
     $ cat /proc/parport/0/hardware 
     base:   0x378
     irq:    7
     dma:    none
     modes:  SPP,ECP,ECPEPP,ECPPS2
    

If you don't have any directory under /proc/parport/ then you have to load the parport and parport_pc modules:

     $ insmod parport
     $ insmod parport_pc
    

You should see this new entry in /var/log/messages:

     Oct  9 20:50:47 louloutte kernel:
     parport0: PC-style at 0x378 [SPP,ECP,ECPEPP,ECPPS2]

     Oct  9 20:50:47 louloutte kernel: 
     parport0: detected irq 7; 
     use procfs to enable interrupt-driven operation.
    

I repeat the message "detected irq 7, use procfs to enable interrupt-driven operation", so:

     $ echo 7 >  /proc/parport/0/irq
    

Check if plip module is loaded:

     $ lsmod |grep plip
    

If plip module is not loaded, then load it:

     $ insmod plip
    

You should see something like this in /var/log/messages

     ==> /var/log/messages <==
     Oct  8 16:34:12 louloutte kernel:
     NET3 PLIP version 2.3-parport gniibe@mri.co.jp
    
     Oct  8 16:34:12 louloutte kernel: 
     plip0: Parallel port at 0x378, using IRQ 7
     

If you can't load the plip module then you have to recompile the kernel with plip service as a module.

The syslog message says the module is loaded on the plip0 interface. Configure the plip0 interface:

     $ ifconfig plip0 source pointopoint target netmask 255.255.255.255 up
    

Check if everything is ok.

     $ ifconfig plip0
     plip0     Link encap:10Mbps Ethernet  HWaddr FC:FC:C0:A8:00:02
          inet addr:192.168.0.2  P-t-P:192.168.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:0 errors:0 dropped:0 overruns:0
          Interrupt:7 Base address:0x378 
    

Now you can ping locally the source server:

     $ ping source
     PING source (192.168.0.2): 56 data bytes
     64 bytes from 192.168.0.2: icmp_seq=0 ttl=255 time=0.3 ms
     64 bytes from 192.168.0.2: icmp_seq=1 ttl=255 time=0.2 ms
     
     --- source ping statistics ---
     2 packets transmitted, 2 packets received, 0% packet loss
     round-trip min/avg/max = 0.2/0.2/0.3 ms
    

Verify that the route to target exists:

     $ route
     Kernel IP routing table
     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
     target          *               255.255.255.255 UH    0      0        0 plip0
    

If the route doesn't exist, add it:

     $ route add -host  192.168.0.1  dev plip0
    

When the target will be configurated you can do a ping test:

     $ ping target
     PING 192.168.0.1 (192.168.0.1): 56 data bytes
     64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=4.5 ms
     64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=4.3 ms
     
     --- 192.168.0.1 ping statistics ---
     2 packets transmitted, 2 packets received, 0% packet loss
     round-trip min/avg/max = 4.3/4.4/4.5 ms
    

But if you try it now you should have:

     $ ping target
     PING target (192.168.0.1): 56 data bytes
     
     --- target ping statistics ---
     5 packets transmitted, 0 packets received, 100% packet loss
    

Now, the server network is ready to work. Congratulations.


Next Previous Contents