![]() |
s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
Next
Previous
Contents
9. PLIP on the Source side
This section describes how to set up the
Check that your
$ cat /proc/devices
Character devices:
...
6 lp
...
If you do have it, kill the
$ /etc/rc.d/init.d/lpd.init stop
Shutting down lpd: lpd
$ rmmod lp
If you can't remove the Now, the " You are not obliged to eliminate the lp device : the scheme may work with lp. Without guarantee (it works for me). Check it yourself.
Check that your parallel port is handled:
$ 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
$ insmod parport
$ insmod parport_pc
You should see this new entry in
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
$ echo 7 > /proc/parport/0/irq
Check that
$ lsmod |grep plip
If
$ insmod plip
You should see something like this in
==> /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 The syslog message says the module is loaded on the
$ ifconfig plip0 source pointopoint target netmask 255.255.255.255 up
Check that everything is okay.
$ 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 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 is configured you will be able to 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 |