Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
HP & Linux

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 71 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




LINUX PLIP MINI-HOWTO: A PLIP link between DOS and Linux Next Previous Contents

9. A PLIP link between DOS and Linux

After the first release of this Mini-HowTo many people wrote for info about a link between Linux and DOS (or Windows) computer. The general interest lead me to add this chapter, I hope will be of help to everybody.

This section comes from an article I've found on Linux Gazzette by James McDuffie <mcduffie@scsn.net> . It covers the basic installation of a PLIP link between Linux and a DOS computer using Windows and Trumpet WinSock and gives the address of a cool program that let's you run X-Windows programs on Windows.

The last section is an addendum sent by James Vahn jvahn@short.circuit.com where he describes deeply how to set up this link and how to solve many problems.

For any questions about this chapter please contact him, not me.

9.1 DOS-Linux link.

I suppose you have already set up properly the PLIP support on the Linux side and you have got the right cable, else go back to the previous chapters.

Now, for the DOS side, you need first of all a packet driver. It can be found here:


The program runs under DOS and acts like a Ethernet Packet driver. If you want to use PLIP with Windows you need also Trumpet Winsock. This serves as the TCP/IP interface. Otherwise, you can probably find TCP/IP software for DOS.

Now go back to the Linux computer and add the DOS computer address to /etc/hosts. If your DOS computer does not have a registered IP address you may choose any address (remember the warning of chapter 3 about IP addresses).

Now let's suppose you chose the name linux for the Linux computer and dos for the DOS one. You have to type:

ifconfig plip1 linux pointopoint dos arp up
route add dos

Of course if you want to have this done every time you boot the linux computer you may add these lines to the file /etc/rc.d/rc.inet1:

/sbin/ifconfig plip1 linux pointopoint dos arp up
/sbin/route add dos

This sets up the interface and then adds a route to it. Of course if you are using the second parallel port you have to write plip2 instead.

Go back to the DOS/Windows computer and edit autoexec.bat, you have to add the following lines.

c:\plip\plip.com 0x60
c:\tcpip\winsock\winpkt.com 0x60

Of course I suppose you put plip.com (the packet driver) in the directory c:/plip and the winpkt.com in c:/tcpip, else you need to put the right path.

This sets the plip.com program on packet vector 0x60 and then loads the winpkt.com program that comes with trumpet winsock on the same vector. If the cable is something other than lpt1 you will have to tell plip.com the irq number and io address. Also, winpkt.com needs to run to make the packet vector avaliable to Windows. From here we go to the actual setup under Trumpet Winsock. All you have to do is unselect SLIP or PPP and enter 60 into the box labeled Packet vector. Then tell it the IP address you gave it, the IP address of the Linux computer as the default gateway and the Name Server as either you computer's ip or your ISP's address for its nameservers if your going to connect it to the Internet (more on this later). Close the setup and re-run Winsock and you should have it! Put winsock in your startup group and you have everything setup automatically!

If you want to access the Internet through the Linux computer on the Windows computer you will need to set up IP Masquerading, for info on this see the NET-2-HOWTO. This simply masquerades the Windows computer with your Linux computer's IP address.

Also I have found a program that lets you run X-Windows programs under Windows! It is located at:


Set it up according to directions and then all you have to do is telnet in from the Windows computer then set the display to the Windows computer (`DISPLAY=duncan:0.0` for instance) and run the program desired. There is nothing cooler than running xv under Windows! Hope all this helped.

9.2 A DOS-Linux PLIP link experience.

NOTE: I received this document from James Vahn jvahn@short.circuit.com. I put it here unchanged. This means that for any question about this section he's much better qualified than me so please mail to him than to me. His experience with a PLIP connection of a floppy-only DOS computer to a Linux one is the perfect example of how to work-around common problems.

Last Update 11 July 1996

My floppy-only DOS box is networked via PLIP to the second printer port on the Linux machine. The first Linux printer port has a printer on it, both are permanently connected and the DOS box is telnet'd into Linux. These are my notes on what I did to accomplish this.

When the kernel probes for printer ports, it will grab all of them unless you remove one from the probe. Otherwise PLIP will get nothing. One method is to load the drivers as modules when needed...

<gniibe@mri.co.jp> writes:

I keep recommending using PLIP/LP as kernel module, since

  • modules are flexible for change of configuration
  • (re)compiling the kernel is not easy for novice users
  • co-existing PLIP and LP is only feasible by the modules

With PLIP/LP as kernel module, you can specify which port is PLIP and which port is LP. Here is example:

# insmod lp.o io=0x378
# insmod plip.o io=0x278 irq=2

Even you can use two parallel ports:

# insmod plip.o io=0x278,0x3bc irq=2,5

In the example above,

plip0 is assigned on 0x278 and it's irq is 2,

plip1 is assigned on 0x3bc and it's irq is 5, respectively.

Using modules certainly sounds like the way to go. The following method shows how to patch the kernel to allow both a printer and PLIP on different ports, without modules. If you are unfamiliar with the module concept, you might find this quicker to set up.

You will need to modify two files in the kernel source tree. I'm using kernel 1.2.13 and found some changes were needed in ../linux/drivers/net/Space.c to accommodate my system. Look at around line 205 for the PLIP definitions to make sure your port and IRQ match, and make a note of which driver it will be (plip0, plip1, plip2). In my case port 0x278 uses IRQ 5 (the card is jumpered that way) but Space.c defined it with IRQ 2. I made the changes here, rather than opening up the box and changing jumpers. The alternative is to specify the IRQ through ifconfig later on, but the kernel will boot up with the wrong IRQ for PLIP and it may annoy you. It is a simple (single character) change.

The next, and more difficult step:

In .../drivers/char/lp.c you will find the following at around line 38:

struct lp_struct lp_table[] = {
    { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, 
/*  { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, 
 * 0x278 reserved for plip1
 * }; 
 * #define LP_NO 3 
#define LP_NO 2 

Notice the changes to make- one port is commented out, so now only 2 ports are defined. Port 0x3BC will probably not work for PLIP- the IRQ line is usually broken on these ports, as found on old monochrome adapters (MDA).

You made backups of these file before you changed them, right? Now make a new kernel with printer, net, dummy, and plip support.

Configure the system. This is my /etc/rc.d/rc.inet1 file:

/sbin/ifconfig lo
/sbin/route add -net

/sbin/ifconfig dummy
/sbin/route add -net netmask
/sbin/ifconfig plip1 arp pointopoint up
/sbin/route add
/sbin/ifconfig dummy down

Notice that arp is used for the DOS-to-Linux connection, apparently not used on Linux-to-Linux connections.

And in /etc/hosts you can add these, just to give the two machines names:       console1       console2

The DOS box is console2. Note Andrea's warning about these, better to use official numbering schemes.

Reboot so all of these changes and the new kernel will take effect. During the boot sequence (or by running dmesg) if you made the patches, otherwise when the modules are loaded:

lp0 at 0x03bc, using polling driver
lp1 at 0x0378, using polling driver
NET3 PLIP version 2.0 gniibe@mri.co.jp
plip1: Parallel port at 0x278, using assigned IRQ 5.

The "route" command shows this:

Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use Iface
console2        *      UH    1436   0      136 plip1
loopback        *            U     1936   0      109 lo

And "ifconfig plip1" shows:

plip1     Link encap:10Mbps Ethernet  HWaddr FC:FC:C8:00:00:01
          inet addr:  P-t-P:  Mask:
          UP POINTOPOINT RUNNING  MTU:1500  Metric:1
          RX packets:132 errors:0 dropped:0 overruns:0
          TX packets:136 errors:0 dropped:0 overruns:0
          Interrupt:5 Base address:0x278 

Look at /etc/inetd.conf and see if telnet is enabled. You might want to read the man page for tcpd, and the use of /etc/hosts.allow (ALL: LOCAL) and /etc/hosts.deny (ALL: ALL). You should be able to "telnet localhost".

Linux is done, now the DOS side. Again, be suspicious of port 0x3BC if one is present.

I'm using NCSA's telnet and Crynwr's PLIP driver found at these sites:



Be sure to use NCSA's version 2.3.08 telnet and version 11.1 of Crynwr's PLIP driver. Please find and read Crynwr's SUPPORT.DOC located elswhere.

The CONFIG.TEL file. Most of it is the default and to save some space I've tried to cut it back here to just the info you need (hopefully). The second port on this machine is setup as 0x278 on IRQ 5.

netmask=       # subnetting mask
hardware=packet             # network adapter board (packet driver interface)
interrupt=5                 # IRQ which adapter is set to
ioaddr=60                   # software interrupt vector driver is using
#[...lots unchanged...]
# at the end of the file, put this line:
name=console1 ; hostip= ; nameserver=1 ; gateway=1 

(console1 is the name of the Linux machine, you can use whatever you like)

I made a 12 foot null cable between both machines, and (after initially finding it miswired) there have been no problems. A standard 11-wire null printer cable should work too. The Linux plip.c source shows the wiring. Although my cable has the 17-17 connection, I don't think it is used for anything and was not present on a ready-made cable.

@echo off
plip.com 0x60 5 0x278
telbin -s console1

That should connect you to the Linux box on /dev/ttyp. NCSA's telnet provides for 8 virtual screens and also acts as an ftp server. The PLIP interface provides a fair throughput, I'm getting 6.5K/s file transfers with my antiques. Let's hope you can do better. :-)

Next Previous Contents

The Linux Tutorial completely respects the rights of authors and artists to decide for themselves if and how their works can be used, independent of any existing licenses. This means if you are the author of any document presented on this site and do no wish it to be displayed as it is on this site or do not wish it to be displayed at all, please contact us and we will do our very best to accommodate you. If we are unable to accommodate you, we will, at your request, remove your document as quickly as possible.

If you are the author of any document presented on this site and would like a share of the advertising revenue, please contact us using the standard Feedback Form.

Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.82 Seconds