Next Previous Contents

6. Energopoiwntas thn sundesh.

Teleiwnontas, parakatw briskontai oi entoles, poy prepei na ektelestoun me dikaiwmata yperxrhsth, gia na energopoihsete th sundesh PLIP (fysika ta kalwdia prepei na einai syndemena swsta).

SHMEIWSH: Ean kati anapantexo symbei, diploelegjte to kalwdio kai thn or8ografia twn entolwn. Ean akoloy8hsate tis odhgies swsta alla yparxoyn akoma problhmata, diabaste thn paragrafo FAQ, opoy polles apanthseis einai dia8esimes.

Prwta apo ola bebaiw8eite oti den yparxei lp syskeyh:

# cat /proc/devices

Den prepei na deite anafores sto lp opws h parakatw:

 6 lp

Ean th deite, afaireste (proswrina) thn lp syskeyh prin synexisete. Ean to PLIP doyleuei mporeite na dokimasete kai me to lp argotera. Gia na afairesete thn lp syskeyh 8a xreiasteite thn rmmod entolh an einai module; an einai enswmatwmeno ston pyrhna 8a xreiastei na janametaglwttisete ton pyrhna me to lp ws module (mia polu kaluterh lush).

3ana xrhsimopoiw ta onomata one kai two ws paradeigma. Sto one 8a xreiastei na kanete ta parakatw.

Ean den xrhsimopoieite to kerneld kai exete to PLIP ws module, prepei na to fortwsete:

# insmod plip

SHMEIWSH: an h parallhlh 8ura sas einai se diaforetiko IRQ apo to 7 kai/h xrhsimopoiei diaforetikh IO dieu8ynsh apo thn 0x378, tote prepei na to peite sto insmod. Breite to IRQ kai IO dieu8ynsh (h DOS entolh MSD mallon 8a boh8hsei, an kai mhn thn empisteueste kai polu) kai gracte kati san ayto:

# insmod plip io=0x278 irq=5

Synh8ws to IRQ einai 7 h 5, me thn IO dieu8ynsh 0x378, 0x278 h 0x3bc. Einai shmantiko na elegjete oti h dieu8ynsh kai to IRQ sympiptoyn me tis ry8miseis ths mhtrikhs kartas sas (me braxykyklwthres stis palies, mesw toy BIOS stis kainouries)

An 8elete elegjte oti to module fortw8hke me:

  # lsmod

Module:        #pages:  Used by:
plip               3            0

Shmeiwste to onoma ths sundeshs (plip0, plip1, kok; gia perissoteres leptomereies diabaste to kefalaio me ta mynhmata toy pyrhna parapanw), kai ry8miste th sundesh:

# ifconfig plip1 one pointopoint two up

SHMEIWSH: an h parallhlh 8ura sas einai se diaforetiko IRQ apo to 7 kai/h xrhsimopoiei diaforetikh IO dieu8ynsh apo thn 0x378, tote prepei na to peite sto ifconfig. Xrhsimopoihste to idio IRQ kai IO dieu8ynsh poy anafer8hke apo ton pyrhna kai gracte ta parakatw:

# ifconfig plip1 irq 7
# ifconfig plip1 io_addr 0x3bc

Synh8ws to IRQ einai 7 h 5, me thn IO dieu8ynsh 0x378, 0x278 h 0x3bc.

Twra elegjte oti doulece...

# ifconfig



 .....
 .....
 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 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 

Pros8este th diodo sto two...

# route add two plip1

Kai an 8elete kai NFS gia to two:

# rpc.portmap
# rpc.mountd
# rpc.nfsd

Sto two oi entoles einai oi idies alla prepei na gracete one anti gia two kai antistrofa.

Ena apo ta mhxanhmata einai pi8anon na exei mono thn PLIP sundesh, opote an ayto alh8euei gia to two, mporeite na gracete:

# route add default gw one

sto mhxanhma. Sto paradeigma moy parapanw, to two einai enas forhtos me mono PLIP sundesh me to one, opote to parapanw to egraca sto two.

Telos elegjte me

# ping two

apo to one kai

# ping one 

apo to two gia na deite oti ola doyleuoyn entajei.

Fysika mporeite na exete oles aytes tis entoles na ektelountai aytomata apo ena script kata thn ekkinhsh. Prepei na dhmioyrghsete ena script poy ektelei aytes mono tis entoles: etsi mporeite na to energopoieite ws yperxrhsths opote xreiazete, h mporeite na to pros8esete sto /etc/rc.d/rc.inet2 gia na kaleite kata thn ekkinhsh toy systhmatos.

Gia na ry8misete to PLIP, mporeite na xrhsimopoihsete thn entolh plipconfig, deite th man selida ths gia perissoteres odhgies.

Gia na diakocete th sundesh xreiazeste:

# ifconfig plip1 down

poy afairei kai tis eggrafes ths sundeshs. Ean den exete to kerneld afaireste kai to module:

# rmmod plip


Next Previous Contents