Meta thn prwth ekdosh aytou toy mini-HOWTO polloi me rwthsan pws mporei na ginei sundesh metaju Linux kai DOS (h Windows). To geniko endiaferon me w8hse se ayto to kefalaio poy elpizw na sas boh8hsei.
To tmhma ayto proerxetai apo ena ar8ro poy brhka sth Linux Gazzete toy James McDuffie <mcduffie@scsn.net> . Kaluptei th basikh egkatastash PLIP sundeshs metaju enos ypologisth Linux kai enos DOS, xrhsimopoiwntas Windows kai to Trumpet WinSock kai dinei th dieu8ynsh enos foberou programmatos poy sas epitrepei na trexete X-Windows sta Windows.
To teleytaio tmhma einai pros8hkh apo ton James Vahn jvahn@short.circuit.com opoy perigrafei se ba8os pws na sthsete th sundesh kai na lusete polla problhmata.
Gia opoiesdhpote erwthseis se ayto to kefalaio epikoinwnhste mazi toy, oxi me emena.
Ypo8etw oti exete hdh ry8misei swsta to PLIP apo thn pleyra toy Linux kai exete to swsto kalwdio, alliws phgainete pisw sta prohgoumena kefalaia.
Apo thn pleyra toy DOS, 8a xreiasteite prwta apo ola enan odhgo. Mporeite na ton breite sto:
ftp://ftp.crynwr.com/drivers/plip.zip
To programma trexei katw apo DOS kai dra san Ethernet Packet driver. An 8elete na xrhsimopoihsete to PLIP me Windows 8a xreiasteite kai to Trumpet Winsock. Ayto leitoyrgei san TCP/IP diasundesh. Diaforetika, mallon mporeite na breite programmata TCP/IP gia DOS.
Twra, phgainete pisw sto ypologisth me to Linux kai dwste toy thn dieu8ynsh toy DOS ypologisth sto /etc/hosts. An o DOS ypologisths sas den exei dhlwmenh IP dieu8ynsh mporeite na dialejete mia opoiadhpote (alla 8ymh8eite thn proeidopoihsh toy kefalaioy 3 gia IP diey8unseis).
Ypo8etw oti dwsate to onoma linux ston Linux ypologisth kai dos ston DOS ypologisth. Prepei na gracete:
ifconfig plip1 linux pointopoint dos arp up
route add dos
Fysika an 8elete na to kanete ayto ka8e fora poy jekinate ton Linux ypologisth mporeite na pros8esete ta parakatw sto /etc/rc.d/rc.inet1:
/sbin/ifconfig plip1 linux pointopoint dos arp up /sbin/route add dos
Ayto ry8mizei th sundesh kai pros8etei th diodo. Fysika an xrhsimopoieite th deuterh parallhlh 8ura prepei na gracete plip2.
Phgainete pisw ston DOS/Windows ypologisth kai anoijte to autoexec.bat, opoy 8a pros8esete tis grammes poy akoloy8oun:
c:\plip\plip.com 0x60 c:\tcpip\winsock\winpkt.com 0x60
Fysika ypo8etw oti balate to plip.com (ton packet driver) ston katalogo c:/plip kai to winpkt.com sto c:/tcpip, alliws 8a xreiastei na balete to swsto monopati.
Ayto ry8mizei to programma plip.com se dianysma 0x60 kai fortwnei to winpkt.com poy erxetai me to trumpet winsock sto idio dianysma. Ean to kalwdio den einai sthn lpt1 8a xreiastei na peite sto plip.com to swsto IRQ kai thn IO dieu8ynsh. Epishs, to winpkt.com xreiazetai na trexei gia na einai dia8esimo to dianysma sta Windows. Apo ekei kai pera phgainoyme sth ru8mish toy Trumpet Winsock. To mono poy xreiazetai einai na dialejete SLIP h PPP kai na balete 60 sto koyti Packet vector. Meta toy lete thn IP dieu8ynsh poy toy dwsate, thn IP dieu8ynsh toy Linux ypologisth ws thn pulh(gateway) kai ws diakomisth (Name server) to onoma toy ypologisth h toy ISP sas, ean prokeitai na synde8eite sto internet (perissotera gia ayto argotera). Kleiste tis ry8miseis kai janatrejte to Winsock kai eiste etoimoi!Balte to winsock sto startup group kai 8a ta exete ola etoima aytomata!
Ean 8elete na exete prosbash sto internet mesw toy Linux ypologisth apo ta Windows 8a xreiastei na xrhsimopoihsete IP Masquerading, gia plhrofories deite to NET-2-HOWTO. Ayto apla apokruptei ta Windows pisw apo thn IP dieu8ynsh toy Linux.
Epishs, brhka ena programma poy sas epitrepei na trexete X-Windows sta Windows!Brisketai sto:
Ry8miste to sumfwna me tis odhgies kai apla 8a kanete telnet apo ta Windows kai 8a ry8misete thn o8onh ws ayth twn Windows (px `DISPLAY=duncan:0.0`) kai trexete ta programmata kanonika. Den yparxei tipota kalutero apo to na trexete xv sta Windows!Elpizw na sas boh8hsa.
SHMEIWSH: Ta parakatw ta elaba apo ton James Vahn jvahn@short.circuit.com. Ta ebala opws ta parelaba. Ayto shmainei oti gia opoiesdhpote erwthseis sxetika me ayto to tmhma exei polu perissoterh empeiria apo emena, opote steilte email se ayton ki oxi emena. H empeiria toy me mia sundesh PLIP enos DOS ypologisth me disketa mono me Linux einai ena teleio paradeigma gia to pws na lusete koina problhmata.
Teleytaia ananewsh 11 Ioylioy 1996
To DOS koyti moy (me odhgo disketas MONO) einai diktywmeno mesw PLIP apo th deuterh parallhlh 8ura sto Linux mhxanhma. H prwth 8ura toy Linux mhxanhmatos exei syndemeno ton ektypwth, kai ta dyo einai monima syndemena kai kanw telnet sto Linux. Edw einai oi shmeiwseis moy gia to pws ta katafera.
Otan o pyrhnas caxnei gia 8ures ektypwth, 8a tis parei oles ektos an tis afairesete xeirokinhta. Diaforetika to PLIP de 8a brei kamia. Mia me8odos einai na fortwnete toys odhgous ws modules otan toys xreiazeste...
O <gniibe@mri.co.jp> grafei:
Synexei synistw na exete ta PLIP/LP ws modules, efoson I keep recommending using PLIP/LP as kernel module, since
Me ta PLIP/LP ws modules, mporeite na ry8misete poia 8ura 8a xrhsimopoiei to PLIP kai poia to LP. Ena paradeigma:
# insmod lp.o io=0x378
# insmod plip.o io=0x278 irq=2
H mporeite na xrhsimopoieite dyo parallhles 8ures:
# insmod plip.o io=0x278,0x3bc irq=2,5
Sto parapanw paradeigma
to plip0 ry8mizetai sto 0x278 kai to irq toy ws 2,
to plip1 ry8mizetai sto 0x3bc kai to irq toy ws 5, antistoixa.
H xrhsh modules einai mallon monodromos. H parakatw me8odos deixnei pws na "peirajete" ton pyrhna wste na exete ektypwth kai PLIP se diaforetikes 8ures xwris th xrhsh modules. Ean h xrhsh modules de sas einai eukolh mporei na breite ta parakatw pio grhgora.
8a xreiastei na allajete dyo arxeia sto kwdika toy pyrhna. Xrhsimopoiw pyrhna 1.2.13 kai brhka oti merikes allages xreiazontai sto ../linux/drivers/net/Space.c gia to susthma moy. Koitajte gurw apo th grammh 205 gia ton orismo toy PLIp gia na kanete thn 8ura kai to IRQ ths na tairiazoyn, kai shmeiwste poion odhgo xreiazeste (plip0, plip1, plip2). Sthn periptwsh moy h 8ura 0x278 xrhsimopoiei IRQ 5 (h karta einai ry8mismenh etsi) alla sto Space.c einai me IRQ 2. Ekana tis allages edw para na anoigw to mhxanhma kai na caxnw tis kartes. O allos tropos einai na dhlwsete to IRQ me to ifconfig argotera, alla o pyrhnas 8a jekinhsei me ta la8os IRQ gia to PLIP kai ayto na sas enoxlei. Einai mia aplh allagh (enos xarakthra).
To epomeno, kai dyskolotero, bhma:
Sto .../drivers/char/lp.c 8a breite ta parakatw peripoy sth grammh 38:
struct lp_struct lp_table[] = { { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, { 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
Prosejte tis allages poy ginontai- h mia 8ura afaireitai, opote mono dyo 8ures dhlwnontai. H 8ura 0x3BC mallon de 8a doylecei gia to PLIP- h grammh me ta IRQ synh8ws spaei se aytes tis 8ures.
Phrate antigrafo prin allajete ta arxeia, swsta; Twra etoimaste ena neo pyrhna me yposthrijh ektypwth, diktuoy, dummy kai plip.
Ry8miste to susthma. To diko moy /etc/rc.d/rc.inet1:
#!/bin/bash # /sbin/ifconfig lo 127.0.0.1 /sbin/route add -net 127.0.0.0 /sbin/ifconfig dummy 200.0.0.1 /sbin/route add -net 200.0.0.0 netmask 255.255.255.0 /sbin/ifconfig plip1 arp 200.0.0.1 pointopoint 200.0.0.2 up /sbin/route add 200.0.0.2 /sbin/ifconfig dummy down
Prosejte oti to arp xrhsimopoieitai se DOS-to-Linux syndeseis, oxi se Linux-to-Linux syndeseis.
Kai sto /etc/hosts pros8este ta parakatw, gia na dwsete apo ena onoma sta dyo mhxanhmata:
200.0.0.1 console1 200.0.0.2 console2
To DOS einai h console2. Prosejte thn proeidopoihsh toy Andrea, kalutera na xrhsimopoihsete tis epishmes diey8unseis.
Epanekkinhste wste oles oi allages kai o neos pyrhnas na energopoih8oun. Kata thn ekkinhsh (h me to dmesg) an balate tis pros8hkes, h alliws otan fortwsete ta modules 8a deite:
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.
H entolh "route" deixnei:
Kernel routing table
Destination Gateway Genmask Flags MSS Window Use Iface
console2 * 255.255.255.255 UH 1436 0 136 plip1
loopback * 255.0.0.0 U 1936 0 109 lo
Kai to "ifconfig plip1" deixnei:
plip1 Link encap:10Mbps Ethernet HWaddr FC:FC:C8:00:00:01
inet addr:200.0.0.1 P-t-P:200.0.0.2 Mask:255.255.255.0
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
Koitajte to /etc/inted.conf kai deite an to telnet einai energopoihmeno. Mporei na 8elete na diabasete to man toy tcpd, kai na xrhsimopoihsete to /etc/hosts.allow (ALL: LOCAL) kai /etc/hosts.deny (ALL: ALL). 8a prepei na mporeite na kanete "telnet localhost".
To Linux einai etoimo, pame sto DOS. 3ana na prosexete gia th 8ura 0x3BC ean yparxei.
Xrhsimopoiw to NCSA telnet kai ton odhgo PLIP ths Crynwr, poy briskontai stis parakatw diey8unseis:
ftp://ftp.ncsa.uiuc.edu/Telnet/DOS/ncsa/tel2308b.zip
ftp://ftp.crynwr.com/drivers/plip.zip
Sigoyreyteite oti exete thn ekdosh 2.3.08 toy NCSA telnet kai thn ekdosh 11.1 toy Crynwr PLIP odhgou. Diabaste to Crynwr SUPPORT.DOC.
To CONFIG.TEL arxeio: Ta perissotera einai oi ej'orismou ry8miseis opote to ekoca gia na glitwsw ligo xwro bazontas mono tis plhrofories poy xreiazeste (elpizw). H deuterh 8ura toy mhxanhmatos einai sto 0x278, IRQ 5.
myip=200.0.0.2 netmask=255.255.255.0 # 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=200.0.0.1 ; nameserver=1 ; gateway=1
(console1 einai to onoma toy Linux mhxanhmatos, xrhsimopoihste o,ti 8elete)
Ekana ena kalwdio 4 metrwn gia th sundesh kai (afou arxika brhka oti htan la8os ftiagmeno) den yphrje kanena problhma. Ena koino kalwdio ektypwtwn 11-syndesewn 8a doylecei kanonika. To Linux plip.c deixnei thn kalwdiwsh. An kai to diko moy exei syndeseis 17-17 de nomizw oti xreiazetai gia tipota kai den yparxei kai se etoima kalwdia.
@echo off plip.com 0x60 5 0x278 telbin -s console1
Ayto 8a sas syndesei sto Linux sto /dev/ttyp. To telnet toy NCSA dinei 8 o8ones kai leitoyrgei kai san ftp server. To PLIP petyxainei mia metria apodosh, pianw 6.5K/deyterolepto gia metafores arxeiwn me tis antikes moy. Elpizw na petuxete perissotera. :-)