Khi Nim C Bn V Mng Lܧi Truyn Tin Ton Cu

Cu Trc ca Mng Lܧi Truyn Tin Ton Cu

(The Structure of Internet)

Phng Thnh Nguyn (rev. 08/14/95)

Li M u

Nh chng ta bit qua nhiu bi ni v s bnh trܧng v cng dng ca Mng Lܧi Truyn Tin Ton Cu thay ǰi trc tip v x hi, gio dc, khoa hc v cch thc lm vic ca ǩi sng hin na Ngy nay, ngi trn mt my vi tnh ngܩi s dng c th gi th in ti mt ni cch xa hng ngn cy s, c th gi hoc ly nhng ti liu, d kin khoa hc t mt ni lu tr xa xm, c th quan st v thu thp chi tit v thi tit ti nhiu ni trn th gii, c th bnh lun hu nh tt c mi vic g trong x hi, c th lng nghe tin tc trong ngy (voice news) bng nhiu th ting, hoc c th trc tip chng kin bui phng phi thuyn Con Thoi (live coverage on Internet) v.v.

Nhng iu k trn ch l ni ln mt phn no v nhng cng dng ca Internet mang li cho mi ngܩi. Nhng nu chng ta thc mc t hi ti sao tt c nhng iu trn c th thc hin ܮc? Lm sao mt my vi tnh c th lin lc hoc ni chuyn vi mt my vi tnh khc? Lm sao mt bc th in li ti ng ngܩi nhn trong hng triu ngܩi s dng? Lm cch no m khi chuyn ti hng triu triu tn hiu m tt c tn hiu khng b b st hoc sai bit hoc b tht lc? V cn nhiu cu hi tng t nh vy lin quan ti Internet m nhiu ngܩi thc mc t hi.

Mc ch ca bi ny l em li cho ngܩi džc mt khi nim c bn v Cu Trc ca Mng Lܧi Truyn Tin Ton Cu. ti ny s bao gm nhiu phn, mi phn s trnh by mt kha cnh ca s cu trc ny. nh ca tc gi l ch mong ng gp vo kin thc ph thng hng ngy ca mi ngܩi. V l mc ch nh vy cho nn c nhiu im ܮc tc gi c tnh b st hoc ch ni s qua Nj lm gim bt s phc tp.


Phn 1: Bng Truyn Tin (Communication Adaptor)

1) Bng Truyn Tin

Mt my vi tnh ny mun lin lc vi mt my vi tnh khc th mi my cn phi c trang b mt Bng Truyn Tin (communication adaptor). Bng Truyn Tin ny gip my vi tnh chuyn i hoc nhn ly tn hiu (signal) t mt mi trܩng truyn tin (medium). Hin nay c nhiu loi mi trܩng truyn tin khc nha Mi trܩng truyn tin dng Nj lin kt nhng my vi tnh nm gn nhau gi l LAN (Local Area Network) th d nh Token Ring, Ethernet v.v. Mi trܩng truyn tin dng Nj lin kt nhng my vi tnh trong khu vc ln hn gi l MAN (Metropolitan Area Network). Mi trܩng ny thܩng chuyn ti tn hiu vi vn tc ca Mi trܩng truyn tin cui gi l WAN (Wide Area Network) dng Nj lin lc gia cc my vi tnh t x Nh vy my vi tnh cn phi c Bng Truyn Tin thch hp ty thuc vo mi trܩng truyn tin m my vi tnh mc ni vo. Th d ca nhng Bng Truyn Tin thng dng nht: Token Ring, Ethernet, X.25, FDDI, Serial Line v.v. Vi mi trܩng truyn tin c th chuyn ti tn hiu vi vn tc khc nhau nh Token Ring c th chuyn ti vi 4 MB (4 Mega bits per second - 4 triu n hiu trong mt giy) hoc l 16 MB. Serial Line cng c th c nhiu vn tc khc nhau t 56 KB (56 ngn n hiu/gia^y) cho ti hn 2 MB. Vn tc ca mi trܩng truyn tin Ethernet thng thܩng l 10 MB nhng t khi no lu lܮng tn hiu t ti mc ny v s va chm ca cc tn hiu (Signal Collission). Gn y ngܩi ta ch ra Bng Truyn Tin Ethernet c vn tc ti 100 MB nhng vn cha ܮc ph bin lm. Cng cn nn bit l mi trܩng FDDI chuyn ti tn hiu bng nh sng cho nn t ܮc vn tc rt cao ln ti hn 100 MB. Ngoi ra hin gi mt loi bng truyn tin ang ܮc mi ngܩi ch ti l ATM (Asynchronous Transfer Mode) l mt loi bng truyn tin c th chuyn ti tn hiu mt cch nhanh chng t vi chc MB cho ti hn 100 MB trong mt gi

2) Mt Lܧi (Network)

Nhng my vi tnh c cng chung mt loi Bng Truyn Tin, cng lin kt chung vi nhau bng ܩng dy chuyn ti (wire) th hp thnh mt Mt Lo+'i (Network) (Ch : Tht ra mt mt lܧi c th do vi mi trܩng truyn tin khc nhau to thnh. Trܩng hp ny l do s ni cu (bridging) v s ܮc trnh by sau). Trong Mt Lܧi ny tt c cc Bng Truyn Tin phi ng v phi thng nht vi nhau v vi d kin th d nh v vn tc, (4 MB or 16 MB cho Token Ring v.v), v Nghi Thc ca Khung tn hiu (IEEE 802.5 cho Token Ring, IEEE 802.3 hoc DIX cho Ethernet, Frame Relay or Point-To-Point cho Serial Line v.v.), v tng s nguyn hiu (byte) ti a trong mt Khung (maximum tranmission unit in a frame) v.v. Ngܩi s dng my vi tnh bnh thܩng khng cn phi quan tm ljn vn NJ ny. Tt c nhng d kin cn thit cn sp xp ny ܮc cc chuyn vin iu Hnh Mng Lܧi (Network Administrators) lo liu.

3) Khung Tn Hiu (frame or packet)

Cc my vi tnh khi lin lc vi nhau th gi cho nhau cc khung tn hiu. Cc khung tn hiu ny khc nhau ty thuc vo mi trܩng truyn tin. Phn u ca Khung tn hiu ny c cha ǿng cc d kin cn thit v my gi v my nhn. iu cn bit l khi mt khung tn hiu ܮc chuyn ti t mt mt lܧi ny sang mt mt lܧi khc th phi nh ljn cc my Chuyn Tip (routers) hoc l my Cu (bridges). Nhiu khi v c s xc nh khc nhau v kch thܧc ca khung (frame size) gia cc mi trܩng cho nn cc khung tn hiu ny c th b b gy ra lm nhiu Khung nh (fragmentation) do cc my Chuyn Tip nhng cc my ny s hn gn li (assembly) cc Khung trܧc khi ljn my nhn. (Ch : C nhiu ngܩi v nhiu ti liu thܩng dng danh t "ti" tn hiu (packet) thay v danh t khung tn hiu. iu ny khng c g l sai ch v do s quen thuc m thi).

4) a ch ca Bng Truyn Tin (Adaptor's MAC-Address or Physical Address)

Mi Bng Truyn Tin NJu c mt a ch khc nha Cc a ch ny gi l MAC Address (Medium Access Control Address). Mi a ch do 6 nguyn hiu to thnh. C th hiu MAC-addrress ny cng nh s an sinh x hi, s cn cܧc ca mi ngܩi. Nh vo MAC-Address ny m cc Khung tn hiu tm ng v tr ca Bng Truyn Tin ca my nhn trong mt lܧi. MAC-address ca mi Bng Truyn Tin ܮc khc vo (burned in) trong lc cc Bng Truyn Tin ܮc ch to ti cc nh my sn xut. Thng thܩng trong lc s dng cc Bng Truyn Tin ngܩi ta t khi no thay ǰi cc MAC-address ny nhng i khi cng cn thit Nj sa ǰi n thnh mt a ch khc. iu cn bit l mt my vi tnh c th c mt Bng Truyn Tin hoc c nhiu Bng Truyn Tin ging hoc khc loi. Cc my vi tnh c gn nhiu bng Truyn Tin th ܮc mc ni vo nhiu mt lܧi khc nha

Trn thc t ngܩi s dng my vi tnh rt t khi no bit Bng Truyn Tin ca my h thuc loi g hoc a ch MAC ca n. Tht vy, nhng iu k trn rt phc tp cho ngܩi s dng. Th d mt ngܩi My A mun gi mt bc th in ti My B th ngܩi My A khng th no bit hoc nh ni ci a ch bao gm 6 nguyn hiu ca My B v ca ring my mnh. V vy ngܩi ta ǥt ra nhiu Nghi Thc khc nhau Nj gip cc my lin lc vi nhau d dng hn th d nh AppleTalk, NetBios, XNS, IPX (Novell), IP v.v. V Internet da vo Nghi Thc IP (Internet Protocol) cho nn cc phn sau ca bi ny NJu ni v Nghi Thc IP m thi .


Phn 2 - a Ch IP

Xin nhc li l khi mt my vi tnh mun lin lc vi mt my vi tnh khc th my vi tnh ny phi bit a ch ca Bng Truyn Tin ca my kia v ca chnh n. Nhng v a ch ca Bng Truyn Tin (MAC-Address) rt di (6 nguyn hiu) v rt kh nh nn ngܩi ta lp ra nhng Nghi Thc Nj lm gin d ha v cho ngܩi s dng v nhng ngܩi vit Chng Trnh d hiu hn. C nhiu loi Nghi Thc khc nhau nhng ni bt nht v thng dng nht l Nghi Thc IP. Nh Nghi Thc IP ny m Mng Lܧi Truyn Tin Ton Cu m rng trn khp th gii. Nghi Thc IP ny thnh cng trong vic mc mi hng trm ngn my vi tnh loi trn ton cu li vi nha Bi ny ch trnh by v cu trc ca a ch IP tc l mt trong nhng im chnh ca Nghi Thc IP.

I - a Ch IP (Internet Address)

Khi ngܩi ta lp ra Nghi Thc IP, phn a ch IP ܮc nghin cu v chn la sao cho mi Bng Truyn Tin mang mt a ch Ƕc lp khng b trng vi mt a ch no khc v lm cho phn tm kim a ch trong Mng Lܧi d dng hn (routing).

1) Cch Cu To

a Ch IP bao gm 4 nguyn hiu (4-bytes) v ܮc k hiu nh sau:
X.X.X.X
X tܮng trng cho mt nguyn hiu v c th c gi tr t 0 - 255. Nh vy cc a ch IP gm 4 s, mi s cch bit nhau bng du chm v ܮc mang gi tr t 0 cho ti 255. Th d nh:

153.2.16.251
a ch IP cn ܮc chia ra lm 5 lp (Classes) ty thuc v gi tr ca nguyn hiu u tin (First Byte). 5 lp ny l

Nu nguyn hiu u tin mang gi tr:

    1 - 126   : thuc lp A, th d nh 9.X.X.X
    128 - 191 : thuc lp B, th d nh 151.X.X.X
    192 - 223 : thuc lp C, th d nh 198.X.X.X
    224 - 239 : thuc lp D, a ch ǥc bit
    240 - 247 : thuc lp E, cha ܮc xi ti
Trong 5 lp a ch ny th 3 lp a ch A, B, v C l ܮc dng rng ri nht .

Ch : V a s cc my vi tnh ch c mt Bng Truyn Tin duy nht cho mi my. V vy a ch IP ca Bng Truyn Tin c th hiu l a ch IP ca my vi tnh. Nh vy, khi tc gi xi a ch IP ca my vi tnh th Ƕc gi c th hiu ngm l a ch IP ca Bng Truyn Tin.

2 Ngha

a Ch IP cn ܮc chia ra lm hai phn. Phn th nht l a ch ca Mt Lܧi (Network portion or netid) v phn cn li l a ch ca my vi tnh (host portion or hostid). iu cn bit l phn a ch ca my vi tnh trong a ch IP khi tt c cc n hiu NJu l 1's hoc l 0's th ܮc dng Nj truyn tin theo li tng pht, v vy nhng a ch ǥc bit ny khng ܮc dng cho my vi tnh. Phn a ch ca Mt Lܧi v ca my vi tnh di ngn khc nhau ty thuc vo a ch IP thuc v lp no. Theo qui nh th
           a ch Mt Lܧi  a ch ca my
           -----------------         ----------------------
Lp A :  1 nguyn hiu u   3 nguyn hiu cn li
Lp B :  2 nguyn hiu u   2 nguyn hiu cn li
Lp C :  3 nguyn hiu u   1 nguyn hiu cn li
Th d:
  1. - 9.67.5.13
    y l a ch IP thuc lp A . Nh vy a ch ca Mt Lܧi s l 9.0.0.0 v phn 67.5.13 l a ch ca my vi tnh trong Mt Lܧi .

  2. - 145.5.7.25

    y l a ch IP thuc lp B. 145.5.0.0 s l a ch ca Mt Lܧi v 7.25 l a ch ca my vi tnh trong Mt Lܧi .

  3. - 212.15.153.8

    y l a ch IP thuc lp C. i ch Mt Lܧi s l 212.15.153.0 v a ch ca my vi tnh trong Mt Lܧi l 8 .

Nh vy a ch IP ca my vi tnh ܮc chia ra lm hai phn: a ch ca Mt Lܧi v a ch ca my vi tnh trong Mt Lܧi . Nh vo s phn chia ra lm hai phn ny m s chuyn tip tn hiu t mt mt lܧi ny ti mt mt lܧi khc ܮc d dng hn. Cc my Chuyn Tip (routers) ch cn c vo a ch ca mt lܧi v s chuyn tip ti tn hiu t mt lܧi ny qua mt lܧi khc cho ti khi ti ng a ch ca mt lܧi . Khi ti tn hiu ti ng mt lܧi ri th my Chuyn Tip s chuyn ti tn hiu cho my nhn cn c vo phn a ch ca my nhn trn a ch IP.

II - Cch Truyn Tin

C 3 cch truyn tin theo Nghi Thc IP. Cch th nht gi l Tng Pht (Broadcast), cch th nh gi l a Pht (Multicast) v cch sau cng l n Pht (Unicast).

1) Tng Pht (Broadcast)

Mt my vi tnh truyn tin theo li Tng Pht c ngha l tt c mi my vi tnh mc ni chung trong mt Mt Lܧi NJu nhn ܮc tn hiu pht ra t my vi tnh . Li Tng Pht bt buc tt c cc n hiu (bit) trong phn a ch ca my phi l 1 hoc l 0. Thng thܩng ngܩi ta thܩng chn gi tr 1 cho li Tng Pht.

Th d nh mt my vi tnh c a ch IP l 201.5.125.7. y l a ch IP thuc lp C, nh vy phn a ch mt lܧi s l

201.5.125
Nguyn hiu th t l phn a ch ca my vi tnh. Theo li tng pht th tt c n hiu trong phn a ch ca my phi l 1. Nh ta bit mt nguyn hiu c 8 n hiu, nu vit nguyn hiu th t theo h nh phn ta c
11111111
tc l bng gi tr 255 theo h thp phn. Nh vy khi my vi tnh truyn tin ti a ch 201.5.125.255 th tt c cc my vi tnh nm trong mt lܧi 201.5.125 ddu nhn ܮc tn hiu t my 201.5.125.7 pht r (Ch : Mc du phn ln cc cng ty NJu dng gi tr 1's cho vic Tng Pht nhng c cng ty li dng gi tr 0's cho vic Tng Pht. Nh th d trn th a ch 201.5.125.0 s c cng dng tng pht. V th, gi tr 0's v 1's Nj dnh cho vic tng pht v khng ܮc xi cho phn a ch ca my trong a ch IP ca cc my vi tnh)

2) a Pht (Multicast)

a Pht c ngha l khi mt my vi tnh truyn tin theo li a Pht th ch mt nhm my vi tnh nht nh no trong Mt Lܧi c th nhn ܮc tn hiu m th Ni theo mt cch khc, mt nhm my vi tnh trong mt mt lܧi ng vi nhau Nj chn mt a ch ǥc bit Nj mi khi my no trong nhm dng a ch ǥc bit Nj pht ra th tt c cc my vi tnh trong nhm NJu nhn ܮc. Nh vy mt my vi tnh no mun nhn ܮc cc ti tn hiu pht theo li a Pht th my tnh phi bit trܧc a ch a Pht .

Cc a ch a Pht thuc vo lp D. Th d nh mt my vi tnh Y c a ch IP l 201.5.125.7 mun dng cch a Pht th my vi tnh c th dng mt a ch thuc lp D nh 224.0.0.5. Nhng my vi tnh no trn mt lܧi thuc nhm 224.0.0.5 th nhn ܮc tn hiu pht ra t my Y cn nhng my khc th khng hay bit g (Ch : mt my vi tnh mun tham gia vo mt nhm thuc a Pht th my vi tnh phi sp ǥt Bng Truyn Tin c kh nng pht v nhn a ch a Pht).

iu nn ch l cc bng truyn tin thuc loi Ethernet dng mt s a ch MAC ǥc bit Nj truyn tin theo li a pht. Trܧc khi ti tn hiu ܮc truyn i th phi qua mt giai on gi l i chiu (mapping) Nj chuyn a ch a pht t nghi thc IP sang a ch MAC ca mi trܩng truyn tin Ethernet.

3) n Pht (Unicast)

Loi ny thng dng nht, c ngha l mt my vi tnh lin lc ring r vi mt my vi tnh khc trn mt lܧi hoc l trn mt mc lܧi khc.

Bt c mi trܩng truyn tin no cng c th vn chuyn cch n Pht. Nhng c nhng mi trܩng truyn tin khng c kh nng truyn tin theo li tng pht hoc l a pht. Nh vy mt my vi tnh truyn tin bng cch no th ty thuc vo mi trܩng truyn tin ca my mc ni vo.

III - Mt Lܧi Ph v a Ch Ph (Subnetwork and Mask address)

1) Mt Lܧi Ph (Subnetwork)

Nh nhng phn trn cho thy mt a ch IP ca mt my vi tnh ܮc chia ra lm hai phn, phn a ch cho mt lܧi v phn cn li cho my vi tnh.

Th d nh a ch thuc lp C:

201.5.125.5
c a ch mt lܧi l 201.5.125 c th cha ti 254 my vi tnh (t 1 cho ti 254).

Th d mt a ch khc thuc lp B:

145.12.5.5
phn a ch ca mt lܧi s l 145.12 c kh nng cha ti 65.534 my vi tnh (1).

Th d mt a ch khc thuc lp B:

9.67.12.6
phn a ch mt lܧi s l 9 c kh nng cha ti 16.777.214 my vi tnh (1).

Trn thc t th khng c mt mt lܧi no li c sc cha nhng s khng l v my tnh nh vy. Thng thܩng mi mt lܧi ch cha vo khong vi chc hoc vi trm my vi tnh m th Nghi Thc IP cho php ngܩi ta thay ǰi mt a ch IP Nj ܮc thm nhiu mt lܧi ph ng thi gim bt i s lܮng my vi tnh trong mi mt lܧi. Nh vy vic iu hnh, theo di, cch sp xp v tr my vi tnh ܮc d dng v thc t hn nhiu.

Cch to thm mt lܧi ph l ngܩi ta dng mt phn ca nguyn hiu th hai hoc th ba hoc th t Nj to thm mt lܧi ph.

Th d nh a ch IP lp B:

145.12.5.5
Theo a ch ny th phn a ch mt lܧi s l 145.12 nhng nu nguyn hiu th ba ܮc dng Nj to thm mt lܧi ph th a ch ca mt lܧi ph ca a ch trn s l 145.12.5. Nh vy t mt mt lܧi 145.12 cha ܮc 65.534 my vi tnh sau khi dng nguyn hiu th ba Nj c thm mt lܧi ph th ta ܮc 254 mt lܧi ph (t 145.12.1 cho ti 145.12.254) v mi mt lܧi c th cha ܮc 254 my vi tnh. Ch l nguyn hiu th ba hai gi tr 0 v 255 khng ܮc dng ti. iu ny l do qui ܧc chung l tt c cc n hiu ca phn a ch ph khng ܮc c gi tr l 0's hoc l 1's. Nh ta bit gi tr 0 v gi tr 255 theo h nh phn s l 00000000 v 11111111 tri vi iu qui nh. V vy hai gi tr ny b loi b.

Ngܩi ta c th dng thm vi n hiu trong nguyn hiu k tip Nj to thm mt lܧi ph nhng v s phc tp ca n cho nn khng ܮc trnh by

2) a ch Ph (Mask Address)

Lm cch no Nj mt my tnh bit ܮc trong mt a ch IP th phn no s l a ch ca mt lܧi v phn no thuc v my vi tnh? gip my vi tnh tm ra a ch ca hai phn ny Nghi Thc IP ǥt ra thm mt a ch ph i km theo vi a ch IP. Theo qui nh a ch

  Lp         a ch ph
  A             255.0.0.0
  B             255.255.0.0
  C             255.255.255.0
Bng vo vi php tnh (2) m my tnh s tm ra ܮc a ch ca mt lܧi. C nhng a ch ph nh 255.255.240.0, 255.255.248.0, 255.255.255.240 hoc l 255.255.255.192 v.v. l do s thay ǰi a ch IP Nj c thm nhng mt lܧi ph. (3)

Trn thc t ngܩi ta thܩng dng mt lܧi ph Nj to thnh nhng mng lܧi trong khu vc ca h (4). C th ni rng H Thng Mng Lܧi Truyn Tin Ton Cu l tng hp ca s mc ni ca nhng mt lܧi ph m r

Thng thܩng khi mt my vi tnh ܮc mc ni vo mt mt lܧi th my vi tnh s ܮc cc chuyn vin iu Hnh Mng Lܧi cp php cho mt a ch IP cng vi a ch ph.

Phn džc thm

  1. Gii thch ti sao (a) mt a ch lp B cha 65.534, v (b) lp A cha ti 16.777.214?

    Tr li:
    (a) Theo a ch thuc lp B th nguyn hiu th ba v th t l a ch ca my. Mt nguyn hiu (byte) c ljn 256 gi tr t 0 cho ti 255. Nh vy

    tng s my = 256 x 256 = 65536

    Nhng khi c hai gi tr m nguyn hiu ba v t khng ܮc xi l X.X.0.0 v X.X.255.255. V vy

    tng s my = 65536 - 2 = 65534

    (b) Tng t nh cu (a)

    tng s my = 256 x 256 x 256 = 16777216
    Loi b hai gi tr X.0.0.0 v X.255.255.255
    tng s my = 16777216 - 2 = 16777214

  2. Dng php tnh no Nj la^'y ܮc phn (a) a ch mt lܧi v phn?

    Tr li:
    (a) Dng php tnh AND trong h nh phn
    Th d:
    a ch IP : 145.5.12.67
    a ch ph: 255.255.0.0

       Vit theo h nh phn
            10010001.00000101.00001100.01000011
       AND  11111111.11111111.00000000.00000000
            -----------------------------------
            10010001.00000101.00000000.00000000
    
    gi tr ny theo h thp phn s l 145.5.0.0

  3. C mt a ch IP l 145.5.35.12 v a ch ph ca n l 255.255.240.0. Lm sao tm (a) a ch mt lܧi ph? (b) a ch tng pht trong mt lܧi ph ?

    Tr li:
    (a)
    a ch IP: 145.5.35.12
    a ch ph: 255.255.240.0

        Vit theo h nh phn
        a ch IP:   10010001.00000101.00100011.00001100
        a ch ph: 11111111.11111111.11110000.00000000
    

    Dng php tnh AND Nj tm a ch mt lܧi ph:
    a ch mt lܧi ph s l:

           10010001.00000101.00100000.00000000
    
    theo h thp phn s l: 145.5.32.0

    (b)
    a ch tng pht bt buc cc n hiu trong phn a ch ca my phi l 1's. Tc l cc n hiu sau y:

           10010001.00000101.00100000.00000000
                                 ^^^^ ^^^^^^^^
    
    

    Nh vy a ch tng pht ca mt lܧi 145.5.32 l:

           10010001.00000101.00101111.11111111
    
    Theo h thp phn s l: 145.5.47.255

  4. C mt cng ty nh ܮc cp mt a ch IP lp C l 198.5.10.0. Ngܩi iu hnh cng ty ny khng mun dng a ch ny cho mt mt lܧi duy nht m ng ta li mun dng a ch ny Nj chia ra lm 6 mt lܧi ph. (a) Lm cch no Nj gip ng ta thc hin ܮc?

    Tr li:
    (a) Dng vi n hiu trong nguyn hiu th t Nj chia a ch trn ra lm nhiu mt lܧi ph. Bao nhiu n hiu cn phi dng? Theo yu cu l phi c 6 mt lܧi ph. Nu dng 3 n hiu Nj phn chia th 2 ly tha 3 s l 8. Nh vy Nj phn chi y l cch chia mt lܧi ph theo nguyn hiu th t dng h nh phn:

         00000000 =   0  Khng xi
         00100000 =  32
         01000000 =  64
         01100000 =  96
         10000000 = 128
         10100000 = 160
         11100000 = 192
         11100000 = 224  Khng xi
    

    Nh vy a ch ca 6 mt lܧi ph s l:

            198.5.10.32
            198.5.10.64
            198.5.10.96
            198.5.10.128
            198.5.10.160
            198.5.10.192
    

    Mi mt lܧi ph c kh nng cha 31 my vi tnh.


Phn 3 - Nghi Thc Tm a Ch (Address Resolution Protocol - ARP)

Phn 2 ni v cch thc cu to ca a ch IP. a ch IP to s d dng cho ngܩi s dng v cn d hn na khi chng ta hiu bit s lin quan gia a ch IP bng s v a ch IP bng tn. Vi a ch IP th mt my vi tnh A mun lin lc vi mt my vi tnh B th my A s gi nhng ti tn hiu ti my B cn c v a ch IP ca my B. Nhng tht s ra nu my A mun lin lc vi my B th my A phi bit a ch MAC ca bng truyn tin my B. a ch MAC ca bng truyn tin (6 nguyn hiu) hon ton khc hn vi a ch IP (4 nguyn hiu). Nh vy lm sao my A c th lin lc vi my B trong khi my A ch c a ch IP ca my B? Mc ch ca Phn ny l gii thch v trnh by cch thc tm kim a ch MAC ca mt my vi tnh t a ch IP ca my vi tnh . (Ch : Nj to s ngn gn th danh t "a ch MAC" s ܮc s dng Nj thay th cho "a ch ca bng truyn tin").

I - Nghi thc tm a ch MAC

               My-A 201.5.10.1
                 |
               -----
              (     )
             (       )
    MyDD--(    X    )--My-B 201.5.10.2
 201.5.10.4  (       )
              (     )-- My-RT (My Chuyn Tip)
               -----
                 |
               My-C 201.5.10.3
Th d nh hnh v trn, my-A mun lin lc vi my-C. My-A bit ܮc a ch IP ca my-C l 201.5.10.3 nhng my-A li khng bit a ch MAC ca my-C v vy my-A phi dng Nghi Thc Tm a Ch Nj tm ra a ch MAC ca my-C.

Theo nh hnh v cho thy, tt c cc my A, B, C v D NJu ܮc mc ni vo cng mt mt lܧi X v a ch ca mt lܧi X s l 201.5.10.0. Khi my-A mun lin lc vi my-C ln u tin th A s dng mt khung tn hiu theo Nghi Thc Tm a Ch. Trong khung tn hiu ny s cha ǿng a ch MAC ca my gi, a ch IP ca my gi, a ch MAC ca my cn tm, v a ch IP ca my cn tm. Nh vy my-A s gi ra mt khung tn hiu cha ǿng a ch MAC ca A, a ch IP ca A, a ch MAC cn tm th b trng, a ch IP cn tm l a ch IP ca my-C. My-A s dng phng cch Tng Pht Nj gi khung tn hiu vo mt lܧi X. a ch tng pht m my A gi vo mt lܧi X s l 201.5.10.255. V my-A dng phng cch Tng Pht cho nn tt c cc my vi tnh trn mt lܧi X NJu nhn ܮc khung tn hiu do my-A pht r Tt c cc my trn mt lܧi X NJu phi so snh a ch IP cn tm vi a ch IP ca chnh my mnh. Nh th d trn th my-B, C, v D NJu so snh nhng ch c my-C l c a ch ca mnh trng hp vi a ch IP cn tm trong khung tn hiu m th iu nn bit l mc du a ch IP ca cc my B v D khng trng vi a ch IP cn tm nhng hai my B v D s ct gi a ch IP v a ch MAC ca A vo khu tr nh nng Ƕng Nj s dng sau ny.

Khi my-C pht gic ra s trng hp gia a ch IP cn tm v a ch IP ca chnh n th my-C s bit l my-A ang cn a ch MAC ca my C Nj lin lc. Khi bit ܮc nh vy th my C s b a ch MAC ca mnh vo khung tn hiu v gi tr v cho my- Ch l my-C s gi khung tn hiu trc tip tr v cho my A v trong khung tn hiu m C nhn ܮc t A c mang a ch MAC ca my A v my C ghi nh ly a ch ny v ct gi vo khu tr nh nng Ƕng (cache). Sau khi my-A nhn ܮc khung tn hiu gi tr v t C trong c mang theo a ch MAC ca my C th A s dng a ch MAC ny Nj bt u gi nhng khung tn hiu mang ti liu (data) ljn cho my C. Ma'y-A cng s ct gi a ch MAC ca my C v khu tr nh nng Ƕng Nj vic chuyn gi s nhanh chng hn. Khi c my-A v my-C NJu bit a ch MAC ca nhau th vic s dng Nghi Thc Tm a Ch hon thnh.

Nu gp trܩng hp my-A mun lin lc vi mt my-N nm trong mt lܧi Y no th my-A s khng cn tm a ch MAC ca my N. Thay vo my-A s gi nhng khung tn hiu ti my-RT tc l my chuyn tip (router) nm trong mt lܧi X. My RT s tm cch gi nhng khung tn hiu cho my-N. Phn ny s ܮc ni r hn trong Phn khc.

Ch : Th d v Nghi Thc Tm a Ch trn l da trn mi trܩng truyn tin m cc my c th dng phng php tng pht. Cn nh nhng mi trܩng truyn tin khng cho php phng php tng pht m ch cho php phng php a pht hoc n pht th c nhng Nghi Thc tng t Nj tm a ch MAC.


Phn 4 - Trm Chuyn Danh (Name Server)

Nhng Phn trܧc gip chng ta hiu ܮc cch thc lin lc gia nhng my vi tnh theo Nghi Thc IP. T a ch MAC ca bng truyn tin (6 nguyn hiu) rt kh nh v phc tp ngܩi ta dng Nghi Thc IP Nj lm n gin hn v do a ch IP (4 nguyn hiu) ܮc hnh thnh. a ch IP rt d nh hn nhiu so vi a ch ca bng truyn tin. a ch IP cn rt tin dng cho vic thnh lp nhng mt lܧi v nhng mt lܧi ph. iu quan trng nht l a ch IP to s d dng cho cc my chuyn tip trong vic tm kim v tr ca nhng mt lܧi v my vi tnh Nj trao nhng ti tn hiu lin lc. Nhng theo t nhin, mi ngܩi NJu quen thuc vi vic s dng tn h thay v dng nhng con s. Th d nh chng ta hng ngy tip xc vi mi ngܩi khc NJu bng tn h thay v bng s an sinh x hi hoc l s cn cܧc ca h. Do a ch IP rt thng dng i vi nhng nhn vin iu hnh mng lܧi nhng i vi nhng ngܩi s dng my vi tnh hng ngy Nj lin lc th n cng cn rt bt tin v kh nh.

I - Cu To ca a Ch IP Bng Tn (Name Address)

to s d dng cho ngܩi s dng, ngܩi ta ǥt ra a ch IP bng tn. a ch bng tn ny ܮc cu to sao cho d nh, r rng v gip cho ngܩi s dng c khi nim v s hu v v tr ca a ch . Thng thܩng, a ch bng tn ܮc cu to nh sau:
aaa.bbb.ccc
aaa c th l tn ca mt my vi tnh hoc l tn ca mt nghnh, mt nhm. bbb c th l tn ca mt c quan, mt trܩng hc, mt hi on v.v., v ccc tܮng trng cho cc hi, nghnh, hng xܫng, c quan hnh chnh, hoc l mt quc gia v.v. Ni mt cch tng qut, a ch IP bng tn cho ta bit phn no v ni chn, khu vng ca my vi tnh .

Th d ca mt dng a ch thng dng nht:

eecs.ucdavis.edu
T phi sang tri , edu l h thng ca cc trܩng i hc. ucdavis l trܩng i Hc Davis ti California. eecs l tn tt ca mt nghnh hc ܮc dy trong trܩng Davis gi l Electronic Engineering and Computer Science.

Phn cui ca a ch bng tn c th cho ngܩi ta bit phn no v ci a ch u hoc thuc v chnh quyn hay hng xܪng. Th d nh nhng ci ph bin l:

  EDU -- Cc trܩng i Hc
  COM -- Hng xܫng
  GOV -- C quan chnh quyn
  MIL -- Qun Ƕi
  NET -- nhng trung tm ln cung cp dch v Internet
  ORG -- Nhng hi on
  CAN -- Canada
  AU  -- Australia v.v.

II - S dng

Vi a ch bng tn gip cho ngܩi s dng d cc a ch ca my vi tnh. Th d nh ngܩi s dng mun ly vi nhu liu Vietnam t trܩng i hc Stanford th thay v ngܩi s dng phi nh ly a ch IP ca my vi tnh c ct cha cc nhu liu (36.22.0.47), ngܩi s dng ch cn nh ly ci tn ca my ct cha ti liu l haynd.stanford.edu v ra mnh lnh nh sau:

ftp haydn.stanford.edu
th s ܮc mc ni vi my vi tnh c cha nhu liu Vietnam ti .

Nhng iu nn bit l a ch bng tn dng Nj gip cho ngܩi s dng my vi tnh thm d dng. Mun lin lc ܮc vi my vi tnh no th my vi tnh ny phi bit a ch IP ca my ki Nh vy lm sao t mt a ch bng tn m my vi tnh c th bin ǰi thnh a ch IP? y chnh l nhim v ca nhng Trm Chuyn Danh.

1) Tn Khu Vc (Domain name)

Trܧc khi ni v cch thc chuyn a ch bng tn sang a ch IP chng ta nn hiu s qua v tn khu vc ca mnh. Cn nhc li l H Thng Truyn Tin Ton Cu l tng hp ca tt c cc mt lܧi hoc mt lܧi ph. Trn thc t mi hng xܫng, c quan hoc trܩng hc v.v. NJu b tr ring cho h mt khu vc Ƕc lp ring bit (atonomic system). Mi khu vc Ƕc lp ny ܮc cu to bi nhiu mt lܧi ph o nhn vin iu hnh mng lܧi chia ra v b tr. Nh vy chng ta c th hiu l H Thng Mng Lܧi Truyn Tin Ton Cu phn ln l do cc khu vc Ƕc lp hp chung li. Mi khu vc Ƕc lp ny s ܮc mang mt ci tn khu vc (domain name) khc nha Thng thܩng c dng bbb.ccc nh th d trn. Vi th d ca tn khu vc l

    IBM.COM  (hng IBM)
    AOL.COM  (hng American Online -
              cung cp dch v Internet)
    UCDAVIS.EDU  (Trܩng i Hc UCDDavis ti California)
Khi ngܩi s dng mun lin lc vi mt my vi tnh khc th ngܩi s dng phi ghi r a ch bng tn. Nh th d ftp trn khi ngܩi no mun ftp ti haydn.stanford.edu th ngܩi phi ghi r nh sau
ftp haydn.stanford.edu
Nhng c mt iu tin li l nu my vi tnh m mnh mun lin lc c cng Tn Khu Vc vi my ngܩi s dng th ngܩi s dng khng cn phi ghi ht a ch bng tn. Th d nh cc hc sinh hc ti trܩng Stanford University NJu nm trong tn khu vc l stanford.ed Vy ngܩi hc sinh ch cn ghi xung nh sau
ftp haydn
my vi tnh s t Ƕng b v thm tn khu vc Nj hon thnh a ch bng tn haydn.stanford.ed

Khi mc ni mt my vi tnh vo mt mt lܧi th Tn Khu Vc l mt trong nhng ǻ kin cn phi b vo ( fill in) trong ma'y vi tnh. D kin ny s ܮc nhn vin iu hnh mng lܧi cung cp.

III - Trm Chuyn Danh (Name Server)

Mi mt khu vc Ƕc lp trong Mng Lܧi Truyn Tin Ton Cu NJu c t nht l mt Trm Chuyn Danh. Trm ny mc ch chnh l Nj chuyn cc a ch bng tn ca mt my vi tnh sang a ch IP ca my . Cc nhn vin iu hnh mng lܧi NJu nm r a ch bng tn cng nh a ch IP ca tt c cc my vi tnh thuc khu vc Ƕc lp ca mnh. Tt c cc d kin NJu ܮc b vo Trm Chuyn Danh. Khi mt my vi tnh ܮc b tr vo trong mt mt lܧi th a ch IP ca Trm Chuyn Danh l mt trong nhng d kin cn thit ܮc ghi ch vo trong my vi tnh Nj my vi tnh c th lin lc vi Trm Chuyn Danh.

1) Trܩng Hp Cng Khu Vc (Same domain name)

Th d nh c hai my vi tnh A v B NJu nm trong khu vc Ƕc lp ucdavis.edu nh vy a ch bng tn ca hai my s l ucdavis.edu v B.ucdavis.ed Khi my A mun ftp ti my B th ngܩi s dng ti A s ra mnh lnh

ftp B
My vi tnh A s thm phn Khu Vc Tn vo to thnh mt a ch bng tn B.ucdavis.ed My A sau s gi mt ti tn hiu ti Trm Chuyn Danh trong khu vc ucddavis (Ch : My A bit a ch IP ca Trm Chuyn Danh). Trong ti tn hiu ny c mang theo a ch IP ca my A, a ch bng tn ca my B v hiu lnh yu cu Trm Chuyn Danh ǰi chuyn a ch. Khi nhn ܮc tn hiu ny th Trm Chuyn Danh s tm kim trong khu ti liu (database) Nj tm a ch IP ca my B. Nu tm ra ܮc th Trm Chuyn Danh s gi ti tn hiu tr v my A trong c km theo a ch IP ca B. Khi A nhn ܮc a ch IP ca B th A s bt u gi nhng ti tn hiu lin lc vi B. Trܩng hp Trm Chuyn Danh tm khng ra a ch IP ca my B th trm ny s thng bo cho A bit my B khng c trong khu vc Ƕc lp ny. Nh vy chng trnh ftp s khng th lin lc ܮc vi my B v n s thng bo cho ngܩi s dng bit v chuyn ny.

2) Trܩng Hp Khc Khu Vc (Different domain name)

Theo nh vi ngܩi lm tܪng l Trm Chuyn Danh trong khu vc ca h c cha mt kho ti liu khng l trong c ghi ch mi a ch bng tn ca tt c my vi tnh trong Mng Lܧi Truyn Tin Ton Cu. iu ny hon ton khng ng. Trong thc t, Trm Chuyn Danh trong mi khu vc ch bit v cc my nm trong khu vc m th

Nhng nu nh vy th lm sao mt my vi tnh c th bit ܮc a ch IP ca mt my khc nm ngoi khu vc ca n? Tht ra, Trm Chuyn Danh ngoi s cha ǿng a ch IP ca cc my trong khu vc cn cha thm a ch IP ca t nht mt trm Chuyn Danh Gc (root server). Trm Chuyn Danh Gc ny s cho cc Trm Chuyn Danh bit ܮc a ch IP ca cc Trm Chuyn Danh ca nhng khu vc khc. Th d nh my A (ucdavis.edu) mun ftp ti haydn.stanford.ed Chng ta thy rng haydn.stanford.edu nm ngoi khu vc ca ucdavis.ed Cho nn khi my-A gi ti tn hiu ljn Nj hi a ch IP ca haydn.stanford.edu th Trm Chuyn Danh ucdavis.edu s lin lc vi Trm gc Nj xin a ch IP ca Trm Chuyn Danh khu vc stanford.ed Sau trm Chuyn Danh ucdavis s lin lc trc tip vi trm Chuyn Danh stanford.edu Nj hi a ch IP ca haydn stanford.ed Khi Trm Chuyn Danh khu vc ucdavis.edu nhn ܮc ti tn hiu tr li t trm Chuyn Danh ti stanford.edu cho bit a ch IP ca haydn.stanford.edu th n s chuyn ti tn hiu ny ti my  Nh vy my vi tnh A bit ܮc a ch IP ca my haydn.stanford.edu v A s bt u lin lc trc tip vi my vi tnh . Nhng bܧc tin hnh k trn din ra rt nhanh v ngܩi s dng khng hay bit g. (Ch : nu ngܩi s dng bit trܧc ܮc a ch IP ca haydn.stanford.edu th ch cn ra mnh lnh

ftp 36.22.0.47
m khng cn dng ti Trm Chuyn Danh).

Trm Chuyn Danh gip ch rt nhiu cho ngܩi s dng trong vic lin lc hng ngy bng my vi tnh. Vic s dng my Chuyn Danh l mt nhu cu hu nh cn phi c ca cc my vi tnh trn cc mng lܧi. Nhng khi my Chuyn Danh b trc trc hay b tr ngi g khng phc v ܮc th gy ra nhiu tr hon v tn thi gian trong cng vic.

Mt iu tin li khc m mi ngܩi nn bit l mc du a ch IP bng tn to s d dng cho ngܩi s dng my vi tnh. Nhng vn c nhiu a ch IP bng tn rt di dng v kh nh. Ty thuc H Thng iu Khin trn my vi tnh ca ngܩi s dng vn c cch gii quyt mt cch d dng bng cch ǥt nhng tn ngn cho nhng tn di ny.


Phn 5: My Ni Cu (Bridges)

I- My Ni Cu (Bridge)

Trong Mng Lܧi Truyn Tin Ton Cu c nhiu mt lܧi cha ǿng rt nhiu my vi tnh. Ly mt th d in hnh nh c mt mt lܧi a ch ca mt lܧi l 150.5.16.0 vi a ch ph l 255.255.248.0. Nh vy y l mt mc lܧi ph (subnetwork) thuc lp B c kh nng cha hn 1500 my vi tnh. Trong thc t nu phi mc ni hng trm hng ngn my vi tnh vo chung mt mc lܧi nh vy. S kh khn ny l do cc my vi tnh nm nhiu ni khc nha Nh vy vic cn thit l phi mc ni hng trm my vi tnh li vi nhau sao cho cc my ny d mc ni vo nhng on lܧi (segment) khc nhau nhng vn c cng a ch ca mt lܧi. Nhim v ca my Ni Cu l Nj gii quyt vn NJ ny.

Nhim v ca my Ni Cu l chuyn gi nhng ti tn hiu t mt on lܧi ny sang mt on lܧi khc v ngܮc li. Th d nh hnh v dܧi y:

  -------------------------------------------
  |   S1               S2             S3    |
  | _________|-----|_________|-----|________|__|-----|
  | C1 C2... |-----| D1 D2.. |-----| E1 E2..|  |-----|
  |             A               B           |     F
  |_________________________________________|
                  150.5.16.0

Theo nh hnh v trn cho thy c 2 my Ni Cu A v B dng Nj lin kt 3 on lܧi S1, S2 v S3. Cc my vi tnh C1, C2 ... ܮc mc ni vo on lܧi S1. Cc my vi tnh D1, D2 ... mc ni vo on lܧi S2. V tng t nh vy cho cc my E1, E2 ... mc ni vo on lܧi S3. Sau cng l on lܧi S3 c s hin din ca my Chuyn Tip F.

Khi cc my vi tnh on lܧi S1 mun lin lc vi cc my on lܧi S2 th my Ni Cu A s chuyn cc ti tn hiu t on lܧi S1 sang on lܧi S2. Tng t nh vy my Ni Cu A v my Ni Cu B s chuye^?n cc ti tn hiu gia cc on lܧi S1, S2 v S3 khi cc my vi tnh cc on lܧi lin lc vi nha Tht ra nhng ngܩi s dng cc my vi tnh Cx, Dx v Ex c cm tܪng l tt c cc my ny NJu ܮc mc Ni vo chung mt ch.

iu quan trng cn phi ch l tt c cc my vi tnh Cx, Dx, v Ex NJu c cng chung a ch mt lܧi nh th d trn s l 150.5.16. Nhng my vi tnh nm cc mt lܧi khc NJu coi cc my Cx, Dx, v Ex nm chung mt mc lܧi 150.5.16. S vic cc my Cx, Dx, Ex nm nhng on lܧi khc nhau trong mc lܧi 150.10.16 hon ton khng c g khc bit trong vic truyn nhng ti tn hiu cho nhau trong cc mng lܧi.

ng nhm ln gia my Ni Cu v my Lp Li (Repeater). My Lp Li l my lp li nhng tn hiu in t t ni ny qua ni khc trong lc my Ni Cu chuyn tip nhng ti tn hiu t ni ny qua ni ki Cc my lp li khng cn kim sot cc tn hiu cho d l tn hiu b nhiu x. My Ni Cu trܧc khi chuyn tip ti tn hiu s kim sot cc d kin cn thit nm phn u ca ti tn hiu. Nu c s sai tri trong cc d kin ny th my Ni Cu s loi b ti tn hiu ch khng chuyn

Trong thc t c nhiu my Ni Cu c nhiu ǥc tnh tin li hn. C my Ni Cu c kh nng ni nhng on lܧi m mi trܩng truyn tin khc nha Nh th d ca hnh v trn th S1 c th l FDDI, S2 c th l Ethernet v S3 c th l Token-Ring. Ngoi ra c my Ni Cu c th ni tip cc on lܧi cng l mi trܩng truyn tin nhng li c vn tc truyn tin khc nha Th d nh S1 c th l TR (Token-Ring) vi vn tc 4 MB, S2 l TR vi vn tc l 16 MB, sau cng l S3 l TR vi vn tc l 4 MB.

Mt tin li khc ca vic dng my Ni Cu l nh vo cc my Ni Cu phn chia mt mc lܧi ra lm nhiu on lܧi lm gim thiu s bn rn ca nguyn mt mc lܧi. Th d nh trong on lܧi S1, hai my vi tnh C1 v C2 ang chuyn gi cc bi ti liu cho nhau do c rt nhiu ti tn hiu qua li gia hai my ny. Nhng s vic ny ch nh hܪng cc my vi tnh trong on lܧi S1 m thi, cc my vi tnh nm trong on lܧi S2 v S3 s khng hay bit g. Do s truyn tin trong on lܧi S2 v S3 khng b chm tr hoc gin on v bi cc ti tn hiu trong on lܧi S1.


Phn 6: My Chuyn Tip (Routers)

I- Khi nim v My Chuyn Tip

Mng Lܧi Truyn Tin Ton Cu l do s tng hp ca cc mt lܧi. Tt c cc mt lܧi ny nm ri rc khp mi ni v cn phi lin kt li Nj cc cc my vi tnh c th lin lc vi nhau bng cch gi cc ti tn hiu t mt mc lܧi ny sang mt mc lܧi khc v ngܮc li. Vai tr ca cc my Chuyn Tip l lin kt tt c cc mt lܧi ny li vi nha My Chuyn Tip s tnh ton, hc hi, v ghi nh cc a ch ca cc mt lܧi Nj chuyn cc ti tn hiu ti ng v tr ca mt lܧi trn Mng Lܧi Truyn Tin Ton Cu. Th d sau y ܮc nhiu sch bo s dng trong vic gip ngܩi džc c khi nim v cc my Chuyn Tip.

Th d nh c mt ngܩi hnh khch ang ti cn nh s 111 trn con ܩng X ti Si Gn mun i ti mt a im ti Th X Lt. Ngܩi hnh khch ny ch bit a ch m ngܩi mun ti l cn nh s 222 trn ܩng Y Th X Lt v hon ton khng bit phi i sao cho ti a im ny. Theo cch thc ca Mng Lܧi Truyn Tin Ton Cu th ngܩi hnh khch c th ti ng a im nh s trnh by sau

Bt u ti cn nh s 111 ti ܩng X ngܩi hnh khch i ra ti ng ba ca ܩng X (ch : c th l ng t, ng nm, ng su v.v. nhng cho n gin ch c ng ba ܮc s dng). Ti ng ba ny c mt trm hܧng dn cc hnh khch vi cc bng ch dn ܩng Bng ch dn ghi r " Lt, Lm ng: quo phi. Tt c cc ni khc quo tri." Theo li ch dn ca bng ny ngܩi hnh khch quo phi v tip tc hnh trnh cho ti khi ngܩi hnh khc gp mt ng ba khc. Bng ch dn ti ng ba ny ghi r "Bin Ha, Long Khnh: quo phi, tt c nhng ni khc quo tri", ngܩi khch quo tri v tip tc hnh trnh cho ti khi gp mt ng ba khc v theo s ch dn ti ni . Ngܩi hnh khch s tip tc cuc hnh trnh hon ton da v li ch dn ti mi chng ܩng cho ti khi ti mt ng ba c li ch dn " Lt: quo phi, tt c nhng ni khc quo tri". Ngܩi hnh khch quo phi v i tip cho ti khi gp mt ng ba vi li ch dn "y l Th X Lt. ܩng A, B, C: quo phi, nhng ܩng khc quo tri." Ngܩi hnh khch quo tri v li theo nhng li ch dn tng t ti cc trm trong Th X Lt cho ti khi ngܩi hnh khc gp bng ch dn "ܩng Y: quo phi, nhng ܩng khc: quo tri." Ngܩi hnh khch quo phi v nh vy ngܩi hnh khch ang trn con ܩng Y ti Th X Lt. Ngܩi hnh khch ch vic i ti cn nh s 222 trn con ܩng Y l hon tt cuc hnh trnh.

Th d n gin phn trn cho thy mt khi nim v cch thc hot Ƕng ca cc my Chuyn Tip. Ngܩi džc s c mt khi nim r rng hn nu chng ta thay th ngܩi hnh khch l ti tn hiu, cc trm ch dn ti cc ng ba ܩng l cc my Chuyn Tip, bng ch dn l Bng Tuyn ܩng (routing table) ca my Chuyn Tip, v cc ܩng i l cc mt lܧi.

II- S hot Ƕng ca my Chuyn Tip

Nhim v ca my Chuyn Tip i khi nh sau:

  1. Nhn nhng ti tn hiu t mt mc lܧi.

  2. Xem xt a ch mt lܧi ca ni m ti tn hiu ny mun ti (destination address).

  3. Nu a ch mt lܧi ca ni mun ti trng vi mt trong nhng a ch mc lܧi m my Chuyn Tip ang mc ni vo (direct attach) th my Chuyn Tip s cn c tip v phn a ch ca my (host portion of the destination address) v s chuyn ti tn hiu ti ng my vi tnh trn mc lܧi .

  4. Nu a ch mt lܧi ca ni mun ti khng trng vi nhng mc lܧi m my Chuyn Tip mc ni vo th my Chuyn Tip s cn c vo Bng Tuyn ܩng Nj chuyn tip ti tn hiu sang mt my Chuyn Tip khc nm trong mt mc lܧi khc.

Nhng nhim v trn y s d hiu hn vi hnh v v th d dܧi y:

 L1      ----- L2     ----- L3     -----   L4
 --------| A |--------| B |--------| C |-------------
   |     -----   |    -----   |    -----        |
  VT1           VT2     |    VT3     |         VT4
                        |            |
                      L5|---VT5      |
                        |            |
                      -----  L6      |
                      | D |----------|
                      -----     |
                               VT6

Nh hnh v trn cho thy:

* C 4 my Chuyn Tip A, B, C v D.
* C 6 mt lܧi L1, L2, L3, L4, L5 v L6.
* C 6 my vi tnh VT1, VT2, VT3, VT4, VT5 v VT6.
* My A mc ni vo mt lܧi L1 v L2
* My B mc ni vo mt lܧi L2, L3 v L5
* My A mc ni vo mt lܧi L3, L4 v L6
* My A mc ni vo mt lܧi L5 v L6

Th d 1: My VT1 gi ti tn hiu ti my VT2

Din Tin:

- My VT1 s gi ti tn hiu ti my Chuyn Tip 

- My A pht gic rng my VT2 ܮc mc ni trc tip cng chung mt lܧi L2 vi chnh n, do my A s chuyn ti tn hiu ti my VT2.

Th d 2: My VT1 gi ti tn hiu ti my VT3.

Din Tin:

- My VT1 s gi ti tn hiu ti my Chuyn Tip 

- My A pht gic rng a ch mt lܧi ca my VT3 (L3) khng trng vi nhng mc lܧi m my A mc ni vo (L1 v L2), do my A phi tm kim L3 trong Bng Tuyn ܩng. Trong Bng Tuyn ܩng cho bit L3 thuc v my Chuyn Tip B.

- My A s chuyn ti tn hiu ljn my B qua mc lܧi L2.

- Khi my B nhn ܮc ti tn hiu v s chuyn ti tn hiu ljn my VT3.

- Tng t nh th d 2, my A chuyn ljn B, my B chuyn ljn my C, v sau cng my C chuyn ljn cho my VT4.

Th d 3: My VT1 gi ti tn hiu ljn my VT4.

Din Tin:

- Tng t nh th d 2, my A chuyn ljn B qua mt lܧi L2, my B chuyn ljn my C qua mt lܧi L3, v sau cng my C chuyn ljn cho my VT4 mt lܧi L4.

Th d 4: My VT1 gi ti tn hiu ljn my VT4 nhng mc lܧi L3 b trc trc.

Din Tin:

- My VT1 gi ti tn hiu ljn cho my  My A chuyn ti tn hiu ljn cho my B. V mc lܧi L3 b trc trc cho nn my B khng th no lin lc vi My C ܮc do my B s chuyn ti tn hiu ljn cho my D qua mt lܧi L5. My D s chuyn ti tn hiu ljn cho my C qua mt lܧi L6. My C s chuyn ti tn hiu ljn cho my VT4.

III- S Thnh lp Bng Tuyn ܩng

Cc th d ca phn II cho thy cch thc hot Ƕng ca cc my Chuyn Tip Nj chuyn gi cc ti tn hiu t mt my vi tnh ti mc lܧi ny ljn mt my vi tnh ti mt mc lܧi khc mt cch chnh xc. Mt iu quan trng cn phi thy l my Chuyn Tip NJu nh vo Bng Tuyn ܩng Nj quyt nh s chuyn ti tn hiu v Nh vo Bng Tuyn ܩng ny m cc ti tn hiu ܮc chuyn i theo mt l trnh (path) ngn nht. Cng nh v Bng Tuyn ܩng ny m mi khi c nhng mc lܧi b trc trc hoc h hng th cc my Chuyn Tip s chuyn cc ti tn hiu theo mt l trnh khc. Nh vy thi gian gin on s ܮc hn ch ljn mc ti iu ny ܮc th hin qua th d 4 trn.

Vic thnh lp v b tc Bng Tuyn ܩng l mt trong nhng quan trng hng u ca cc my Chuyn Tip. thnh lp Bng Tuyn ܩng cc my Chuyn Tip s gi cho nhau (advertisement) nhng tin tc cn thit v nhng mc lܧi m n mc ni vo v nhng a ch mc lܧi m n bit ܮc t nhng my khc. Cn c vo nhng tin tc ny, my Chuyn Tip s tnh ton cc tuyn ܩng ngn nht Nj i ti nhng mc lܧi khc. My my Chuyn Tip sau s b nhng tuyn ܩng ny v trong Bng Tuyn ܩng Nj dng trong vic chuyn tip cc ti tn hiu.

C nhiu Nghi Thc ܮc ǥt ra Nj qui nh cch thc cc my Chuyn Tip gi cho nhau tin tc v cc tuyn ܩng cng nh cch thc tnh ton cc tuyn ܩng Nhng Nghi Thc thng dng nht hin nay l RIP (Routing Information Protocol - Nghi Thc Tin Tc Cc Tuyn ܩng), OSPF (Open Shortest Path First - Nghi Thc Tm L Trnh Ngn Nht), BGP (Border Gateway Prototol), EGP (Exterior Gateway Protocol) v.v.

iu cn bit l nhng nghi thc nh RIP v OSPF ܮc cc my Chuyn Tip dng Nj tm nhng tuyn ܩng trong phm vi ca mt khu vc Ƕc lp (autonomous system). Cn cc nghi thc nh BGP v EGP ܮc cc my Chuyn Tip dng Nj trao ǰi tin tc v cc tuyn ܩng gia cc khu vc Ƕc lp.

Phuong Thanh Nguyen
Network Routing Systems
Networking Systems
IBM, Research Triangle Park
E-Mail: pnguyen@vnet.ibm.com


Ti Liu Tham Kho:

*Internetworking with TCP/IP Vol.I by Douglas  Comer
*RFC-1180
*RFC-791
*Using The Internet - Que


T ng tm dch:

Communication adaptor card: bng truyn tin
Byte: nguyn hiu = 8 n hiu
Bit: n hiu
Network: mt lܧi
Frame: khung
Packet: ti
Internet Address: a ch IP
Unicast: n pht
Multicast: a pht
Broadcast: Tng Pht
Network: Mt lܧi
Subnetwork: Mt lܧi ph
Mask Address: a ch ph
Name Server: My Chuyn Danh
Bridge: my Ni Cu
Router: my Chuyn Tip
Segment: on lܧi
Routing Table: Bng Tuyn ܩng
Path: L Trnh