[1196] in linux-net channel archive
SUMMARY: How do I set up a PLIP connection? (and lp device)
daemon@ATHENA.MIT.EDU (Martin Kraemer)
Wed Oct 11 00:29:05 1995
To: hg@penny.n2wx.ampr.org
Date: Tue, 10 Oct 1995 20:28:29 +0100 (MET)
From: "Martin Kraemer" <Martin.Kraemer@mch.sni.de>
Cc: linux-net@vger.rutgers.edu (Linux Network Channel)
In-Reply-To: <199510101410.KAA17207@bbs.mpcs.com> from "Howard Goldstein" at Oct 10, 95 10:10:07 am
Howard Goldstein wrote in reply to my help call...
> Are you running it out of modules or perhaps compiled into the kernel?
> I couldn't get plip to work out of the modules at all but works great when
> in the kernel....
My attempt was to compile both of them into the kernel and I expected the lp
device not to work any longer after plip was ifconfig'ed. I fact, to define
both of them made it impossible to get plip running in the first place; the
lp device is initialized earlier than plip, so plip cannot get the desired
I/O addresses - it therefore refuses to initialize.
I think it _should_ be either impossible to configure both of them
or there should be a warning during plip device initialization at boot time.
> (PS I have lpr as a module installed simultaneously with PLIP compiled in
> the kernel and it works)
I didn't try this combination yet. If the kernel were strict, it should
disallow the double use of the parallel port....
================ SUMMARY ================
What I did to solve the problem was this (thanks to Philip Blundell
<pjb27@cam.ac.uk>, too); he wrote:
Philip>You can work around it by loading plip and lp as modules, and giving the
Philip>"port=, irq=" options. Or you can edit lp.c to stop it grabbing all your
Philip>ports.
- I defined _both_ lp and plip as modules.
- recompiled the kernel (make zlilo; make modules; make modules_install)
- when I need lp, I do a "insmod lp"
- when I need plip, I do a "insmod plip" (no irq tweaking needed)
- after the plip module is loaded, I configure the interface as easy as this:
replace MOBILE by the mobile pc's ip address (or host name)
replace HOSTPC by the ethernet connected pc's ip address (or host name)
replace "plip1" by what you see in your /proc/net/dev
########## on the host pc (connected to the ethernet)
# insmod plip
# ifconfig plip1 HOSTPC pointopoint MOBILE
# route add MOBILE
########## on the mobile pc (connected only via plip to HOSTPC)
# insmod plip
# ifconfig plip1 MOBILE pointopoint HOSTPC
# route add HOSTPC
# route add default gw HOSTPC
########## on every host on the ethernet which wants connection to MOBILE
########## (unless you have gated or something like that)
# route add MOBILE gw HOSTPC
Now it works quite well. The average maximum speed is around 20...30 kB/sec
though, which is not blazingly fast...
Martin
--
| S I E M E N S | Martin.Kraemer@mch.sni.de | Siemens Nixdorf
| ------------- | Voice: +49-89-636-46021 | Informationssysteme AG
| N I X D O R F | FAX: +49-89-636-44994 | 81730 Munich, Germany
~~~~~~~~~~~~~~~~ (My opinions only, of course; pgp key available on request)