Next Previous Contents

6. Pws na ypodiktywsete enan ari8mo diktuoy IP

Afou apofasisate pws xreiazetai na ypodiktywsete ton ari8mo toy diktuoy IP sas, pws 8a proxwrhsete; Ta parakatw einai mia sunach twn bhmatwn, ta opoia kai 8a ejhgh8oun argotera me leptomereia:-

Gia toys skopous aytou toy paradeigmatos, 8a ypo8esoyme pws ypo-diktywnoyme ena mono ari8mo diktuoy klashs C: 192.168.1.0

Aytos arkei gia to polu 254 syndedemena interface (host), syn ton ypoxrewtiko ari8mo diktuoy (192.168.1.0) kai thn dieu8ynsh ekpomphs (broadcast address) (192.168.1.255).

6.1 Kante thn fysikh sundesh

8a xreiastei na egkatasthsete thn katallhlh ypodomh kalwdiwshs gia oles tis syskeyes poy epi8ymeite na diasyndesete, wste na antapokrinontai sthn fysikh sas organwsh.

8a xreiasteite epishs ena mhxanismo gia na diasyndeete metaju toys ta diafora tmhmata (dromologhtes, metatropeis meswn (media converters) klp.).

Einai profanws adunath mia leptomerhs syzhthsh aytwn twn pragmatwn edw. Se periptwsh poy xreiasteite boh8eia yparxoyn gurw sumboyloi sxediasmou/egkatastashs diktuwn poy parexoyn tetoioy tupoy yphresies. Dwrean symboyles einai dia8esimes epishs se ena plh8os Usenet news groups (opws to comp.os.linux.networking).

6.2 Mege8os ypodiktuwn

Yparxei ena pazari metaju toy ari8mou twn ypodiktuwn poy dhmioyrgeite kai twn 'xaramismenwn' ari8mwn IP.

To ka8e diktyo IP exei dyo diey8unseis poy einai axrhstes gia diey8unseis interface (host)- ton idio ton ari8mo toy diktuoy IP kai thn dieu8ynsh ekpomphs/anakoinwshs. Otan ypodiktywnete, ka8e ypodiktyo apaitei apo mono toy, monadiko ari8mo diktuoy IP kai dieu8ynsh anakoinwsewn - kai 8a prepei na einai egkyres diey8unseis apo thn gkama twn diey8unsewn poy parexetai apo to diktyo IP poy ypodiktywnete.

Etsi, ypodiktywnontas, ena diktyo IP se duo jexwrista ypodiktya, dhmioyrgountai duo diey8unseis diktuwn kai duo diey8unseis ekpompwn- ayjanontas tis 'mh xrhsimopoioumenes' diey8unseis interface (host); dhmioyrgwntas 4 ypodiktya dhmioyrgei oktw axrhstes diey8unseis gia interface (host) k.o.k.

Sthn oysia, to mikrotero xrhsimo ypodiktyo apoteleitai apo 4 ari8mous IP:

To giati kapoios bebaia 8a h8ele na dhmioyrghsei ena toso mikro diktyo einai mia allh erwthsh! Me mono ena host sto diktyo, ka8e diktyakh epikoinwnia 8a ginetai pros alla diktya kai mono. Parola ayta, to paradeigma ejyphretei sto na epideijei ton nomo poy isxuei sthn ypo-diktuwsh.

Oysiastika, mporeite na diairesete ton ari8mo diktuoy IP sas, to polu se 2^n (opoy n einai ena ligotero apo ton ari8mo twn bit ston ari8mo diktuoy IP sas) idioy mege8oys ypodiktya.

Kai etsi, as eisaste realistes kata to sxediasmo toy diktuoy sas - 8elete ton elaxisto ari8mo jexwristwn topikwn diktuwn poy antapokrinetai stoys ylikous periorismous kai stoys periorismous diaxeirishs, ejoplismou kai asfaleias poy exete!

6.3 Ypologizontas thn maska ypodiktuoy kai toys ari8mous diktuwn

H maska diktuoy einai ayth poy kanei ola ta topika magika ths diaireshs enos diktuoy IP se ypodiktya.

H maska diktuoy gia ena mh-ypodiairemeno ari8mo diktuoy IP einai apla mia diaxwrizomenh me teleies tetrada ari8mwn poy exei ola ta 'bit diktuoy' toy ari8mou diktuoy ws '1' kai ola ta host bit ws '0'.

Etsi, gia tis treis klaseis twn diktuwn IP, oi klassikes maskes diktuoy einai:

O tropos me ton opoio h ypo-diktuwsh dra, einai na daneizetai ena h perissotera apo ta dia8esima bit kai meta na kanei ta interface topika na metafrazoyn ta daneika bit ws meros twn network bit. Etsi, gia na diairesoyme enan ari8mo diktuoy se duo ypodiktya, 8a daneizomastan ena host bit 8etontas to katallhlo bit sthn maska diktuoy toy prwtoy (kanonikou) host bit se '1'.

Gia mia dieu8ynsh klashs C, ayto 8a katelhge se mia maska diktuoy san thn
11111111.11111111.11111111.10000000
h 255.255.255.128

Gia ton ari8mo diktuoy mas ths klashs C 192.168.1.0, aytes einai merikes apo tis epiloges ypo-diktuwshs poy exete:-


No of      No of
subnets    Hosts/net    netmask
2            126        255.255.255.128 (11111111.11111111.11111111.10000000)
4             62        255.255.255.192 (11111111.11111111.11111111.11000000)
8             30        255.255.255.224 (11111111.11111111.11111111.11100000)
16            14        255.255.255.240 (11111111.11111111.11111111.11110000)
32             6        255.255.255.248 (11111111.11111111.11111111.11111000)
64             2        255.255.255.252 (11111111.11111111.11111111.11111100)

Oysiastika, den yparxei apolutws kanenas logos gia na akoloy8eiste ton parapanw tropo ypodiktuwshs, kata ton opoio ta bit ths maskas diktuoy prosti8entai apo to pio shmantiko bit toy host pros to pio ashmanto. Parola ayta, an den to kanete kat'ayton ton tropo, oi ari8moi IP poy 8a prokucoyn 8a einai se mia POLY periergh akoloy8ia! Ayto kanei polu duskolo gia emas toys an8rwpoys, to na apofasisoyme se poio ypodiktyo anhkei ka8e ari8mos IP, ka8ws den eimaste polu kaloi sto na skeftomaste sto dyadiko susthma (oi ypologistes apo thn allh einai kai 8a xrhsimopoihsoyn opoiodhpote sxhma toys peite, me thn idia panta eykolia).

Afou apofasisete gia thn katallhlh maska diktuoy, xreiazetai na katalabete poies einai oi diafores diey8unseis Diktuoy kai ekpomphs/anakoinwshs - kai thn klimaka twn ari8mwn IP gia ka8e ena apo ayta ta diktya. Pali, 8ewroume mono enan ari8mo diktuoy IP klashs C kai apeikonizontas mono to teleytaio meros (toy host) exoyme:


Netmask         Subnets Network B'cast  MinIP   MaxIP   Hosts  Total Hosts
--------------------------------------------------------------------------
    128            2       0     127       1     126    126     
                         128     255     129     254    126     252

    192            4       0      63       1      62     62
                          64     127      65     126     62
                         128     191     129     190     62
                         192     255     193     254     62     248

    224            8       0      31       1      30     30
                          32      63      33      62     30
                          64      95      65      94     30
                          96     127      97     126     30
                         128     159     129     158     30
                         160     191     161     190     30
                         192     223     193     222     30
                         224     255     225     254     30     240

Opws mporei na idw8ei, yparxei mia polu kala ka8orismenh akoloy8ia se aytous toys ari8mous, h opoia toys kanei ton elegxo toys sxetika aplo. H 'arnhtikh pleyra' ths ypo-diktuwshs einai epishs emfanhs, oson afora thn meiwsh toy olikou ari8mou twn dia8esimwn host diey8unsewn, oso to plh8os twn ypodiktuwn ayjanei.

Me aythn thn plhroforhsh, eisaste pleon se 8esh na ana8esete ari8mous IP se host kai diktya ka8ws kai maskes diktuoy.


Next Previous Contents