You are on page 1of 45


SOLUTIONS TO CHAPTER 1 PROBLEMS 1. The dog can carry 21 gigabytes, or 16 gigabits! " s#eed o$ 1 %&'ho(r e)(a*s +!++, %&'sec! The ti&e to tra-e* distance x %& is x '+!++, =2+0x sec, yie*ding a data rate o$ 168/ 2+0x .b#s or /0/x Mb#s! 0or x 1,!6 %&, the dog has a higher rate than the co&&(nication *ine! 2. The L"N &ode* can be gro2n incre&enta**y! I$ the L"N is 3(st a *ong cab*e! it cannot be bro(ght do2n by a sing*e $ai*(re 4i$ the ser-ers are re#*icated5 It is #robab*y chea#er! It #ro-ides &ore co&#(ting #o2er and better interacti-e inter$aces! 3. " transcontinenta* $iber *in% &ight ha-e &any gigabits'sec o$ band2idth, b(t the *atency 2i** a*so be high d(e to the s#eed o$ *ight #ro#agation o-er tho(sands o$ %i*o&eters! In contrast, a ,66%b#s &ode& ca**ing a co&#(ter in the sa&e b(i*ding has *o2 band2idth and *o2 *atency! 4. " (ni$or& de*i-ery ti&e is needed $or -oice, so the a&o(nt o$ 3itter in the net62or% is i&#ortant! This co(*d be e7#ressed as the standard de-iation o$ the de*i-ery ti&e! 8a-ing short de*ay b(t *arge -ariabi*ity is act(a**y 2orse than a so&e2hat *onger de*ay and *o2 -ariabi*ity! 5. No! The s#eed o$ #ro#agation is 2++,+++ %&'sec or 2++ &eters'9sec! In 1+ 9sec the signa* tra-e*s 2 %&! Th(s, each s2itch adds the e)(i-a*ent o$ 2 %& o$ e7tra cab*e! I$ the c*ient and ser-er are se#arated by ,+++ %&, tra-ersing e-en ,+ s2itches adds on*y 1++ %& to the tota* #ath, 2hich is on*y 2:! Th(s, s2itching de*ay is not a &a3or $actor (nder these circ(&stances! 6. The re)(est has to go (# and do2n, and the res#onse has to go (# and do2n! The tota* #ath *ength tra-ersed is th(s 16+,+++ %&! The s#eed o$ *ight in air and -ac((& is ;++,+++ %&'sec, so the #ro#agation de*ay a*one is 16+,+++';++,+++ sec or abo(t ,;; &sec! 7. There is ob-io(s*y no sing*e correct ans2er here, b(t the $o**o2ing #oints see& re*e-ant! The #resent syste& has a great dea* o$ inertia 4chec%s and ba*6ances5 b(i*t into it! This inertia &ay ser-e to %ee# the *ega*, econo&ic, and socia* syste&s $ro& being t(rned (#side do2n e-ery ti&e a di$$erent #arty co&es to #o2er! "*so, &any #eo#*e ho*d strong o#inions on contro-ersia* socia* iss(es, 2itho(t rea**y %no2ing the $acts o$ the &atter! "**o2ing #oor*y reasoned o#inions be to 2ritten into *a2 &ay be (ndesirab*e! The #otentia* e$$ects o$ ad-ertising ca&#aigns by s#ecia* interest gro(#s o$ one %ind or another a*so ha-e to be considered! "nother &a3or iss(e is sec(rity! " *ot o$ #eo#*e &ight 2orry abo(t so&e 1/6year %id hac%ing the syste& and $a*si$ying the res(*ts!



8. <a** the ro(ters ", B, <, =, and E. There are ten #otentia* *ines> AB, A<, A=, AE, B<, B=, BE, C=, CE, and DE! Each o$ these has $o(r #ossibi*ities 4three s#eeds or no *ine5, so the tota* n(&ber o$ to#o*ogies is / 1+ =1,+/ ,,?6. "t 1++ &s each, it ta%es 1+/, ,?!6 sec, or s*ight*y &ore than 2@ ho(rs to ins#ect the& a**!

9. The &ean ro(ter6ro(ter #ath is t2ice the &ean ro(ter6root #ath! N(&ber the *e-e*s o$ the tree 2ith the root as 1 and the dee#est *e-e* as n. The #ath $ro& the root to *e-e* n re)(ires n −1 ho#s, and +!,+ o$ the ro(ters are at this *e-e*! The #ath $ro& the root to *e-e* n −1 has +!2, o$ the ro(ters and a *ength o$ n −2 ho#s! 8ence, the &ean #ath *ength, *, is gi-en by l =+!, ×(n −15 ++!2, ×(n −25 ++!12, ×(n −;5 +!!! or l=
i =1 8


n 4+!,5i −
i =1 8

i 4+!,5i This e7#ression red(ces to l =n −2. The &ean ro(ter6ro(ter #ath is th(s 2n −4. 10. =isting(ish n +2 e-ents! E-ents 1 thro(gh n consist o$ the corres#onding host s(ccess$(**y atte&#ting to (se the channe*, i!e!, 2itho(t a co**ision! The #robabi*ity o$ each o$ these e-ents is #41 −#5n −1 . E-ent n +1 is an id*e channe*, 2ith #robabi*ity 41 −#5n . E-ent n +2 is a co**ision! Since these n +2 e-ents are e7ha(sti-e, their #robabi*ities &(st s(& to (nity! The #roba6 bi*ity o$ a co**ision, 2hich is e)(a* to the $raction o$ s*ots 2asted, is then 3(st 1 −n#41 −#5n −1 −41 −#5n . 11. "&ong other reasons $or (sing *ayered #rotoco*s, (sing the& *eads to brea%6ing (# the design #rob*e& into s&a**er, &ore &anageab*e #ieces, and *ayering &eans that #rotoco*s can be changed 2itho(t a$$ecting higher or *o2er ones, 12. No! In the ISO #rotoco* &ode*, #hysica* co&&(nication ta%es #*ace on*y in the *o2est *ayer, not in e-ery *ayer! 13. <onnection6oriented co&&(nication has three #hases! In the estab*ish&ent #hase a re)(est is &ade to set (# a connection! On*y a$ter this #hase has been s(ccess$(**y co&#*eted can the data trans$er #hase be started and data trans6#orted! Then co&es the re*ease #hase! <onnection*ess co&&(nication does not ha-e these #hases! It 3(st sends the data! 14. Message and byte strea&s are di$$erent! In a &essage strea&, the net2or% %ee#s trac% o$ &essage bo(ndaries! In a byte strea&, it does not! 0or e7a&6 #*e, s(##ose a #rocess 2rites 1+2/ bytes to a connection and then a *itt*e *ater 2rites another 1+2/ bytes! The recei-er then does a read $or 2+/ bytes! Aith a &essage strea&, the recei-er 2i** get t2o &essages, o$ 1+2/ bytes


each! Aith a byte strea&, the &essage bo(ndaries do not co(nt and the recei-er 2i** get the $(** 2+/ bytes as a sing*e (nit! The $act that there 2ere origina**y t2o distinct &essages is *ost! 15. Negotiation has to do 2ith getting both sides to agree on so&e #ara&eters or -a*(es to be (sed d(ring the co&&(nication! Ma7i&(& #ac%et siBe is one e7a&#*e, b(t there are &any others! 16. The ser-ice sho2n is the ser-ice o$$ered by *ayer k to *ayer k +1! "nother ser-ice that &(st be #resent is be*o2 *ayer %, na&e*y, the ser-ice o$$ered to *ayer k by the (nder*ying *ayer k −1! 17. The #robabi*ity, P k , o$ a $ra&e re)(iring e7act*y k trans&issions is the #roba6bi*ity o$ the $irst k −1 atte&#ts $ai*ing, p k −1 , ti&es the #robabi*ity o$ the %6th trans&ission s(cceeding, 41 −#). The &ean n(&ber o$ trans&ission is then 3(st
k =1 8


kP k =
k =1 8

%41 −#5p k −1 =1 −p 1 33333 18. 4a5 =ata *in% *ayer! 4b5 Net2or% *ayer! 19. 0ra&es enca#s(*ate #ac%ets! Ahen a #ac%et arri-es at the data *in% *ayer, the entire thing, header, data, and a**, is (sed as the data $ie*d o$ a $ra&e! The entire #ac%et is #(t in an en-e*o#e 4the $ra&e5, so to s#ea% 4ass(&ing it $its5! 20. Aith n *ayers and h bytes added #er *ayer, the tota* n(&ber o$ header bytes #er &essage is hn, so the s#ace 2asted on headers is hn! The tota* &essage siBe is M +nh, so the $raction o$ band2idth 2asted on headers is hn / (M +hn5! 21. Both &ode*s are based on *ayered #rotoco*s! Both ha-e a net2or%, trans#ort, and a##*ication *ayer! In both &ode*s, the trans#ort ser-ice can #ro-ide a re*iab*e end6to6end byte strea&! On the other hand, they di$$er in se-era* 2ays! The n(&ber o$ *ayers is di$$erent, the T<P'IP does not ha-e session or #resentation *ayers, OSI does not s(##ort internet2or%ing, and OSI has both connection6oriented and connection*ess ser-ice in the net2or% *ayer! 22. T<P is connection oriented, 2hereas U=P is a connection*ess ser-ice! 23. The t2o nodes in the (##er6rPROBLEM SOLUTIONS 0OR <8"PTER 1 3 each! Aith a byte strea&, the &essage bo(ndaries do not co(nt and the recei-er 2i** get the $(** 2+/ bytes as a sing*e (nit! The $act that there 2ere origina**y t2o distinct &essages is *ost! 15. Negotiation has to do 2ith getting both sides to agree on so&e #ara&eters or -a*(es to be (sed d(ring the co&&(nication! Ma7i&(& #ac%et siBe is one e7a&#*e, b(t there are &any others!

16. The ser-ice sho2n is the ser-ice o$$ered by *ayer k to *ayer k +1! "nother ser-ice that &(st be #resent is be*o2 *ayer %, na&e*y, the ser-ice o$$ered to *ayer k by the (nder*ying *ayer k −1! 17. The #robabi*ity, P k , o$ a $ra&e re)(iring e7act*y k trans&issions is the #roba6bi*ity o$ the $irst k −1 atte&#ts $ai*ing, p k −1 , ti&es the #robabi*ity o$ the %6th trans&ission s(cceeding, 41 −#). The &ean n(&ber o$ trans&ission is then 3(st
k =1 8


kP k =
k =1 8

%41 −#5p k −1 =1 −p 1 33333 18. 4a5 =ata *in% *ayer! 4b5 Net2or% *ayer! 19. 0ra&es enca#s(*ate #ac%ets! Ahen a #ac%et arri-es at the data *in% *ayer, the entire thing, header, data, and a**, is (sed as the data $ie*d o$ a $ra&e! The entire #ac%et is #(t in an en-e*o#e 4the $ra&e5, so to s#ea% 4ass(&ing it $its5! 20. Aith n *ayers and h bytes added #er *ayer, the tota* n(&ber o$ header bytes #er &essage is hn, so the s#ace 2asted on headers is hn! The tota* &essage siBe is M +nh, so the $raction o$ band2idth 2asted on headers is hn / (M +hn5! 21. Both &ode*s are based on *ayered #rotoco*s! Both ha-e a net2or%, trans#ort, and a##*ication *ayer! In both &ode*s, the trans#ort ser-ice can #ro-ide a re*iab*e end6to6end byte strea&! On the other hand, they di$$er in se-era* 2ays! The n(&ber o$ *ayers is di$$erent, the T<P'IP does not ha-e session or #resentation *ayers, OSI does not s(##ort internet2or%ing, and OSI has both connection6oriented and connection*ess ser-ice in the net2or% *ayer! 22. T<P is connection oriented, 2hereas U=P is a connection*ess ser-ice! 23. The t2o nodes in the (##er6right corner can be disconnected $ro& the rest by three bo&bs %noc%ing o(t the three nodes to 2hich they are connected! The syste& can 2ithstand the *oss o$ any t2o nodes! 24. =o(b*ing e-ery 1 &onths &eans a $actor o$ $o(r gain in ; years! In @ years, the gain is then / ; or 6/, *eading to 6!/ bi**ion hosts! My int(ition says that is &(ch too conser-ati-e, since by then #robab*y e-ery te*e-ision in the 2or*d and #ossib*y bi**ions o$ other a##*iances 2i** be on ho&e L"Ns connected toight corner can be disconnected $ro& the rest by three bo&bs %noc%ing o(t the three nodes to 2hich they are connected! The syste& can 2ithstand the *oss o$ any t2o nodes! 24. =o(b*ing e-ery 1 &onths &eans a $actor o$ $o(r gain in ; years! In @ years, the gain is then / ; or 6/, *eading to 6!/ bi**ion hosts! My int(ition says that is

The &ean n(&ber o$ trans&ission is then 3(st k =1 8 3 Σ Σ kP k = k =1 8 %41 −#5p k −1 =1 −p 1 33333 18. The ser-ice sho2n is the ser-ice o$$ered by *ayer k to *ayer k +1! "nother ser-ice that &(st be #resent is be*o2 *ayer %. they di$$er in se-era* 2ays! The n(&ber o$ *ayers is di$$erent. 41 −#). OSI does not s(##ort internet2or%ing. na&e*y. P k . ti&es the #robabi*ity o$ the %6th trans&ission s(cceeding. so the $raction o$ band2idth 2asted on headers is hn / (M +hn5! 21. b(t there are &any others! 16. the trans#ort ser-ice can #ro-ide a re*iab*e end6to6end byte strea&! On the other hand. the &essage bo(ndaries do not co(nt and the recei-er 2i** get the $(** 2+/ bytes as a sing*e (nit! The $act that there 2ere origina**y t2o distinct &essages is *ost! 15. Aith n *ayers and h bytes added #er *ayer. trans#ort. is (sed as the data $ie*d o$ a $ra&e! The entire #ac%et is #(t in an en-e*o#e 4the $ra&e5. 2hereas U=P is a connection*ess ser-ice! 23. the T<P'IP does not ha-e session or #resentation *ayers. T<P is connection oriented. The #robabi*ity. the ser-ice o$$ered to *ayer k by the (nder*ying *ayer k −1! 17. since by then #robab*y e-ery te*e-ision in the 2or*d and #ossib*y bi**ions o$ other a##*iances 2i** be on ho&e L"Ns connected to PROBLEM SOLUTIONS 0OR <8"PTER 1 each! Aith a byte strea&. the entire thing. Negotiation has to do 2ith getting both sides to agree on so&e #ara&eters or -a*(es to be (sed d(ring the co&&(nication! Ma7i&(& #ac%et siBe is one e7a&#*e. the tota* n(&ber o$ header bytes #er &essage is hn. 0ra&es enca#s(*ate #ac%ets! Ahen a #ac%et arri-es at the data *in% *ayer. p k −1 .&(ch too conser-ati-e. and OSI has both connection6oriented and connection*ess ser-ice in the net2or% *ayer! 22. o$ a $ra&e re)(iring e7act*y k trans&issions is the #roba6bi*ity o$ the $irst k −1 atte&#ts $ai*ing. and a**. The t2o nodes in the (##er6right corner can be disconnected $ro& the rest by three bo&bs %noc%ing o(t the three nodes to 2hich they are connected! The syste& can 2ithstand the *oss o$ any t2o nodes! . so to s#ea% 4ass(&ing it $its5! 20. Both &ode*s are based on *ayered #rotoco*s! Both ha-e a net2or%. data. header. 4a5 =ata *in% *ayer! 4b5 Net2or% *ayer! 19. and a##*ication *ayer! In both &ode*s. so the s#ace 2asted on headers is hn! The tota* &essage siBe is M +nh.

+++. e-en i$ ne2 and better techni)(es or &ethods are disco-ered! "*so. they do not b*oc% trans&ission *ines $or -ery *ong. since by then #robab*y e-ery te*e-ision in the 2or*d and #ossib*y bi**ions o$ other a##*iances 2i** be on ho&e L"Ns connected to 4 PROBLEM SOLUTIONS 0OR <8"PTER 1 the Internet! The a-erage #erson in the de-e*o#ed 2or*d &ay ha-e doBens o$ Internet hosts by then! 25. it ta%es +!1 9sec to trans&it a bit! Th(s.+++ bits'sec.@. a bit is 2+ &eters *ong here! 28. years! In @ years. One ad-antage is that i$ e-eryone (ses the standard. &a%ing it easier to #ro-ide )(a*ity6o$6ser-ice g(arantees! 27. Thin% abo(t the hidden ter&ina* #rob*e&! I&agine a 2ire*ess net2or% o$ $i-e stations. it ta%es abo(t +!1 @ sec! 29. and co&6#*ete*y in hard2are! S&a**. S&a**. it &ay be obso*ete! .?!+/2 sec! "t 1.+++ bits'sec. since &ost 2ire*ess de-ices tend to be &obi*e! 31. =o(b*ing e-ery 1 &onths &eans a $actor o$ $o(r gain in ..+++. it ta%es abo(t .+++ bits'sec. or 6/. $i7ed6*ength ce**s can be ro(ted thro(gh s2itches )(ic%*y. The i&age is 1+2/ C?6 C. bytes or 2. so the *ost #ac%ets can be retrans&itted! On the other hand. I$ the net2or% tends to *ose #ac%ets.. by the ti&e it has been acce#ted. s(ch that each one is in range o$ on*y its i&&ediate neighbors! Then A can ta*% to B at the sa&e ti&e D is ta*%ing to E! Aire*ess net2or%s ha-e #otentia* #ara**e*is&. $i7ed6siBe ce**s a*so &a%e it easier to b(i*d hard2are that hand*es &any ce**s in #ara**e*! "*so.+++ bits'sec.2@6 bytes! This is 1 . it is di$$ic(*t to change. *eading to 6!/ bi**ion hosts! My int(ition says that is &(ch too conser-ati-e.+++ %&'sec. A thro(gh E. it ta%es abo(t 1 ! ?/ sec! "t 1+. it is better to ac%no2*edge each one se#arate*y. The s#eed o$ *ight in coa7 is abo(t 2++. sending one ac%no2*edge&ent at the end o$ the entire trans$er sa-es band2idth in the nor&a* case 4b(t re)(ires the entire $i*e to be retrans&itted i$ e-en a sing*e #ac%et is *ost5! 26.+++.6.. One disad-antage is sec(rity! E-ery rando& de*i-ery &an 2ho ha##ens to be in the b(i*ding can *isten in on the net2or%! "nother disad-antage is re*iabi*6 ity! Aire*ess net2or%s &a%e *ots o$ errors! " third #otentia* #rob*e& is bat6tery *i$e. it ta%es abo(t 1! ? sec! "t 1++.. i$ the net2or% is high*y re*iab*e. 2hich is 2++ &eters'9sec! "t 1+ Mb#s. d(ring 2hich it #ro#agates 2+ &eters! Th(s.6 bits! "t . the bit *asts +!1 9sec in ti&e. e-eryone can ta*% to e-eryone! "nother ad-antage is that 2ides#read (se o$ any standard 2i** gi-e it econo&ies o$ sca*e.24. and in this 2ay di$$er $ro& Ethernet! 30. ?/. the gain is then / .. as 2ith DLSI chi#s! " disad-antage is that the #o*itica* co&#ro&ises necessary to achie-e standardiBation $re)(ent*y *ead to #oor standards! "nother disad-antage is that once a standard has been 2ide*y ado#ted.

The Ny)(ist theore& is a #ro#erty o$ &athe&atics and has nothing to do 2ith techno*ogy! It says that i$ yo( ha-e a $(nction 2hose 0o(rier s#ectr(& does not contain any sines or cosines abo-e $. There are &any e7a&#*es.32. dB! 6.+. &a%e +++ sa&#*es'sec! I$ each sa&#*e is 16 bits. Using the Ny)(ist theore&. 2. *a&#s and *ightb(*bs 4di$$erent -o*tages in di$$erent co(ntries5.8B! 8. c =1. #ortab*e te*e6#hones. =2!. 7 11 inches in the U!S!. the channe* can send !2 Mb#s! The %ey 2ord here is FF noise*ess!GG Aith a nor&a* / %8B channe*.++0. *et (s ass(&e 1 b#s #er 8B! 0ro& E)! 426. $or a tota* data rate o$ 2/ Mb#s! 4. the Shannon *i&it is abo(t 1@!@?.+++ . then by sa&#*ing the $(nction at a 5 6 PROBLEM SOLUTIONS 0OR <8"PTER 2 $re)(ency o$ 2! yo( ca#t(re a** the in$or&ation there is! Th(s. etc! SOLUTIONS TO CHAPTER 2 PROBLEMS 1. This yie*ds S /Ν 2 . b n =+.// C1+ 6 2ith =. the channe* can send 12 %b#s! I$ each sa&#*e is 1+2/ bits.. " noise*ess channe* can carry an arbitrari*y *arge a&o(nt o$ in$or&ation. and a(to&ated PROBLEM SOLUTIONS 0OR <8"PTER 1 te**er &achines and ban% cards! "reas 2here s(ch internationa* standardiBa6 tion is *ac%ing inc*(de D<Rs and -ideota#es 4NTS< D8S in the U!S!. n(ts and bo*ts 4Eng*ish -ers(s &etric #itch5.+ −1. o$ co(rse! So&e syste&s $or 2hich there is inter6nationa* standardiBation inc*(de co&#act disc #*ayers and their discs. ca&eras and . gi-ing a &a7i&(& channe* ca#acity o$ 6 %b#s! 5.5 2e get .! =/!/2 C1+ . #hoto6co#iers and #a#er 4 !. %b#s! The Ny)(ist *i&it is 6 %b#s! The bott*enec% is there$ore the Ny)(ist *i&it. =. P"L D8S in #arts o$ E(ro#e. The data rate is / + C6/+ C2/ C6+ b#s. C1+ −6 &icrons! The range o$ 2a-e*engths (sed is -ery short! 9. Aa*%6&an ta#e #*ayers and a(dio cassettes. " signa*6to6noise ratio o$ 2+ dB &eans S/N =1++! Since *og 2 1+1 is abo(t 6!6.=1+ −6 &eters! This gi-es a band2idth ($5 o$ . 2e can sa&#*e 12 &i**ion ti&es'sec! 0o(r6*e-e* signa*s #ro-ide 2 bits #er sa&#*e.&& $i*&. 2hich is //2 Mb#s! 0or si&#*icity. "/ e-ery2here e*se5. no &atter ho2 o$ten it is sa&#*ed! E(st send a *ot o$ data #er sa&#*e! 0or the / %8B channe*. 2 2ith . a n = π n −1 33 3 . =1+ −? &eters and . To send a T1 signa* 2e need 8*og 2 41 +S /N5 =1!.sο .! =χ . 2 . .. / .+. e*ectr6ica* soc%ets and a##*iance #*(gs 4e-ery co(ntry does it di$$erent*y5. the Ny)(ist theore& is tr(e $or a** &edia! . SE<"M D8S in other co(ntries5. the Shannon *i&it 2o(*d not a**o2 this! 3.. " #assi-e star has no e*ectronics! The *ight $ro& one $iber i**(&inates a n(&ber o$ others! "n acti-e re#eater con-erts the o#tica* signa* to an e*ectri6 ca* one $or $(rther #rocessing! 7. 2hich is abo(t @.! /c! Ae ha-e . Use .

$.it is c*ear that to get a constant . it &isses the detector! This a&o(nts to a triang*e 2ith base 1++ & and height +!++1 &! The ang*e is one 2hose tangent is th(s +!++++1! This ang*e is abo(t +!+++. I$ the bea& is o$$ by 1 && at the end. so those *ines are 2asted! 18. Each te*e#hone &a%es +!.. 1 in )(e(eing ter&s5 i&#*ies -ery *ong 2ait ti&es5! Since 1+: o$ the ca**s are *ong distance. &in(tes'ho(r! T2enty te*e#hones can share a circ(it.10./++! This *i&it is not a #rob*e&! 17. In the te7t it 2as stated that the band2idths 4i!e!. the n(&ber o$ end o$$ices 2as *i&ited to 1+2. 2e get . 2hich is 16+! The n(&ber o$ #re$i7es 2as C C1+. .. yo( need! In $act.=. &. the band co-ered is 6+ M8B to .+++ *ines! This gi-es a &a7i&(& o$ 22+ &i**ion te*e#hones! There is si&#*y no #*ace to connect &ore o$ the&! This co(*d ne-er be achie-ed in #ractice beca(se so&e end o$$ices are not $(**! "n end o$$ice in a s&a** to2n in Ayo&ing &ay not ha-e 1+.+ circ(its &(*ti#*e7ed onto it! Aith 2++ te*e#hones #er circ(it.+++ end o$$ices. The sate**ite &o-es $ro& being direct*y o-erhead to2ard the so(thern hor6iBon.. the $re)(ency ranges5 o$ the three bands 2ere a##ro7i&ate*y e)(a*! 0ro& the $or&(*a . 2ith a &a7i&(& e7c(rsion $ro& the -ertica* o$ 2 ! It ta%es 2/ ho(rs to go $ro& direct*y o-erhead to &a7i&(& e7c(rsion and then bac%! 16. C1+ &'s! 0or . s(ch as +++! 8o2e-er. Start 2ith . the 2a-es are . is )(adratic in .+ c& *ong! I$ one 2a-e tra-e*s 1.8B. The cross6section o$ each strand o$ a t2isted #air is π / / s)(are &&! " 1+6%& 7 . there co(*d be 1+ 1+ n(&bers.=1 c&. a*tho(gh ha-ing the *oad be c*ose to 1++: (.+ %& *ong is irre*e-ant! 13.+++. so the higher the $re)(ency.. an end o$$ice can s(##ort 2++ C2. has to be! The 76a7is in the $ig(re is . the higher the $re)(ency. the *arger . 2e get 6+ M8B! Th(s. The n(&ber o$ area codes 2as C2 C1+.+++ c(sto&ers near it.+ . the &ore . Aith a 1+6digit te*e#hone n(&ber. ! =c! Ae %no2 that c is . 2 . ! The $act that the bands are a##ro7i6 &ate*y e)(a* is an accidenta* #ro#erty o$ the %ind o$ si*icon (sed! 11. or 6/+! Th(s.? degrees! 14.8B! 12.+++ te*e#hones! 19. it ta%es 2++ te*e#hones to occ(#y a *ong6distance circ(it $(** ti&e! The intero$$ice tr(n% PROBLEM SOLUTIONS 0OR <8"PTER 2 has 1. ... they 2i** arri-e o(t o$ #hase! The $act that the *in% is .+++'/+++ H 2. c& &ore than the other. e-ery @+ &in(tes 11 sate**ites #ass o-erhead! This &eans there is a transit e-ery /@1 seconds! Th(s. a te*e#hone occ(#ies a circ(it $or . ca**s'ho(r at 6 &in(tes each! Th(s.+ . "t 1 . there 2i** be a hando$$ abo(t e-ery &in(tes and 11 seconds! 15. a &(ch tighter *i&it is gi-en by the n(&ber o$ end o$$ices! There are 22. each 2ith a &a7i&(& o$ 1+. a*tho(gh &any o$ the area codes are i**ega*.8B! 0or . Aith 66'6 or 11 sate**ites #er nec%*ace.+ =.! =χ .+. / .

it is ha*$ d(#*e7! Oi* can $*o2 in either direction. ! Aith a s#eci$ic gra-ity o$ @!+. Li%e a sing*e rai*road trac%.6 %b#s it is ?1/ &sec! 28. There are $o(r *ega* -a*(es #er ba(d.. the data rate is 2/++ b#s! 23.. Traditiona**y. so the bit rate is t2ice the ba(d rate! "t 12++ ba(d.6++ 8B! 8 PROBLEM SOLUTIONS 0OR <8"PTER 2 29. this is the sa&#*ing $re)(ency needed to ca#t(re a** the in$or&ation in a / %8B channe*. b(t the c(to$$ is not shar#!5 30. 9sec corres#onds to +++ sa&#*es #er second! "ccording to the Ny)(ist theore&.6 channe*s in a**. The #hase shi$t is a*2ays +. There are ten /+++ 8B signa*s! Ae need nine g(ard bands to a-oid any inter$erence! The &ini&(& band2idth re)(ired is /+++ C1+ +/++ C@ H /. The end (sers get ? C2/ =16 o$ the 1@. 2ith t2o strands #er #air has a -o*(&e o$ 2 / / C1+ −2 & . so this is straight a&#*it(de &od(*ation! 24. do**ars each. so the encoding is #(re #hase shi$t %ey6 ing! 25. so 2ith I"M66/ 46 bits'ba(d5 2e ha-e 2/. they a** ha-e the sa&e a&#*i6t(de.*ength o$ this &ateria*. &in(s 6 $or POTS and 2 $or contro*. " . *ea-ing 2/ $or data! I$ .6 Mb#s chan6ne* is 1!1 &sec! I$ the )(e(eing de*ay is a*so 1!1 &sec. s(ch as a te*e#hone channe*! 4"ct(a**y the no&ina* band2idth is so&e2hat *ess.'/ o$ these are $or do2nstrea&. b(t t2o a&#*it(des are (sed. the co##er is 2orth abo(t /!2 bi*6 *ion do**ars! 20. bits in a $ra&e! The o-erhead is . so a&#*it(de &od(*ation is not being (sed! 0re)(ency &od(*ation is ne-er (sed in conste**ation diagra&s. one $or (#strea& and one $or do2nstrea&! The &od(*ation sche&e itse*$ 3(st (ses a&#*it(de and #hase! The $re)(ency is not &od(*ated! 26. bits ha-e been sent o-er the *ine 2itho(t any error correcting sche&e in the #hysica* *ayer! The #resence o$ a <PU in each &ode& &a%es it #ossib*e to inc*(de an error correcting code in *ayer 1 to great*y red(ce the e$$ecti-e error rate seen by *ayer 2! The error hand*ing by the &ode&s can be done tota**y trans#arent*y to *ayer 2! Many &ode&s no2 ha-e b(i*t in error correction! 22.?+ c& . " sa&#*ing ti&e o$ 12. ! This -o*(&e is abo(t 1. b(t not both 2ays at once! 21. There are 2. T2o. the tota* ti&e is 2!2 &sec! O-er "=SL there is no )(e(eing de*ay. so the do2n*oad ti&e at 1 Mb#s is /+ &sec! "t . I$ a** the #oints are e)(idistant $ro& the origin. that gi-es 1 6 channe*s $or do2nstrea&! "=SL &od(*ation is at /+++ ba(d.+++ bits! The do2n*oad ti&e o-er a . each *oca* *oo# has a &ass o$ 1/1 %g! The #hone co&#any th(s o2ns 1!/ C1+ @ %g o$ co##er! "t .6JB Aeb #age has /+.+++ b#s in each o$ the 1 6 channe*s! The tota* band2idth is then /!/6/ Mb#s do2nstrea&! 27.

say. #re$erab*y &(ch &ore o$ten! 37. The signa* &(st go $ro& + to A in one )(arter o$ a 2a-eKthat is. 12 C. in a ti&e " '4. " coder acce#ts an arbitrary ana*og signa* and generates a digita* signa* $ro& it! " de&od(*ator acce#ts a &od(*ated sine 2a-e on*y and generates a digita* signa*! 34. t2o bits are sent #er sa&#*e! Aith T1.6 co*(&ns are ta%en (# by *ine and section o-erhead! This *ea-es an SPE o$ 1+// co*(&ns! One SPE co*(&n is ta%en (# by #ath o-erhead. an O<612c $ra&e ho*ds ?.'1@. The O<612c $ra&es are 12 C@+ =1+ + co*(&ns o$ @ ro2s! O$ these. O<61 carriers &(*ti#*e7ed together. ? bits are sent #er #eriod! The res#ecti-e data rates are 16 %b#s and . " dri$t rate o$ 1+ −@ &eans 1 second in 1+ @ seconds or 1 nsec #er second! "t O<61 s#eed. the tota* (ser ca#acity is . H 1. 4a5 6/ %b#s! 4b5 . ste#s &(st $it into the )(arter 2a-e. co*(&ns $or (ser data! Since each co*(&n ho*ds @ bytes o$ bits. Message s2itching sends data (nits that can be arbitrari*y *ong! Pac%et s2itching has a &a7i&(& #ac%et siBe! "ny &essage *onger than that is s#*it (# into &(*ti#*e #ac%ets! PROBLEM SOLUTIONS 0OR <8"PTER 2 40. a-erage case H 2. the (ser ca#acity is 6 C@ =??/ bytes'$ra&e! Aith bits'byte. " L.6 %b#s! 32.2 sa&#*esKthat is. C??/ C C +++. the (ser data rate is 6++!?6 Mb#s! 41. Aith circ(it s2itching. . a-erage case H 1.2 sa&#*es #er $(** 2a-e! The ti&e #er sa&#*e is 1/x so the $(** #eriod &(st be *ong eno(gh to contain . and .2 %b#s! 4c5 %b#s! 35. 2orst case H n/2 $(** interconnect> best case H 1. 2orst case H 2 ring> best case H 1. 2orst case H 1 42.there$ore 2. 6 are a-ai*ab*e $or (ser data in O<61! Th(s.+ Mb#s.+/ Mb#s! It can be (sed to acco&&odate E(ro#ean <EPT61 ser-ice! DT6 can acco&&odate +++ $ra&es'sec C12 co*(&ns C@ ro2s C bits H 6!@12 Mb#s! It can be (sed to acco&&odate =S62 ser-ice! 39.+@6 (ser data bits! Aith +++ $ra&es'sec.2/x or ! &a7 =x '. The three net2or%s ha-e the $o**o2ing #ro#erties> star> best case H 2. In both cases +++ sa&#*es'sec are #ossib*e! Aith dibit encoding. can acco&&odate +++ $ra&es'sec C. =. $or si&#*icity. Ten $ra&es! The #robabi*ity o$ so&e rando& #attern being +1+1+1+1+1 4on a digita* channe*5 is 1'1+2/! 33. O$ the @+ co*(&ns. 36. the c*oc%s &(st be contin(o(s*y synchroniBed to %ee# the& $ro& getting too $ar a#art! <ertain*y e-ery 1+ sec. *ea-ing 1+/. or 1/ !6+ Mb#s! 38. DT1!. In order to trac% the signa*. co*(&ns C@ ro2s C bits H 1!?2 Mb#s! It can be (sed to acco&&odate =S61! DT2 can acco&&odate +++ $ra&es'sec C/ co*(&ns C@ ro2s C bits H 2!.. +++ $ra&es'sec. at # =$ the circ(it is set (#M at # =$ +x /bthe *ast bit 9 .:! 31. a bit *asts $or 2+ nsec! This &eans it ta%es on*y 2+ seconds $or the c*oc% to dri$t o$$ by one bit! <onse)(ent*y.2. a-erage case H n//. or .

so the tota* de*ay is x /β (k −1)p /b +k%. b(t the designers o$ =6"MPS did not ha-e to st($$ three (sers into it! They co(*d ha-e #(t t2o (sers in each channe*. so 2hen a (ser &o-es $ro& one ce** to another. %b#s to . B. the o#erator o$ten did not 2ant to go to the tro(b*e o$ &o-ing the&! Second. 0irst. <. its si7 neighbors can (se B. 0re)(encies cannot be re(sed in ad3acent ce**s. initia* de#*oy&ent si&#*y #*aced ce**s in regions 2here there 2as high density o$ h(&an or -ehic*e #o#(*ation! Once they 2ere there. B.2e$ind p =77777777 hx / (k −15 . so the tota* data N header tra$$ic is (p +h)x /p bits! The so(rce re)(ires (p +h)x /pb sec to trans&it these bits! The retrans&issions o$ the *ast #ac%et by the inter&ediate ro(ters ta%e (# a tota* o$ (k −154p +h5 /b sec! "dding (# the ti&e $or the so(rce to send a** the bits. on*y .+ sentM at # =$ +x /β k% the &essage arri-es! Aith #ac%et s2itching.. a ne2 $re)(ency &(st be a**ocated $or the ca**! I$ a (ser &o-es into a ce**. the (serGs ca** &(st be ter&inated! 48. directiona* antennas are #*aced at a *ocation not at the ce** center! 46. 2e get a tota* ti&e o$ (p +h)x /pb N (p +h54k −1)/b sec! Mini&iBing this )(antity 2ith res#ect to #.+ %8B channe* 2as indeed a re)(ire&ent. b(t 2ith 2+. the *ast bit is sent at # =x /b. the area co-ered by a ce** &ay be irreg(*ar d(e to obs6 tac*es near the trans&itter! Third. each retrans&ission ta%6 ing p /b sec. and C res#ecti-e*y! In other 2ords. 1!2 C1+ & 2 and di-ide it by the area o$ 1 &icroce**. a** o$ 2hose $re)(encies are c(rrent*y in (se. increasing the #ay*oad be$ore error correction $ro& 26+ C. then each ce** has an area o$ 2. Pac%et s2itching is $aster i$ $ L4k −1)p /b. (ni)(e ce**s are needed! <onse)(ent*y. <. Each ce** has si7 neighbors! I$ the centra* ce** (ses $re)(ency gro(# ". 43. each ce** can ha-e 2 + $re)(encies! 45.2?@ &icroce**s! O$ co(rse.+++ &icroce**s 2e co(*d #robab*y do the 3ob! 10 PROBLEM SOLUTIONS 0OR <8"PTER 2 47. 44. it is i&#ossib*e to ti*e the #*ane 2ith circ*es 4and San 0rancisco is decided*y three6di&ensiona*5. #*(s the ti&e $or the ro(ters to carry the *ast #ac%et to the destination. the *ast #ac%et &(st be retrans&itted k −1 ti&es by inter&ediate ro(ters. 2e get 1. I$ 2e ass(&e that each &icroce** is a circ*e 1++ & in dia&eter. It is not ca(sed direct*y by the need $or bac%2ard co&#atibi*ity! The . The tota* n(&ber o$ #ac%ets needed is x /#.+0 ! I$ 2e ta%e the area o$ San 0rancisco. th(s c*earing the #i#e*ine. so&e co&&(nities or #ro#erty o2ners do not a**o2 b(i*ding a to2er at a *ocation 2here the center o$ a ce** $a**s! In s(ch cases. antennas are ty#ica**y #*aced on ta** b(i*dings or &o(ntains! =e#ending on the e7act *oca6 tion o$ s(ch str(ct(res. To get to the $ina* destination.

the )(a*ity *oss 2as an intentiona* trade6o$$ to #(t &ore (sers #er ce** and th(s get a2ay 2ith bigger ce**s! 49. N1 1 −.2 channe*s 4in each direction5 2ith three (sers sharing a sin6g*e channe*! This a**o2s =6"MPS to s(##ort (# to 2/@6 (sers si&(*tane6o(s*y #er ce**! . B sent a + bit. N1 1 −. Ahen t2o e*e&ents &atch.+ J8B C @2 H 26!?6 M8B! . their #rod(ct is −1! To &a%e the s(& +. and C 2as si*ent! 54. Jb#s #er (ser5 o-er =6"MPS 4 Jb#s #er (ser5! 50. %b#s! Th(s. N1 N1 −1 −. M8B in each direction5! =6"MPS (ses .SM to s(##ort (# to @@2 (sers si&(*taneo(s*y! Both syste&s (se abo(t the sa&e a&o(nt o$ s#ectr(& 42. B. =1@!. By de$inition S d T =& 1 333 i =1 & Σ S i" i I$ " sends a + bit instead o$ 1 bit. N1 N15 d (1 N1 1 N1N1N1 1 −15' H + (1 N1 . =6"MPS (ses .SM (ses 12/ channe*s 2ith eight (sers sharing a sing*e channe*! This a**o2s . its chi# se)(ence is negated. their #rod(ct is N1! Ahen they do not &atch. and C and then adding the three chi# se)(ences! "*ternati-e*y the three can be added and then negated! The res(*t is 4N. N1 N15 d (1 −1 −1 N1N1 1 N1 N15' H 1 (1 N1 . Ignoring s#eech co&#ression. N1 N15 d (1 −1 N1 1 N1N1N1 15' H −1 PROBLEM SOLUTIONS 0OR <8"PTER 2 11 (1 N1 . N1 N15 d (1 N1 1 −1 −1 −1 N1 15' H 1 The res(*t is that A and D sent 1 bits.SM (ses 2++ J8B C12/ H 2/! + M8B! The di$$erence can be &ain*y attrib(ted to the better s#eech )(a*ity #ro-ided by . S d T =& 1 333 i =1 & Σ Σ S i (" i 5 =−& 1 333 i =1 & S i " i =+ 52. −1 −1 N15! 51. 2ith the i6th e*e&ent beco&ing −" i ! Th(s. t2o chi# se)(ences are orthogona* i$ e7act*y ha*$ o$ the corres#onding e*e&ents &atch and e7act*y ha*$ do not &atch! 53. The res(*t is obtained by negating each o$ ".SM 41. E(st co&#(te the $o(r nor&a*iBed inner #rod(cts> (1 N1 . N1 1 −. a digita* P<M te*e#hone needs 6/ %b#s! I$ 2e .26+ C?. there &(st be as &any &atches as &is&atches! Th(s. N1 1 −.

6. the cab*e co&#any 2i** need to s#*it (# the e7isting cab*e into 1++ coa7ia* cab*es and connect each o$ the& direct*y to a $iber node! 57. and on each channe* the t2o *ogica* strea&s are inter&i7ed by T=M! This e7a&#*e is the sa&e as the "M radio e7a&#*e gi-en in the te7t..+ ho(ses #er coa7ia* cab*e! Th(s.. S= 1. then the $(** 2? Mb#s &ay be a-ai*ab*e! Us(a**y.6. the (ser inter$ace is near*y a*2ays 1+6Mb#s Ethernet! There is no 2ay to get bits to the co&#(ter any $aster than 1+6Mb#s (nder these circ(&stances! I$ the connection bet2een the P< and cab*e &ode& is $ast Ethernet. (se the 2e**6%no2n $or&(*a $or the s(& o$ an in$inite geo&etric series.+ ho(ses #er cab*e! <(rrent syste&s ha-e h(ndreds o$ ho(ses #er cab*e! 55. The (#strea& band2idth is . " 26Mb#s do2nstrea& band2idth g(arantee to each ho(se i&#*ies at &ost .? M8B! Using IPSJ 2ith 2 bits'8B. No2 (se α=1 −p to get E =1/#! Th(s. the chance o$ the 2ho*e &essage getting thro(gh is +! 1+ . this is 12++ Mb#s! Using I"M62.b#s by 6/ %b#s 2e get 1.di-ide 1+ . it ta%es an a-erage o$ 1'+!1+?. b(t nei6 ther is a $antastic e7a&#*e o$ T=M beca(se the a*ternation is irreg(*ar! 56. 2hich is abo(t +!1+?! <a** this -a*(e #! The e7#ected n(&ber o$ trans&issions $or an entire &essage is then E= i =1 8 Σ Σ i#41 −#5i −1 =p i =1 8 i41 −#5i −1 To red(ce this..2. It is both! Each o$ the 1++ channe*s is assigned its o2n $re)(ency band 40=M5. 1 8 Σ α i =1 −α 1 33333 =i$$erentiate both sides 2ith res#ect to α to get Σ= i =1 8 Σ 2 ια i −1 = 41 −α 5 1 33333333 12 PROBLEM SOLUTIONS 0OR <8"PTER . this is 16++ Mb#s! 58. Since each $ra&e has a chance o$ +! o$ getting thro(gh. or . cab*e o#erators s#eci$y 1+ Mb#s Ethernet beca(se they do not 2ant one (ser s(c%ing (# the entire band2idth! SOLUTIONS TO CHAPTER 3 PROBLEMS 1. 2e get ?/ Mb#s (#strea&! =o2nstrea& 2e ha-e 2++ M8B! Using I"M66/. E-en i$ the do2nstrea& channe* 2or%s at 2? Mb#s.

. 2hich the recei-er sees as end o$ $ra&e! It then *oo%s 3(st be$ore the end o$ the $ra&e $or the chec%s(& and -eri$ies it! I$ the chec%6 s(& is 16 bits. Ma%ing one change to any -a*id character cannot generate another -a*id char6acter d(e to the nat(re o$ #arity bits! Ma%ing t2o changes to e-en bits or t2o changes to odd bits 2i** gi-e another -a*id character. rea*6ti&e syste&s cannot to*erate 2aiting $or retrans&issions! 8. ES< 0L". as in the case o$ a s#ace #robe on or near Mars or Den(s. 2.1 4inc*(ding the #arity bits5 $it! Th(s. the *o2er the #robabi*ity o$ an error getting thro(gh (ndetected. $i-e #arity bits are s($$icient! The bit #attern trans&itted is +11+1+11++11++111+1+1 10. I$ yo( co(*d a*2ays co(nt on an end*ess strea& o$ $ra&es. so the distance is 2! 9. /. I$ the #ro#agation de*ay is -ery *ong. so &essages that do not e7tend beyond bit . It is #ossib*e! S(##ose that the origina* te7t contains the bit se)(ence +111111+ as data! "$ter bit st($$ing. it &ay a*so be si&#*er! 0ina**y. b(t the #robabi*6 ity is ne-er Bero! 7. I$ 2e n(&ber the bits $ro& *e$t to right starting at bit 1. one $*ag byte &ight be eno(gh! B(t 2hat i$ a $ra&e ends 42ith a $*ag byte5 and there are no ne2 $ra&es $or 1. The encoded -a*(e is 1+1++1++1111! PROBLEM SOLUTIONS 0OR <8"PTER . there is 1 chance in 2 16 that it 2i** accidenta**y be correct. "$ter st($$ing. &in(tes! 8o2 2i** the recei-er %no2 that the ne7t byte is act(6 a**y the start o$ a ne2 $ra&e and not 3(st noise on the *ineO The #rotoco* is &(ch si&#*er 2ith starting and ending $*ag bytes! 5.abo(t @!. The so*(tion is 4a5 +++++1++ +1+++111 111+++11 111+++++ +111111+ 4b5 +111111+ +1+++111 111+++11 111+++++ 111+++++ 111+++++ +111111+ +111111+ 4c5 +111111+ +1+++111 11+1+++11 111++++++ +11111+1+ +111111+ 3. Parity bits are needed at #ositions 1. 2e get " B ES< ES< < ES< ES< ES< 0L". bit 2 4a #arity bit5 is incorrect! The 126bit -a*(e trans&itted 4a$ter 8a&&ing encoding5 2as +7"/0! The origina* 6bit data -a*(e 2as +7"0! 13 . this se)(ence 2i** be rendered as +11111+1+! I$ the second + is *ost d(e to a trans&ission error. 2hat is recei-ed is +111111+. in a &i*itary sit(ation in 2hich the recei-er does not 2ant to disc*ose his *ocation by trans&itting! I$ the error rate is *o2 eno(gh that an error6 correcting code is good eno(gh. *eading to an incorrect $ra&e being acce#ted! The *onger the chec%s(&. in this e7a&#*e. =! 4. $or2ard error correction is indicated! It is a*so a##ro#ri6 ate. The o(t#(t is +1111+11111++11111+1+! 6. 11. and 16. trans&issions! 2.

)5! The n(&ber o$ *ega* rectang*es is (k −p −154n −) −15! Then the tota* n(&ber o$ rectang*es can be $o(nd by s(&&ing this $or&(*a $or a** #ossib*e p and )! The #robabi*ity o$ an (ndetected error is then the n(&ber o$ s(ch rectang*es di-ided by the n(&ber o$ 2ays to distrib(te the $o(r bits> n%4nk −154nk −254nk −. the co*(&n #arity 2i** catch the&! Three errors &ight s*i# by (ndetected. The re&ainder is x 2 +x +1. $or e7a&#*e. the ro2 #arity 2i** catch the&! I$ they are in the sa&e ro2. the act(a* bit string trans&itted is 1++111+11++! The recei-ed bit strea& 2ith an error in the third bit $ro& the *e$t is 1+1111+11++! =i-iding this by 1++1 #rod(ces a re&ainder 1++. y5. The $ra&e is 1++111+1! The generator is 1++1! The &essage a$ter a##ending three Beros is 1++111+1+++! The re&ainder on di-iding 1++111+1+++ by 1++1 is 1++! So. e-ery 1 bit is at a coordinate (7. 15. so the n(&ber o$ b*oc%s is n%4nκ 154nκ 254nκ . and each o$ the incorrect bits is a 1! Aith $o(r errors #er b*oc%. E$$iciency 2i** be . nk −1 2ays to choose the second. 2hich is di$$erent $ro& Bero! Th(s.5! Undetected errors on*y occ(r 2hen the $o(r 1 bits are at the -ertices o$ a rectang*e! Using <artesian coordinates. the recei-er detects the error and can as% $or a retrans&ission! 16.+: 2hen the ti&e to trans&it the $ra&e e)(a*s the ro(nd6tri# #ro#agation de*ay! "t a trans&ission rate o$ / bits'&s. The <R< is co&#(ted d(ring trans&ission and a##ended to the o(t#(t strea& as soon as the *ast bit goes o(t onto the 2ire! I$ the <R< 2ere in the header. each b*oc% 2i** ha-e e7act*y $o(r 1s! 8o2 &any s(ch b*oc%s are thereO There are nk 2ays to choose 2here to #(t the $irst 1 bit. 2here + =x '%and + =( 'n! S(##ose that the bit c*osest to the origin 4the *o2er6*e$t -erte75 is at (#. i$ so&e bit is in-erted a*ong 2ith its ro2 and co*(&n #arity bits! E-en the corner bit 2i** not catch this! 13. 16+ bits ta%es /+ &s! 0or $ra&e siBes abo-e 16+ bits.12. =escribe an error #attern as a &atri7 o$ n ro2s by k co*(&ns! Each o$ the correct bits is a +. 17.5 p =+ k −2 ) =+ n −2 Σ Σ (k −p −154n −) −15 333333333333333333333333 14. " sing*e error 2i** ca(se both the horiBonta* and -ertica* #arity chec%s to be 2rong! T2o errors 2i** a*so be easi*y detected! I$ they are in di$$erent ro2s. and so on. it 2o(*d be necessary to &a%e a #ass o-er the $ra&e to co&#(te the <R< be$ore trans&itting! This 2o(*d re)(ire each byte to be hand*ed t2iceKonce $or chec%s(&&ing and once $or trans&itting! Using the trai*er c(ts the 2or% in ha*$! 14 PROBLEM SOLUTIONS 0OR <8"PTER . sto#6and62ait is reasonab*y e$$icient! .

The &odi$ied b. 2hich resynchroniBes! PROBLEM SOLUTIONS 0OR <8"PTER . b(t the recei-er 2o(*d 3(st ignore it! Setting the a(7i*iary ti&er res(*ts in a correct ac%no2*edge&ent being sent bac% e-ent(a**y instead. the sender 2o(*d %ee# ti&ing o(t and ne-er &a%e any #rogress! 24.++ &sec! There$ore. The #rotoco* 2o(*d be incorrect! S(##ose that .. the $irst $ra&e $(**y arri-es 1 !. and N. the correctness 2o(*d not be a$$ected! The N"Js are not essentia*! .6 Mb#s 4e7c*(ding the 1 header bit5. a 6/6byte $ra&e ta%es +!. S l =+ l =S * +1 21. the sender 2o(*d %ee# ti&ing o(t and sending a $ra&e that had a*ready been acce#ted..6!. The re*ations that &(st ho*d are> + =S * −S l +1 =A1 + * −+ l +1 =. 2hich is 1!.% =+. Let the senderGs 2indo2 be (S l . &s.n 2o(*d ret(rn #-*e.ack =?. a** o$ 2hich get *ost! B ti&es o(t and retrans&its its c(rrent $ra&e. the send 2indo2 siBe5 &(st be *arge eno(gh to a**o2 the trans&itter to %ee# trans&itting (nti* the $irst ac%no2*edge&ent has been recei-ed! The #ro#agation ti&e is 1 &s! "t T1 s#eed. 15 23.ack =? arri-es! The %ey -ariab*es are AckExp. this ti&e is .6!. It can ha##en! S(##ose that the sender trans&its a $ra&e and a garb*ed ac%no2*edge&ent co&es bac% )(ic%*y! The &ain *oo# 2i** be e7ec(ted a second ti&e and a $ra&e 2i** be sent 2hi*e the ti&er is sti** r(nning! 20. the se)(ence s#ace 4act(a**y.n% =1. so 2e 2o(*d ha-e to $a** bac% to ti&eo(ts! "*tho(gh the #er$or&ance 2o(*d degrade. Qes! It &ight *ead to dead*oc%! S(##ose that a batch o$ $ra&es arri-ed correct*y and 2ere acce#ted! Then the recei-er 2o(*d ad-ance its 2indo2! No2 s(##ose that a** the ac%no2*edge&ents 2ere *ost! The sender 2o(*d e-ent(a**y ti&e o(t and send the $irst $ra&e again! The recei-er 2o(*d send a N"J! S(##ose that this 2ere *ost! 0ro& that #oint on.c#. It 2o(*d *ead to dead*oc% beca(se this is the on*y #*ace that inco&ing ac%no2*edge&ents are #rocessed! Aitho(t this code.x#/-a&. S * 5 and the recei-erGs be (+ l . + * ). ca(sing A to thin% the *ost $ra&es 2ere being ac%no2*edged! 22. #*(s a s&a** 4neg*igib*e5 ti&e $or the ac%no2*edge&ent to arri-e $(**y! In a**.. -. 2ith the "<J ?! Loo% at the sit(ation at A 2hen the $ra&e 2ith -. &sec a$ter its trans&ission 2as started! The ac%no2*edge&ent ta%es another 1 &sec to get bac%. &sec! The trans&itter &(st ha-e eno(gh 2indo2 s#ace to %ee# going $or ."0S. so it ta%es 121 $ra&es to $i** the #i#e! Se-en6bit se)(ence n(&bers are needed! 19.6bit se)(ence n(&bers are in (se! <onsider the $o**o2ing scenario> A 3(st sent $ra&e ?! B gets the $ra&e and sends a #iggybac%ed "<J! A gets the "<J and sends $ra&es +P6.18.#2. To o#erate e$$icient*y. Let the 2indo2 siBe be . &sec! " $ra&e ta%es +!. It 2o(*d de$eat the #(r#ose o$ ha-ing N"Js.

#*(s a /+6bit N"J once e-ery 1++ $ra&es! The tota* o-erhead is +!/ bits #er .c#. ? and + 2i** be #assed to the host.25. S(##ose A sent B a $ra&e that arri-ed correct*y. the cyc*e is .Exp. it 2i** be b($6 $ered and 6 ac%no2*edged! Ahen ? co&es in.) to be odd to 2or% #ro#er*y! 8o2e-er. so it sends a N"J!I!A &ere*y re6sent r!ac%N1.@6+ data bits. The e-en se)(ence n(&bers (se b($$er + and the odd ones (se b($$er 1! This &a##ing &eans that $ra&es / and + both (se the sa&e b($$er! S(##ose that $ra&es +P. #*(s 1: o$ /+++ bits 4retrans&ission5. $or an e$$iciency o$ k/./2 &sec. other i&#*e&enta6 tions o$ s*iding 2indo2 #rotoco*s do not a** ha-e this #ro#erty 29. since the se)(ence n(&ber is be*o2 /-a&. b(t there 2as no re-erse tra$$ic! "$ter a 2hi*e A 2o(*d ti&e o(t and retrans&it! B 2o(*d notice that the se)(ence n(&ber 2as incorrect.e$$iciency H ?'.@6+ + +!/5 =1!@@ #ercent! 31./2 &sec./2 H +!?/: 16 PROBLEM SOLUTIONS 0OR <8"PTER . the $ra&e ac%no2*edging the $irst one has been $(**y sent! "t # =. 30. <onsider the $o**o2ing scenario! A sends + to B! B gets it and sends an "<J. 2e get N-B*!$ =2.d! <onse)(ent*y.% R+S set to #-*e! The *oo# in the code $or /-a&. are recei-ed and ac%no2*edged! The recei-erGs 2indo2 no2 con6 tains / and +! I$ / is *ost and + arri-es./ &sec. Let # =+ denote the start o$ trans&ission! "t # =1 &sec.A--i3al 2i** be e7e6c(ted once. b(t the ac%no2*edge&ent is *ost! The recei-er is no2 #re#ared to acce#t ? and +! Ahen the retrans&ission o$ + arri-es at the recei-er. 2hich carries an ac%no2*edge&ent n(&ber! Each $ra&e 2o(*d be sent e7act*y t2o ti&es! 28..) =/.e$$iciency H 1'. $or a $raction +!4/ 4. the $irst $ra&e has been $(**y trans&itted! "t # =2?1 &sec. it 2o(*d send a N"J. the sender trans&its $ra&es +P6! "** are recei-ed and ac%no2*edged./2 H 1!2@: 4c5 k H/. it 2i** be #(t in b($$er + and a--i3./2! 8ence 4a5 k H1.+6%b#s channe* and 6bit se)(ence n(&bers. the *ast bit arri-es at the sate**ite and the -ery short .e$$iciency H /'. the $irst $ra&e has $(**y arri-ed! "t # =2?2 &sec. No! The &a7i&(& recei-e 2indo2 siBe is 1! S(##ose that it 2ere 2! Ini6 tia**y. the ac%no2*edge&ent6bearing $ra&e has $(**y arri-ed! Th(s. the #i#e is a*2ays $(**! The n(&ber o$ retrans&issions #er $ra&e is abo(t +!+1! Each good $ra&e 2astes /+ header bits. 2hich it has not got yet! 26. b(t no2 B e7#ects 1./2 &sec! " tota* o$ k $ra&es are sent in . No! This i&#*e&entation $ai*s! Aith MaxS./2 H +!1 : 4b5 k H?. it 2o(*d be sending $ra&e 1. Aith a . b(t the "<J gets *ost! A ti&es o(t and re#eats +. the *ast bit is sent! "t # =. and an o(t6o$6order &essage de*i-ered to the host! This #rotoco* re)(ires MaxS. The trans&ission starts at # =+! "t # =/+@6/ 6/+++ sec H 6/ &sec. *eading to a #rotoco* $ai*(re! 27.

++ 9sec! Each T1 $ra&e is 1@. ti&eo(t by the sender. or 12?5. so a 1++6%& cab*e 2i** be $i**ed in . each o$ 2hich can ta%e on the -a*(es + or 1! Th(s. 3 . this condition is &et. state BE is not #er&itted! P*ace C re#resents a se&a#hore that can be seiBed by either A or D b(t not by both together! . it can r(n at $(** s#eed! 0or a 2indo2 siBe o$ 1+ or greater. Each &achine has t2o %ey -ariab*es> n. ! It corres#onds to acce#tance o$ an e-en $ra&e. the "<J arri-es at the earth! The data rate here is /+@6 bits in 6+/ &sec or abo(t 6? 1 b#s! Aith a 2indo2 siBe o$ ? $ra&es. the $irst "<J arri-es and the cyc*e can start again! 8ere 2e ha-e ? C/+@6 =2 . 3 #0 3 $./?+!2 b#s! <ontin(o(s trans&ission can on*y occ(r i$ the trans&itter is sti** sending 2hen the $irst "<J gets bac% at # =6+/ &sec! In other 2ords. and 16 2ith t2o &essages on it 4one &essage in each direction5! In tota* there are 1 N N 16 H 2. i!e!. #ossib*e channe* states! This i&#*ies / C/ C2.c#. or ??2 bits on the cab*e! 33. 1. =/++ #ossi6 b*e states $or the co&#*ete syste&! 34. the n(&ber o$ states the channe* can be in is 1 2ith Bero &essages on it. 2.6?2 bits in 6+/ &sec! The data rate is /?. The #ro#agation s#eed in the cab*e is 2++. bits sent in 12. and regeneration o$ the ac%no2*edge&ent by the recei-er! PROBLEM SOLUTIONS 0OR <8"PTER . trans&ission ti&e is // &sec $or the $(** 2indo2.+++ %&'sec.n% and !-a&. BD AE ACD A C B D E 1 2 3 4 35.x# 3 !-a&. i$ the 2indo2 siBe is greater than 6+/ &sec 2orth o$ trans&ission. 9sec! This corres#onds to $o(r $ra&es. 2ith one &essage on it. 6. the data rate is 6/ %b#s! 32. The Petri net and state gra#h are as $o**o2s> 17 The syste& &ode*ed is &(t(a* e7c*(sion! B and E are critica* sections that &ay not be acti-e si&(*taneo(s*y."<J is sent! "t # =6+/ &sec. or 2++ %&'&sec. so $or any 2indo2 siBe o$ 1+ or greater 4e!g!. each &achine can be in one o$ $o(r #ossib*e states! " &essage on the channe* con6 tains the se)(ence n(&ber o$ the $ra&e being sent and the se)(ence n(&ber o$ the $ra&e being "<Jed! Th(s.xp. *oss o$ the ac%no2*edge&ent. $o(r ty#es o$ &essages e7ist! The channe* &ay contain + or 1 &essage in either direction! So. at 2hich ti&e the sender has to sto#! "t 6+/ &sec. The $iring se)(ence is 1+.d.

and 2 are increased by 1! 0ina**y. 2. $or a tota* *oad o$ . 2hich gi-es the 10de*ay! 2. The n(&ber o$ trans&issions is E =. Aith #(re "LO8". PPP 2as designed to be (sed 2ith &ode&s. −5 =+!1.6 %b#s H 1+!. so it is o-er*oaded! 7. and &ode&s acce#t and trans&it data in (nits o$ 1 byte. k . $ 2i** get its t(rn to trans&it a$ter the other N −1 stations ha-e trans&itted one $ra&e each. it beco&es + and a** the other stations are incre&ented . and N contention #eriods o$ siBe *og 2 N each! Aait ti&e is th(s (N −15 ×% +N C*og 2 bits! 9. −2 . "t its s&a**est. " =1/ (. it beco&es +. C+! 6. 5 . 6. 1. The $or&(*a is the standard $or&(*a $or Mar%o. 5 −1). %b#s! Each station re)(ires 1+ b#s. so the de*ay is /4 . and . Each ter&ina* &a%es one re)(est e-ery 2++ sec. no co**i6 sions are e7#ected so the trans&ission is *i%e*y to be s(ccess$(*! Aith s*otted "LO8". na&e*y. 4b5 41 −. 4c5 1 &sec! 0or case 4c5 2e are o#erating a )(e(eing syste& 2ith . both in ter&s o$ 5.+ stations! 18 PROBLEM SOLUTIONS 0OR <8"PTER / 3. not 1 bit! 37. 5. P + =. and . −5 2ith 5 =2!. 2or%ing entire*y 2ith bytes is &(ch si&#*er than 2or%ing 2ith indi-id(a* bits! In addition. yie*ding one #oint on the c(r-e! 8. 4c5 Ahene-er 5 L1 the channe* is o-er*oaded. 5! 8ere C =1+ and ?1+ −/ .so " =1/ 41++++ −la&b%a5 sec! 0or the three arri-a* rates. S =+!26. 4a5 Aith 5 =2 the Poisson *a2 gi-es a #robabi*ity o$ . Ahen station / sends. 2e get 4a5 +!1 &sec. −5 5 k . 4b5 Using S =5. are increased by 1! Ahen station .C −. it has to 2ait $or the ne7t s*ot! This introd(ces ha*$ a s*ot ti&e o$ de*ay! 4. Aith #(re "LO8" the (sab*e band2idth is +!1 / C. and +. it beco&es +. 4a5 0ro& the Poisson *a2 again. and t2o chec%s(& bytes. 4a5 The 2orst case is> a** stations 2ant to send and $ is the *o2est n(&bered station! Aait ti&e N bit contention #eriod N (N −15 ×% bit $or trans&ission o$ $ra&es! The tota* is N +(N −15% bit ti&es! 4b5 The 2orst case is> a** sta6tions ha-e $ra&es to trans&it and $ has the *o2est -irt(a* station n(&ber! <onse)(ent*y.+ re)(ests'sec! 8ence 5 =. one $or de*ay and one $or thro(gh#(t. PPP 2as c*ear*y designed to be i&#*e&ented in so$t2are. 2hen station @ sends. 4c5 The e7#ected n(&ber o$ trans&issions is . Th(s. sends.0/ +++ =1/ 160. 5 =?!4. $or a tota* o$ $i-e o-erhead bytes #er $ra&e! SOLUTIONS TO CHAPTER 4 PROBLEMS 1.36. trans&ission can start instant*y! "t *o2 *oad. so N =1+. and 1. not in hard2are as 8=L< near*y a*2ays is! Aith a so$t2are i&#*e&entation. =. The E e-ents are se#arated by E −1 inter-a*s o$ $o(r s*ots each. −5 . 2e ha-e t2o #ara&etric e)(ations. −5 . one #rotoco* byte. each $ra&e has t2o $*ag bytes... / 4C =+!@. 4b5 +!11 &sec. The thro(gh#(t is gi-en by S =5. 0or each 5 -a*(e it is #ossib*e to $ind the corres#onding de*ay and thro(gh#(t.s05 =−*nP + =−*n +!1 =2!6.+0/ 1+ =1+. −5 =+!1.)(e(eing gi-en in section /!1!1.

6. . 1. etc! The 2orst case is 2n +1 4co&&on #arent5. one *e-e* bac%5. so <SM"'<= cannot be (sed! I$ this #rob*e& co(*d be so*-ed 4e!g!. PROBLEM SOLUTIONS 0OR <8"PTER / s*ot 1+> 11 s*ot 11> 1. . 2hich ha##ens 2ith #robabi*ity 2 −n .. Qes! I&agine that they are in a straight *ine and that each station can reach on*y its nearest neighbors! Then A can send to B 2hi*e E is sending to 0! . s*ot /> 2 s*ot . The n(&ber o$ s*ots re)(ired de#ends on ho2 $ar bac% in the tree one &(st go to $ind a co&&on ancestor o$ the t2o stations! I$ they ha-e the sa&e #arent 4i!e!. is <SM"'<= a candidate! 13. 2hich ha##ens 2ith #robabi*ity 2 −n +1 . there is sti** the #rob*e& o$ not a** stations being 2ithin radio range o$ each other! On*y i$ both o$ these #rob6 *e&s can be so*-ed. ?. &. .. 11. and the best case is three s*ots 4stations in di$6 $erent ha*-es o$ the tree5! The &ean. ?.. and .. ? s*ot ?> . . 11. . 2ant to send! E*e-en s*ots are needed. . and in both cases these bands are s*otted $or T=M! 14. it ta%es 2n +1 s*ots to 2a*% the tree! I$ the stations ha-e a co&&on grand#arent. . ?. /.> 2. 2. Both o$ the& (se a co&bination o$ 0=M and T=M! In both cases dedicated $re)(ency 4i!e!.. s*ot 6> . 1. 1.. ? s*ot . by e)(i##ing each station 2ith t2o radios5. is gi-en by &= i =+ 19 Σ n −1 2 −(n −i 5 42n +1 −2i 5 This e7#ression can be si&#*i$ied to & =41 −2 −n 542n +15 −2 −(n −15 i =+ Σ n −1 i2i 12. Radios cannot recei-e and trans&it on the sa&e $re)(ency at the sa&e ti&e. 2a-e*ength5 bands are a-ai*ab*e. s*ot 2> 2. s*ot > ? s*ot @> 11.. and 1.> . 11. 1! The res(*t is @. Stations 2.. the tree 2a*% ta%es 2n −1 s*ots. 2ith the contents o$ each s*ot being as $o**o2s> s*ot 1> 2. .! 10. .

2hich &eans it has t2o signa* #eriods #er bit sent! The data rate o$ the standard Ethernet is 1+ Mb#s. 9sec. In this #eriod.!6 9sec5 =e*ay $or *ast bit to get to the end 4.6 & *ong are needed. $or a tota* o$ /16 &! 16. so 2. $o**o2ed by a s(ccess on ro(nd k is P k =41 −2 −(k −15 5 i =1 k −1 . 2 −(i −15 2hich can be si&#*i$ied to P k =41 −2 −(k −15 52 −(k −154k −2)/ 2 The e7#ected n(&ber o$ ro(nds is then 3(st Σ kP k .!2 9sec5 =e*ay $or *ast bit to get to the end 4.15. the one62ay #ro#agation ti&e is . 0or a 16%& cab*e. The #attern this ti&e is 8L8L8LL88LL8L88L8LL8! 19. it &(st be i&#ossib*e to trans&it an entire $ra&e . Σ Σ 777777777777 (i −/52 +4 7 − 52 The tota* *ength is abo(t 1 . ! 9sec. high 485 and *o2 4L5! The #at6tern is L8L8L88L8L8LL88LL88L! 18.!+ 9sec5 recei-er seiBes cab*e 41+ 9sec5 ac%no2*edge&ent sent 4. The ro(nd6tri# #ro#agation ti&e o$ the cab*e is 1+ 9sec! " co&#*ete trans&ission has si7 #hases> trans&itter seiBes cab*e 41+ 9sec5 trans&it data 42. ? horiBonta* cab*es . The #robabi*ity that the $irst k −1 atte&#ts $ai*. The Ethernet (ses Manchester encoding.2 &eters! 4b5 0or +2!. 22/ data bits are sent. 4a5 N(&ber the $*oors 16?! In the star con$ig(ration.!+ 9sec5 The s(& o$ these is . 21... 1+ 9sec! To &a%e <SM"'<= 2or%. the #robabi*ity o$ a co**ision on atte&#t i is 2 −(i −15 . $or a rate o$ abo(t .. N(&ber the ac)(isition atte&#ts starting at 1! "tte&#t i is distrib(ted a&ong 2 i −1 s*ots! Th(s. −1 =1+/ sites! The tota* *ength o$ these cab*es is / i =1 ? 7 =1 1.. or 2+ &egaba(d! 20 PROBLEM SOLUTIONS 0OR <8"PTER / 17. so the ba(d rate is t2ice that.! Mb#s! 20. the ro(ter is in the &id6d*e o$ $*oor /! <ab*es are needed to each o$ the ? C1. The signa* is a s)(are 2a-e 2ith t2o -a*(es. #*(s one -ertica* cab*e 2/ & *ong.

Unco&#ressed -ideo has a constant bit rate! Each $ra&e has the sa&e n(&ber o$ #i7e*s as the #re-io(s $ra&e! Th(s.12 o$ the& s(r-i-ing correct*y is 41 −#5. and the chec%s(&! Since the header $ie*ds occ(#y 1 bytes and the #ac%et is 6+ bytes. I"M616 is (sed $or + Mb#s! 0or distant stations. and chec%s(& $ie*ds are co(nted too. 2hich is abo(t +!@@@@/ ! The $raction da&aged is th(s abo(t . . ! The n(&ber o$ $ra&es'sec is 11 C1+ 6 / . The &ini&(& Ethernet $ra&e is 6/ bytes.. a** $ra&es shorter than 1+.++ bytes. the tota* $ra&e siBe is ? bytes. the ty#e'*ength $ie*d.+ &egabits are trans&itted. I"M66/ is (sed $or 12+ Mb#s! 0or &edi(& distances. so the tr(e data rate is indeed 1+++ &egabits'sec! this inter-a*! "t 1 . ty#e'*ength.12 bits.1/+! 0or the *argest $ra&e 412. One reason is the need $or rea*6ti&e )(a*ity o$ ser-ice! I$ an error is disco-ered..12 . in 2hich case the &a7i&(& n(&ber is 2//. The encoding is on*y +: e$$icient! It ta%es 1+ bits o$ trans&itted data to re#resent bits o$ act(a* data! In one second.+++ bits or 12. 2hich e7ceeds the 6/6byte &ini&(&! There$ore. short $ra&es are #added to /+@6 bits./. $ra&es'sec! 27. $or2ard error correction is 21 ./ /! M(*ti#*ying these t2o n(&bers together. this on*y 2or%s 2hen $ra&e b(rsting is o#erating! Aitho(t $ra&e b(rsting. constant bit rate ser-ice is the best choice! 32. C1+ −. or a*&ost 2 &i**ion $ra&es'sec! 8o2e-er.. 12. " $ra&e contains . so(rce address. it is #ossib*e to co&#(te -ery acc(rate*y ho2 &(ch band2idth 2i** be needed and 2hen! <onse)(ent*y. Station C is the c*osest to A since it heard the RTS and res#onded to it by asserting its N"D signa*! D did not res#ond so it &(st be o(tside "Gs radio range! 29. 2e get abo(t 1 da&aged $ra&e #er second! 30. inc*(ding both addresses in the Eth6ernet $ra&e header.1// bits5. there is no ti&e to get a retrans&ission! The sho2 &(st go on! 0or2ard error correction can be (sed here! "nother reason is that on -ery *o2 )(a*ity *ines 4e!g!. the error rate can be so high that #ractica**y a** $ra&es 2o(*d ha-e to be retrans&itted. IPSJ is (sed $or /+ Mb#s! 31. &i**ion code2ords! Each code2ord re#resents data bits.+ bytes! 22. so the &ini&(& $ra&e is 1+. so at 1 . the tota* is indeed 1. no #adding is (sed! 23. b(t 2hen the destination address.b#s.igabit Ethernet has it and so does +2!16! It is (se$(* $or band2idth e$$iciency 4one #rea&b*e. The #ay*oad is 1.+++ bits can be co&6 #*ete*y trans&itted in (nder 1+ 9sec. and the retrans&ission 2o(*d #robab*y da&aged as 2e**! To a-oid this.12 bits! The bit error rate is p =1+ −? ! The #robabi*ity o$ a** .12 or abo(t 21.12. there can be as &any as 2. The &a7i&(& 2ire *ength in $ast Ethernet is 1'1+ as *ong as in Ethernet! 24.@. The s&a**est Ethernet $ra&e is . etc!5 b(t a*so 2hen there is a *o2er *i&it on $ra&e siBe! 28. It de#ends ho2 $ar a2ay the s(bscriber is! I$ the s(bscriber is c*ose in. 2ire*ess channe*s5.b#s 2e get 1. 2hich &eans 12.1 ! PROBLEM SOLUTIONS 0OR <8"PTER / 25.

9sec! There is no need to anno(nce this! "** B*(etooth de-ices ha-e this hard2ired into the chi#! B*(etooth 2as designed to be chea#. and "! Bridges E and C 2i** a##end a ne2 entry in their hash tab*e $or $ra&es destined $or d. $ar $aster than +2!11! 35. B. Bridges . =. 2ith $ra&es arri-ing irreg(*ar*y as data are #rod(ced! "n S<O channe* is synchrono(s. the access code at the start o$ the $ra&e is deri-ed $ro& the &asterGs identity! This is ho2 s*a-es te** 2hich 22 PROBLEM SOLUTIONS 0OR <8"PTER / &essage be*ongs to 2hich #iconet! I$ t2o o-er*a##ing #iconets (sed the sa&e access code. "n "<L channe* is asynchrono(s. the 4dyna&ic5 s#anning tree a*gorith& recon$ig(res the s#anning tree into a ne2 one that &ay inc*(de one or &ore o$ these bridges that 2ere not a #art o$ the #re-io(s s#anning tree! 39. The $irst $ra&e 2i** be $or2arded by e-ery bridge! "$ter this trans&ission. B. there 2o(*d be no 2ay to te** 2hich $ra&e be*onged to 2hich #iconet! In e$$ect. and $i7ing the ho# rate and d2e** ti&e *eads to a si&#*er chi#! 37.. =. 2hi*e bridges =. They do not! The d2e** ti&e in +2!11 is not standardiBed. sending the $ra&e o(t . each bridge 2i** ha-e an entry $or destination a 2ith a##ro#riate #ort in its hash tab*e! 0or e7a&#*e. the t2o #iconets 2o(*d be &erged into one big #iconet instead o$ t2o se#arate ones! 34. =Gs hash tab*e 2i** no2 ha-e an entry to $or2ard $ra&es destined to a on L"N 2! The second &essage 2i** be seen by bridges B. and B! These bridges 2i** a##end a ne2 entry in their hash tab*e $or $ra&es destined $or d! The $i$th &essage 2i** be seen by bridges E. It is i&#ossib*e $or a de-ice to be &aster in t2o #iconets at the sa&e ti&e! There are t2o #rob*e&s! 0irst. and "! These bridges 2i** a##end a ne2 entry in their hash tab*e $or $ra&es destined $or c! 0or e7a&#*e bridge =Gs hash tab*e 2i** no2 ha-e another entry to $or2ard $ra&es destined to c on L"N 2! The third &essage 2i** be seen by bridges 8. =. address bits are a-ai*ab*e in the header 2hi*e as &any as se-en s*a-es co(*d be in each #iconet! Th(s. The si&#*est choice is to do nothing s#ecia*! E-ery inco&ing $ra&e is #(t onto the bac%#*ane and sent to the destination card. intracard tra$$ic goes o-er the s2itch bac%#*ane! The other choice is to recogniBe this case and treat it s#ecia**y. on*y . there 2o(*d be no 2ay to (ni)(e*y address each s*a-e! Second.(sed to increase the $raction o$ $ra&es that arri-e correct*y! 33. 8 and 9 are not (sed $or $or2arding any $ra&es! The &ain reason $or ha-ing *oo#s in an e7tended L"N is to increase re*iabi*ity! I$ any bridge in the c(rrent s#anning tree $ai*s. 2ith $ra&es arri-ing #eriodica**y at a 2e**6de$ined rate! 36. 2hich &ight be the so(rce card! In this case. B*(etooth (ses 08SS. and A 2i** (#date their hash tab*e entry $or destination d! 38. ". so it has to be anno(nced to ne2 stations that arri-e! In B*(etooth this is a*2ays 62. <. 3(st as +2!11 does! The biggest di$$erence is that B*(etooth ho#s at a rate o$ 16++ ho#s'sec.

23 24 PROBLEM SOLUTIONS 0OR <8"PTER . Qes! Interr(#t signa*s sho(*d s%i# ahead o$ data and be de*i-ered o(t o$ se)(ence! " ty#ica* e7a&#*e occ(rs 2hen a ter&ina* (ser hits the )(it 4%i**5 %ey! The #ac%et generated $ro& the )(it signa* sho(*d be sent i&&ediate*y and sho(*d s%i# ahead o$ any data c(rrent*y )(e(ed (# $or the #rogra&. it is discarded i&&ediate*y! Aith c(tHthro(gh.@. and ti&er -a*(es! 5. The 2orst case is an end*ess strea& o$ 6/6byte 4. The #ort on B1 to L"N . C =/+ bytes o$ &e&ory $or 1+++ sec! The datagra& i&#*e&entation re)(ires trans&itting 12 C/ C2++ H @6++ bytes o$ header o-er and abo-e 2hat the -irt(a*6circ(it i&#*e&entation needs! Th(s. on the 2ay o(t. the $or2arding can begin! 43.12! This is 1. 2ith a )(ery going one 2ay and the re#*y co&ing bac% the other 2ay! 2. then e7a&ines it and $or2ards it! " c(t6thro(gh s2itch starts to $or2ard inco&ing $ra&es be$ore they ha-e arri-ed co&#*ete*y! "s soon as the destination address is in. the n(&ber o$ $ra&es it can hand*e is 1+ @ / . . and &any $or&s o$ re&ote database access are inherent*y connection*ess.A! 42. and -ideo on de&and need connection6oriented ser-ice! On the other hand.. the $ra&e is a*ready gone! Trying to dea* 2ith the #rob*e& is *i%e *oc%ing the barn door a$ter the horse has esca#ed! 44. e*ectronic $(nds trans$er.. It 2o(*d 2or%! 0ra&es entering the core do&ain 2o(*d a** be *egacy $ra&es. Store6and6$or2ard s2itches store entire $ra&es be$ore $or2arding the&! "$ter a $ra&e co&es in. 0o(r ho#s &eans that $i-e ro(ters are in-o*-ed! The -irt(a*6circ(it i&#*e&en6tation re)(ires tying (# . No! 8(bs 3(st connect a** the inco&ing *ines together e*ectrica**y! There is nothing to con$ig(re! No ro(ting is done in a h(b! E-ery $ra&e co&ing into the h(b goes o(t on a** the other *ines! 45. " store6and6$or2ard s2itch stores each inco&ing $ra&e in its entirety.126bit5 $ra&es! I$ the bac%6#*ane can hand*e 1+ @ b#s. 2o(*d need to be re*abe*ed as .12. i!e!. Dirt(a* circ(it net2or%s &ost certain*y need this ca#abi*ity in order to ro(te connection set(# #ac%ets $ro& an arbitrary so(rce to an arbitrary destination!*y and not going o-er the bac%#*ane! 40. that s2itch 2o(*d ha-e to (ntag o(tgoing $ra&es! SOLUTIONS TO CHAPTER 5 PROBLEMS 1. re&ote *ogin. data a*ready ty#ed in b(t not yet read! 3. the chec%s(& can be -eri$ied! I$ the $ra&e is da&6 aged. so it 2o(*d be (# to the $irst core s2itch to tag the&! It co(*d do this by (sing M"< addresses or IP addresses! Si&i*ar*y. The negotiation co(*d set the 2indo2 siBe. 0i*e trans$er. $ra&es'sec! PROBLEM SOLUTIONS 0OR <8"PTER / 41. &a7i&(& #ac%et siBe. data rate. credit card -eri$ication and other #oint6o$6sa*e ter&ina*s. da&aged $ra&es cannot be discarded by the s2itch beca(se by the ti&e the error is detected.

6. . P. -irt(a*6circ(it n(&ber. it &(st be sent there! The cases ++ 4has not arri-ed and 2i** not be sent5 and 11 4has arri-ed and 2i** be sent bac%5 are *ogica**y incorrect and th(s do not e7ist! 12.6++ H 1!. 1/. C1+ ? sec. an occasiona* noise b(rst co(*d change a #er$ect*y *ega* #ac%et $or one destination into a #er$ect*y *ega* #ac%et $or another destination! 7. . A5EB. . . is changed. 5! ... and A5E0! The n(&ber o$ ho#s (sed is 2/! 8. 1.. and r(n the shortest #ath a*gorith& again! The second #ath 2i** be ab*e to s(r-i-e the $ai*(re o$ any *ine in the $irst #ath. that this he(ristic &ay $ai* e-en tho(gh t2o *ine6dis3oint #aths e7ist! To so*-e it correct*y. 2hat is nor&a**y done is that the ho&e agent tric%s the ro(ter into thin%ing it is the &obi*e host by res#onding to "RP re)(ests! Ahen the ro(ter gets an IP #ac%et destined $or the &obi*e host. 11.oing -ia B gi-es 411.. it &(st be ac%no2*edged! I$ no #ac%et has arri-ed on a *ine. The ro(ting tab*e is /++ bits! T2ice a second this tab*e is 2ritten onto each *ine. @6++ o$ the& cost @!6 &i**icents! Dirt(a* circ(its are chea#er $or this set o$ #ara&eters! 6. 6.. 12. there is a #robabi*ity o$ 2 −k that the error is (ndetected! I$ the destination $ie*d or. It 2i** $o**o2 a** o$ the $o**o2ing ro(tes> ABC=. A5 0. Qes! " *arge noise b(rst co(*d garb*e a #ac%et bad*y! Aith a %6bit chec%s(&. aro(nd. it broadcasts an "RP )(ery as%ing $or the +2!. 1 . 1+5! .. c*(sters. It a*2ays ho*ds! I$ a #ac%et has arri-ed on a *ine. ABE0.oing -ia E gi-es 412. each 2ith 16 regions. a byte6sec costs 6!? C1+ − cents. ABC0. reading a** $ra&es dro##ed onto the L"N.1! 13. M"<6*e-e* address! 25 . Pic% a ro(te (sing the shortest #ath! No2 re&o-e a** the arcs (sed in the #ath 3(st $o(nd. The &ini&(& occ(rs at 1. <oncei-ab*y it &ight go into #ro&isc(o(s &ode.+++ o$ the& cost 3(st o-er 2 &i**icents! I$ a byte6ho# costs 1+ −6 cents. 2+ c*(sters o$ 16 regions o$ 1. . +. =. 5! The o(tgoing *ines are (B. e!g!. @. @. tho(gh. A5 =. N 16 N 2+ H . the #ac%et 2i** be de*i-ered to the 2rong destination and acce#ted as gen(ine! P(t in other 2ords. each region ha-ing 2+ ro(ters. and /+.2 C/+ C. a &a76$*o2 a*gorith& sho(*d be (sed! 9. E. e)(i-a*ent*y. B5! 10.oing -ia D gi-es 41@. B. ABE. M"<6*e-e* address o$ the &achine 2ith that IP address! Ahen the &obi*e host is not PROBLEM SOLUTIONS 0OR <8"PTER .+++ byte6sec o$ &e&ory -ers(s @6++ byte6ho#s o$ circ(it ca#acity! I$ &e&ory is de#reciated o-er 2 C. and -ice -ersa! It is concei-ab*e. ro(ters! In a** cases the tab*e siBe is 1.the )(estion co&es do2n to the re*ati-e cost o$ /+. b(t this is -ery ine$$icient! Instead. the ho&e agent res#onds to the "RP. so ++ b#s are needed on each *ine in each direction! 11. so the ro(ter associates the &obi*e (serGs IP address 2ith the ho&e agentGs +2!. . @5! Ta%ing the &ini&(& $or each destination e7ce#t C gi-es 411. 1/. or one o$ the e)(i-a*ent $or&s.

the thro(gh#(t is one #ac%et e-ery 24 n −15" sec! 22. the second ro(ter has recei-ed the #ac%et b(t cannot ac%no2*edge it yet! "t the start o$ s*ot . is not circ*ed as it does not co&e in on the sin% tree! 16. The #robabi*ity that it &a%es . D/8E. The node in entry . b(t not e7act*y! S(##ose that there are 1+2/ node identi$iers! I$ node . Notice that $or p =+ the &ean is .++ and ++ going c*oc%2ise and on*y 16 act(a* nodes bet2een the& going co(nter6 c*oc%2ise! The #(r#ose o$ the cry#togra#hic hashing $(nction S8"61 is to #rod(ce a -ery s&ooth distrib(tion so that the node density is abo(t the sa&e a** a*ong the circ*e! B(t there 2i** a*2ays be statistica* $*(ct(ations. DE5 89:N. ho#s! The #ro6babi*ity that it &a%es one ho# is #! The #robabi*ity that it &a%es t2o ho#s is #41 −#). so it does not broadcast! 18. The #rotoco* is terrib*e! Let ti&e be s*otted in (nits o$ " sec! In s*ot 1 the so(rce ro(ter sends the $irst #ac%et! "t the start o$ s*ot 2. 24n −15" sec.. the third ro(ter has recei-ed the #ac%et. be$ore the so(rce ro(ter can send the second #ac%et! Th(s. so a** the ro(ters behind it are sti** hanging! The $irst ac%no2*edge&ent can 26 PROBLEM SOLUTIONS 0OR <8"PTER . Ahen gets the #ac%et. The &ean #ath *ength a #ac%et can e7#ect to tra-e* is then the 2eighted s(& o$ these three #robabi*ities. b(t it cannot ac%no2*edge it either. and . Each #ac%et e&itted by the so(rce host &a%es either 1. or . Node is three ho#s $ro& B. It can do it a##ro7i&ate*y. b(t it co(*d ha##en that there are 2+ act(a* nodes bet2een . Node / c(rrent*y has t2o descendants. 8 %no2s ho2 to get to I. or p 2 −6p +6. not circ*ed beca(se the #ac%et that $o**o2s 8/5 is not on the sin% tree! Node 5 ac)(ires a second descendant.MO. *abe*ed 0! This. ho#s is 41 −#52 . it is #robab*y better to go c*oc%2ise. A and =! It no2 ac)(ires a third one. . ho#s and $or p =1 the &ean is 1 ho#! Aith + 'p'1.++ is *oo%ing $or node ++. so the straight$or2ard choice &ay be 2rong! 20. on*y be sent 2hen the destination host ta%es the #ac%et $ro& the destination ro(ter! No2 the ac%no2*edge&ent begins #ro#agating bac%! It ta%es t2o $(** transits o$ the s(bnet.. &(*ti#*e trans&issions &ay be . in addition to =. so it ta%es three ro(nds to $ind the ro(te! 19. res#ecti-e*y! " tota* o$ 21 #ac%ets are generated! 4b5 The sin% tree needs $o(r ro(nds and 1/ #ac%ets! 15. 2. 5 :N.14. it broadcasts it! 8o2e-er. 4a5 The re-erse #ath $or2arding a*gorith& ta%es $i-e ro(nds to $inish! The #ac%et reci#ients on these ro(nds are A<. s2itches $ro& 12 to 1+! 21. too. M(*ti#*e s#anning trees are #ossib*e! One o$ the& is> A B C E FD K J I 17.

There is no g(arantee! I$ too &any #ac%ets are e7#edited. 0irst.E>. 5! S(bstit(ting. 2hereas RE= i&#*icit*y noti$ies the so(rce by si&#*y dro##ing one o$ its #ac%ets! Second. No #rob*e&! E(st enca#s(*ate the #ac%et in the #ay*oad $ie*d o$ a datagra& be*onging to the s(bnet being #assed thro(gh and send it! 34. the tota* ho#s (sed is 3(st (p 2 −6p +. beca(se d(ring that inter-a*. and others &ight on*y acce#t / 6byte #ac%ets! 0rag&entation is sti** needed! 33. so .5'41 −#52 . <a** the *ength o$ the &a7i&(& b(rst inter-a* . the b(c%et is $(** at the start o$ the inter-a* 41 Mbyte5 and another 1 0 # Mbytes co&e in d(ring the inter-a*! The o(t#(t d(ring the trans&ission b(rst con6 tains . so&e net2or%s a*ong the #ath &ight acce#t 1+2/6byte #ac%ets. =.+++ ce**s'sec can be sent! Each ce** ho*ds / data bytes or . 2hereas RE= dro#s #ac%ets be$ore a** the b($$er are e7ha(sted! 24. is 1!. / 9is +!?.needed! The &ean n(&ber o$ trans&issions can be $o(nd by rea*iBing that the #robabi*ity o$ a s(ccess$(* trans&ission a** the 2ay is 41 −#52 . here it is 2 9sec! Aith 1+ ro(ters a*ong a #ath. The ro(ter has to do a##ro7i&ate*y the sa&e a&o(nt o$ 2or% )(e(eing a #ac%et. &i**ion.<>1. 2e get S = '46 −15 or 1!6 sec! 28. this ans2er is 2rong. It is not #ossib*e to send any #ac%ets greater than 1+2/ bytes. the )(e(eing #*(s ser-ice ti&e is 2+ 9sec! 31... sec to drain an &egabit b(c%et! 8o2e-er. / bits! The net data rate is then ?6! Mb#s! 27.8>. e-er! 26. It is needed in both! E-en in a concatenated -irt(a*6circ(it net2or%. 8ere 9is 2 &i**ion and .0 t! So*-ing this e)(ation. 2hich 2e 2i** ca** α . 2++.0 # Mbytes! E)(ating these t2o )(antities. the 2arning bit &ethod e7#*icit*y sends a congestion noti$ication to the so(rce by setting a bit. and L>1! 30. 2e get 1 +10 # =. and $ro& )(e(e6ing theory. 9sec. the 2arning bit &ethod dro#s a #ac%et on*y 2hen there is no b($$er s#ace *e$t.t! In the e7tre&e case. their channe* &ay ha-e e-en 2orse #er$or&ance than the reg(*ar channe*! 32. no &atter ho2 big it is! There is *itt*e do(bt that #rocessing 1+ #ac%6 ets o$ 1++ bytes each is &(ch &ore 2or% than #rocessing 1 #ac%et o$ 1+++ bytes! 25. &sec! PROBLEM SOLUTIONS 0OR <8"PTER . &ore to%ens arri-e! The correct ans2er can be obtained by (sing the $or&(*a S =C'4M −.. The e7#ected n(&ber o$ trans&issions is 3(st α+2 41 −α 5 +3 41 −α 5 2 +!!! = α 1 33 = 41 −#52 1 33333333 0ina**y. The band2idths in MB'sec are as $o**o2s> ">2. 2e get .B>+.++ nsec. 23.J> 2. each #ac%et e7#eriences a de*ay $o(r ti&es 2hat it 2o(*d in an id*e syste&! The ti&e in an id*e syste& is .. 29. The initia* IP datagra& 2i** be $rag&ented into t2o IP datagra&s at I1! No 27 . The nai-e ans2er says that at 6 Mb#s it ta%es /'.E>. Aith a to%en e-ery .# is 2.

"$ter N"T is insta**ed. a** the re)(ests are ro(nded (# to a #o2er o$ t2o! The starting address. Aith a 26bit #re$i7.++M 8D H7MD/ H+MM/ H1M>!!$..?!6!@6'1@! 42.. 2ritten as 1@ !16!6/!+'1@ 41.other $rag&entation 2i** occ(r! Lin% A<+1> . so the n(&ber o$ seconds it ta%es to e&it a #ac%et is 1@ 2/b! To #(t o(t 6.n=#h H /6+M 8D H7MD/ H+MM/ H+M>!!$.6 #ac%ets ta%es 2 2@ /b sec! E)(ating this to the &a7i&(& #ac%et *i$eti&e. a** +s and a** 1s are s#ecia*.!2. 2ritten as 1@ !16!16!+'21 C? 1@ !16!.. and &as% are as $o**o2s> A? 1@ !16!+!+ P 1@ !16!1..+@1 b#s! 36.n=#h H .. Since the in$or&ation is needed to ro(te e-ery $rag&ent.# H6+ Lin% +2<B> 415 . the n(&ber o$ #ac%ets'sec that the ro(ter can e&it is b/ 1@2.# H6+ 35.2!+'2+ D? 1@ !16!6/!+ P 1@ !@.n=#h H @/+M 8D H7MD/ H+MM/ H+M>!!$.. so /+@6 host addresses e7ist! 28 PROBLEM SOLUTIONS 0OR <8"PTER .!1.# H+ Lin% +1<+2> 415 .. 2ritten as 1@ !16!.# H+ 425 . the o#tion &(st a##ear in e-ery $rag&ent! 37. b is abo(t . 40. so on*y 262. It is s($$icient to add one ne2 tab*e entry> 2@!1 !+!+'22 $or the ne2 b*oc%! I$ an inco&ing #ac%et &atches both 2@!1 !+!+'1? and 2@!1 !+!+!'22...# H+ 425 . the . The &as% is 2+ bits *ong..!1.!2.!2.1/2 are a-ai*6 ab*e! 38. the n(&ber o$ net2or%s 2o(*d ha-e been 2 1 or 262.!2.. To start 2ith..2!+ P 1@ !/?!1. They can be aggregated to . The address is 1@/!/?!21!1.++M 8D H7MD/ H+MM/ H1M>!!$.+! 39..n=#h H .. I$ the bit rate o$ the *ine is b.6 ?.1//! 8o2e-er. 2e get 2 2@ /b =1+! Then. the *ongest one 2ins! This r(*e &a%es it #ossib*e to assign a *arge b*oc% to one o(tgoing *ine b(t &a%e an e7ce#tion $or one or &ore s&a** b*oc%s 2ithin its range! 43. The #ac%ets are ro(ted as $o**o2s> 4a5 Inter$ace 1 4b5 Inter$ace + 4c5 Ro(ter 2 4d5 Ro(ter 1 4e5 Ro(ter 2 44. there 2o(*d ha-e been 1 bits *e$t o-er to indicate the net62or%! <onse)(ent*y. it is cr(cia* that a** the #ac%ets #ertaining to a sing*e connection #ass in and o(t o$ the co&#any -ia the sa&e ro(ter. so the net2or% #art is 2+ bits! The re&aining 12 bits are $or the host. since that is 2here the &a##ing is %e#t! I$ each ro(ter has its o2n IP address and a** tra$$ic be*onging to a gi-en connection can be sent to the sa&e ro(ter. 2ritten as 1@ !16!+!+'2+ B? 1@ !16!16!+ P 1@ !2. ending address.n=#h H /6+M 8D H7MD/ H+MM/ H+M>!!$.

&a%ing it red(n6 dant here! 50. co(*d res(*t in a #ac%et being de*i-ered to the 2rong host! Many hosts do not chec% to see i$ a #ac%et de*i-ered to the& is in $act rea**y $or the&! They ass(&e the net2or% 2i** ne-er gi-e the& #ac%ets intended $or another host! =ata is so&eti&es not chec%s(&&ed beca(se doing so is e7#ensi-e. the sa&e 2ay a** the other Minnea#o*is (sers ha-e! That the connection (ses radio instead o$ a 2ire is irre*e-ant! 51. &aintaining a bit &a# 2ith 1 bit #er bytes to %ee# trac% o$ 2hich bytes are #resent in the b($$er! Ahen a** the bits in the bit &a# are 1. etc! They &o-e bits $ro& one end o$ a *ine to the other! 46. addresses! I$ 2e a**ocate the& at a rate o$ 1+ 1 #er second. and #(t the $rag&ents into the b($$er. $or e7a&#*e. this is a #art o$ ne2 datagra&. so they are not a**ocated *inear*y. the address s#ace is not $*at. the tota* siBe is not %no2n (nti* the *ast $rag&ent arri-es! Probab*y the on*y 2ay to hand*e reasse&b*y is to b($$er a** the #ieces (nti* the *ast $rag&ent arri-es and the siBe is %no2n! Then b(i*d a b($$er o$ the right siBe.&a##ing can be done correct*y and &(*tiho&ing 2ith N"T can be &ade to 2or%! 45. 48. "s $ar as the recei-er is concerned. this one 2i** ti&e o(t too! 49. b(t this ca*c(*ation sho2s that e-en 2ith an a**oca6 tion 29 . the datagra& &ay be $rag&ented in di$$erent6siBed ch(n%s! 0(rther&ore. years! This n(&ber is 1+++ ti&es the age o$ the (ni-erse! O$ co(rse. Qo( say that "RP does not #ro-ide a ser-ice to the net2or% *ayer. R"RP has a R"RP ser-er that ans2ers re)(ests! "RP does not ha-e this! The hosts the&se*-es ans2er "RP )(eries! 47. Qes! The $act that the Minnea#o*is L"N is 2ire*ess does not ca(se the #ac%6ets that arri-e $or her in Boston to s(dden*y 3(&# to Minnea#o*is! The ho&e agent in Boston &(st t(nne* the& to the $oreign agent on the 2ire*ess L"N in Minnea#o*is! The best 2ay to thin% o$ this sit(ation is that the (ser has #*(gged into the Minnea#o*is L"N. Aith 16 bytes there are 2 12 or . PPP. and (##er *ayers o$ten do it any2ay. since no other #arts o$ it are %no2n! It 2i** there$ore be )(e(ed (nti* the rest sho2 (#! I$ they do not.. the datagra& is co&#*ete! PROBLEM SOLUTIONS 0OR <8"PTER . 8=L<. the #rob*e& is nontri-ia*! 0rag&ents &ay arri-e o(t o$ order and so&e &ay be &issing! On a retrans&ission. it is #art o$ the net2or% *ayer and he*#s #ro-ide a ser-ice to the trans#ort *ayer! The iss(e o$ IP addressing does not occ(r in the data *in% *ayer! =ata *in% *ayer #roto6 co*s are *i%e #rotoco*s 1 thro(gh 6 in <ha#! . In the genera* case. "n error in the header is &(ch &ore serio(s than an error in the data! " bad address. they 2i** *ast $or 1+ 1.!/ C1+ .

so it is not needed in the &ain header! "ct(a**y. OJ or REEE<T to acce#t or re3ect the con6 nection! In o(r origina* sche&e. The dashed *ine $ro& PASS8@E ES"AB. The P-0#0c0l $ie*d te**s the destination host 2hich #rotoco* hand*er to gi-e the IP #ac%et to! Inter&ediate ro(ters do not need this in$or&ation. <once#t(a**y.8S MEN" PEND8N5 to ES"A<B. =ead*oc%s are #ossib*e! 0or e7a&#*e.. b(t disg(ised! The N. the act(a* se)(ence n(&ber is 4t. sec! 5. I$ the "A or A" ti&e is s&a**. the IP addresses re)(ested are no2 bigger. and -.x# h.$ie*d o$ the *ast 4e7tension5 header is (sed $or this #(r#ose! 53.i3in= a** i&#*y that the (ser is b*oc%ed and hence cannot a*so be in another state! .2?6! sec to cyc*e aro(nd! "t Bero gen6eration rate.sche&e that has an e$$iciency o$ 1'1+++ 4+!1 #ercent5. this $*e7ibi*ity is *ac%ing! 2. No! The #rob*e& is essentia**y the sa&e 2ith &ore than t2o ar&ies! 8. one 2i** ne-er r(n o(t! 52. the e-ents "<4A5 and A<4"5 are (n*i%e*y e-ents! The sender sho(*d retrans&it in state S1M the recei-erGs order does not &atter! 9. b(t e7#ecting di$$erent se)(ence n(&bers! Ti&eo(ts ha-e to be introd(ced to a-oid the dead*oc%s! 7. I$ the c*ient sends a #ac%et to SE+@E+ 3 P>+" and the ser-er is not *istening to that #ort. 2ai#ing. The states li$#. . it is there. and both are o#en. so bigger $ie*ds are needed! SOLUTIONS TO CHAPTER 6 PROBLEMS 1. Qes. n 2 +n . b(t A is no2 o#en 2hi*e B %no2s nothing at a** abo(t 2hat has ha##ened! No2 the sa&e thing ha##ens to B. a #ac%et arri-es at A o(t o$ the b*(e.ning. Qes! Both sides co(*d si&(*taneo(s*y e7ec(te RE<EIDE! 10. since it is ne-er -isib*e at any *e-e*! 30 PROBLEM SOLUTIONS 0OR <8"PTER 6 3. the sender 2o(*d enter the $orbidden Bone at . the #ac%et 2i** not be de*i-ered to the ser-er! 4. The LISTEN ca** co(*d indicate a 2i**ingness to estab*ish ne2 connections b(t not b*oc%! Ahen an atte&#t to connect 2as &ade. E)(ating these t2o $or&(*as. Loo% at the second d(#*icate #ac%et in 0ig! 66114b5! Ahen that #ac%et arri-es. it 2o(*d be a disaster i$ ac%no2*edge&ents to ( 2ere sti** $*oating aro(nd! 6..216! sec! 4b5 "t 2/+ se)(ence n(&bers'&in.8S ED is no *onger contingent on an ac%no2*edge&ent arri-ing! The tran6sition can ha##en i&&ediate*y! In essence. say. there are no changes! Technica**y.61!. i!e!. and A ac%no2*edges it! The ac%no2*edge&ent gets *ost.8S MEN" PEND8N5 state disa##ears. 4a5 The c*oc% ta%es . 2here # is in sec! The *e$t edge o$ the $orbidden region is 1+4 # −.n%ing.a%. the ca**er co(*d be gi-en a signa*! It 2o(*d then e7ec(te. 2e $ind that they intersect at # =.2?6! −6+ H .2?6 tic%s.c. +n 6 +n ? =1.216! ). the PASS8@E ES"AB. $.

%i# are the on*y *ega* ones! 13. and +!. b(t 2e**6%no2n #rocess I=s are i&#ossib*e! 31 .b#s *ine ta%es 1 9sec! The s#eed o$ *ight in $iber o#tics is 2++ %&'&sec. Sending 1+++ bits o-er a 1 . ha-ing on*y one set o$ #ara&eters 4the 2in6do2 edges5 to &anage! 0(rther&ore. &sec $or the re#*y to get bac%! In a**. r(nning on the sa&e &achine as A 42ith sa&e IP address5. or 1'1+ o$ 1: e$$iciency! 17. Cl. it is #robab*y not 2orth ha-ing $or this a##*ication! 18. the #rob*e& o$ a 2indo2 being increased and then decreased. #rocess I=s are OS6s#eci$ic! Using #rocess I=s 2o(*d ha-e &ade these #rotoco*s OS6de#endent! Second. &sec $or the *ast one to get to the ser-er. the res#onse ti&e is deter&ined by the s#eed o$ *ight! The best that can be achie-ed is 1 &sec! "t 1 Mb#s.a-+. it ta%es abo(t 1 &sec to #(&# o(t the 1+2/ bits. the credit sche&e is &ore $*e7ib*e. &sec $or the re#*y to get bac% in the best case! The best #ossib*e RP< ti&e is then 2 &sec! The conc*(sion is that i&#ro-ing the *ine s#eed by a $actor o$ 1+++ on*y 2ins a $actor o$ t2o in #er$or&ance! Un*ess the gigabit *ine is a&aB6ing*y chea#.). and not a** o$ these. so it ta%es +!. 2hich s#eci$y a destination &achine! Once s(ch a #ac%et arri-ed. c*ient B 2i** recei-e it and ass(&e that it is a re#*y its o2n re)(est! 16. and C-. binds its U=P soc%et to the sa&e #ort that A 2as (sing ear*ier! 0(rther&ore. +!.11. se#arate $ro& the ac%no2*edge&ents! 14. "t 1 . either! Call+. It is #ossib*e that a c*ient &ay get the 2rong $i*e! S(##ose c*ient A sends a re)(est $or $i*e !1 and then crashes! "nother c*ient B then (ses the sa&e #ro6 toco* to re)(est another $i*e !2! S(##ose c*ient B. Da#aPkt. beca(se the (ser is b*oc%ed! Th(s.). The s*iding 2indo2 is si&#*er. s(##ose BGs re)(est is *ost! Ahen the ser-erGs re#*y 4to "Gs re)(est5 arri-es. ho2 2o(*d the net2or% hand*er %no2 2hich #ro6 cess to gi-e it toO U=P #ac%ets contain a destination #ort! This in$or&ation is essentia* so they can be de*i-ered to the correct #rocess! PROBLEM SOLUTIONS 0OR <8"PTER 6 15. No! IP #ac%ets contain IP addresses. a**o2ing a dyna&ic &anage&ent o$ the b($$ering. &sec $or the re)(est to arri-e and another +!. None o$ the #ri&iti-es can be e7ec(ted. 1+++ bits ha-e been trans&itted in 1 &sec! This is e)(i-a*ent to 1 &egabit'sec.b#s. does not occ(r! 8o2e-er. ha-ing #rocesses *isten on 2e**6%no2n #orts is easy. 2ith the TP=Us arri-ing in the 2rong order. 8ere are three reasons! 0irst. a sing*e #rocess &ay estab*ish &(*ti#*e channe*s o$ co&&(nications! " sing*e #rocess I= 4#er #rocess5 as the destination identi$ier cannot be (sed to disting(ish bet2een these channe*s! Third. on*y #ac%et arri-a* e-ents are #ossib*e. " Bero6*ength &essage is recei-ed by the other side! It co(*d be (sed $or sig6na*ing end o$ $i*e! 12.

.. &i**ion bytes'sec! The *ine e$$iciency is then 26!/ Mb#s'1+++ Mb#s or 2!6 #ercent! 32. S(re! The ca**er 2o(*d ha-e to #ro-ide a** the needed in$or&ation.6 sa&#*es #er #ac%et! There are //. and 16J bytes. the screen catches (# 2ith the ty#ing! Peo#*e &ay $ind this annoying! 28. The s(ccessi-e esti&ates are 2@!6.26bit $ie*d 2o(*d a*2ays ha-e to be (sed. E-en tho(gh the (ser is ty#ing at a (ni$or& s#eed.+ 2indo2s'sec. and a SAN is recei-ed. res#ecti-e*y! The ne7t one is 2/ JB and occ(rs a$ter /+ &sec! 29. 3(st as U=P is! 23. so T<P has to be #re#ared to reasse&b*e the #arts o$ a &essage #ro#er*y! 21. b(t there is no reason RTP co(*d not be in the %erne*. E-en tho(gh each datagra& arri-es intact. 2here it is (sed in the second and third &essages o$ the three62ay handsha%e! 25.!. so 2ith 2. i$ necessary ac%no2*edg6ing a byte that had a*ready ac%no2*edged! In short. The entire T<P seg&ent &(st $it in the 6.26bit $ie*d is (sed! B(t i$ it 2ere not there.. The $irst b(rsts contain 2J. )5 is the on*y #ossib*e connection bet2een those t2o #orts! 32 PROBLEM SOLUTIONS 0OR <8"PTER 6 24. it #*ays a cr(cia* ro*e d(ring connection estab*ish&ent.++6byte $ra&es'sec! The T<P o-erhead is 2+ bytes! The IP . 6+ 1. the .?6 bytes in tota*! 20. J.6byte #ay*oad $ie*d o$ an IP #ac%et! Since the T<P header is a &ini&(& o$ 2+ bytes.1++ sa&#*es'sec.. 41.6! 31. and then a** o$ a s(dden.19. Each sa&#*e occ(#ies / bytes! This gi-es a tota* o$ 2. One 2ay starts o(t 2ith a LISTEN!I$aSAN is recei-ed. &a%ing the de$a(*t . The de$a(*t seg&ent is . the SAN +ECD state is a*so entered! 27. The AC: bit is (sed to te** 2hether the .6 or 1?2 #ac%ets to trans&it one secondGs 2orth o$ &(sic! 22.. $or a &a7i&(& data rate o$ abo(t . it 2i** be JB! 30.6 bytes! T<P adds 2+ bytes and so does IP.1./@. bytes are *e$t $or T<P data! 26. #5 P 42.?@1. No! " connection is identi$ied on*y by its soc%ets! Th(s.. /J. the #rotoco* enters the SAN +ECD state! The other 2ay starts 2hen a #rocess tries to do an acti-e o#en and sends a SAN! I$ the other side 2as o#ening too. 2@!2. it ta%es //1++'2.6 sa&#*es'#ac%et. /. One 2indo2 can be sent e-ery 2+ &sec! This gi-es . The ne7t trans&ission 2i** be 1 &a7i&(& seg&ent siBe! Then 2.. the characters 2i** be echoed in b(rsts! The (ser &ay hit se-era* %eys 2ith nothing a##earing on the screen.2 bytes in 12+ sec or . The goa* is to send 2 .. and ! So a$ter $o(r s(ccesses. 2@! /.@/ #ay*oad bytes'sec! This is 2. it is not abso*(te*y essen6tia* $or nor&a* data tra$$ic! 8o2e-er. on*y 6. it is #ossib*e that datagra&s arri-e in the 2rong order.

JB. then 2e ha-e 1@2B =2 C1+ −/ sec! The data rate. e-en at ?. " sender &ay not send &ore than 2. the de*ay is 1++ 9sec one 2ay and 2++ 9sec ro(nd tri#! " 16JB #ac%et has 1@2 bits! I$ the ti&e to send 1@2 bits and get the ac%no2*edge&ent is 2++ 9sec. <o&#(te the a-erage> 42?+.62!. the $act that there are nine #ac%ets is 3(st d(e to good *(c%! 39.? MB! " 166bit 2indo2 siBe &eans a sender can send at &ost 6/ JB be$ore ha-ing to 2ait $or an ac%no2*edge&ent! This &eans that a sender cannot trans&it con6 tin(o(s*y 33 . is then abo(t /+ Mb#s! 41. each byte re)(ires . JB. Tb#s trans&itter (ses (# se)(ence s#ace at a rate o$ @!.+++. and the 0IN co(*d a*so be s#*it into t2o se#arate #ac%ets! Th(s. Pac%et @. 1/B.66 bytes &(st be sent! I$ 2e are to send 2.. The siBe o$ the se)(ence s#ace is 2 6/ bytes. 2ee%s to 2ra# aro(nd. C12 C bits. 425 12.+'11!?2 or . i!e!. the trans&ission and #ro#agation de*ays are e)(a*! I$ B is the bit ti&e.+++ C1 &sec5'1. yo( get 11!?2 ti&es as &any #er second. JB.+++ C+ N ?. 4. 6+ $ra&es o$ 1. C1+ 12 se)(ence n(&bers #er second! It ta%es 2 &i**ion seconds to 2ra# aro(nd! Since there are 6. Aith a #ac%et 11!?2 ti&es s&a**er.66 bytes e-ery second. 2.+ 9sec! PROBLEM SOLUTIONS 0OR <8"PTER 6 35. The s#eed o$ *ight in $iber and co##er is abo(t 2++ %&'&sec! 0or a 2+6%& *ine. so each #ac%et on*y gets 62. 2hich ac%no2*edges the re#*y./++ seconds in a day. The ans2er are> 415 1 !?... nsec o$ <PU ti&e $or co#ying! The syste& is th(s ca#ab*e o$ hand*e 2++ MB'sec or 16++ Mb#s! It can hand*e a 16. going to 6/ bits is *i%e*y to 2or% $or )(ite a 2hi*e! 37.?. instr(ctions! 40.+ sec! The data rate is th(s no &ore than !?+/ %b#s! 34. 2e 2o(*d ha-e 1+ #ac%ets in the se)(ence! "*ter6 nati-e*y. 1. TP=Us. Qes! Pac%et 6 ac%no2*edges both the re)(est and the 0IN! I$ each one 2ere ac%no2*edged se#arate*y.+. 2hich is abo(t 2 C1+ 1@ bytes! " ?.5 .b#s *ine i$ no other bott*enec% is #resent! 36. 2e need a *ine o$ 2@@ Mb#s! Aith any6 thing $aster than this 2e r(n the ris% o$ t2o di$$erent T<P seg&ents ha-ing the sa&e se)(ence n(&ber at the sa&e ti&e! 33. it 2i** ta%e o-er . It ta%es / C1+ =/+ instr(ctions to co#y bytes! 0orty instr(ctions ta%es /+ nsec! Th(s.+++! It ta%es ?. RP< has a #rob*e& i$ the re#*y does not $it in one #ac%et! 38. 4/5 1!@..++ bytes o$ #ay*oad. in . RP< o-er U=P ta%es on*y t2o #ac%ets instead o$ three! 8o2e-er.o-erhead is 2+ bytes! The Ethernet o-erhead is 26 bytes! This &eans that $or 1. Tb#s! " &a7i&(& #ac%et *i$eti&e o$ *ess than . 2ee%s 2i** #re-ent the #rob*e&! In short..

it can be on t2o se#arate net6 2or%s. There are ob-io(s*y &any a##roaches! One is to t(rn the to#6*e-e* ser-er into a ser-er $ar&! "nother is to ha-e 26 se#arate ser-ers. and so on! 0or so&e #eriod o$ ti&e 4say. They are the =NS na&e. It &eans> &y *i#s are sea*ed! It is (sed in res#onse to a re)(est to %ee# a secret! 5. and the other ha*$ 4e!g!. abo(t ha*$ the 2or*d 2rites the gi-en na&es $irst. This is &(ch &ore co&#*icated than yo( &ight thin%! To start 2ith. the o*d one co(*d contin(e to o#erate to gi-e #eo#*e a chance to ada#t their so$t2are! 10. one $or na&es begin6 ning 2ith a. so 2ith a . as in Eohn -on Ne(&ann! Then there are #eo#*e 2ho ha-e a &idd*e initia*. b(t no &idd*e na&e! Dari6 o(s tit*es. Pro$!. it ta%es 22. T.(sing T<P and %ee# the #i#e $(** i$ the net2or% techno*ogy (sed is Ethernet.n*! It is rea**y 3(st a shorthand notation $or -02b0a#. in 0ig! ?6.6 bytes! The standard re)(ires this! Th(s. or STS6.++*! 4.*$ co(*d ha-e the sa&e IP address! Th(s. and so on ha-e to be . the IP address.?.. It be*ongs to the en-e*o#e beca(se the de*i-ery syste& needs to %no2 its -a*(e to hand*e e6&ai* that cannot be de*i-ered! 11. Ms!. s(ch as Mr!.<bank. III.+++ bytes! Aith #ac%ets o$ 1. and the Ethernet address! 2. Qes! In $act.n(. it needs t2o IP addresses! 8. so Er!. a** =NS na&es $it in a sing*e &ini&(&6 *ength #ac%et! 7.c$. ID. The #rob*e& does not occ(r! =NS na&es &*$# be shorter than 2. Sr!. it 3(st &a%es the re)(est again! No har& is done! 6.. The ro(nd6tri# de*ay is abo(t ./+ &sec. one $or b. It is #ossib*e! 222. Miss. =NS is ide&#otent! O#erations can be re#eated 2itho(t har&! Ahen a #ro6 cess &a%es a =NS re)(est.+ #ac%ets! 34 PROBLEM SOLUTIONS 0OR <8"PTER ? SOLUTIONS TO CHAPTER 7 PROBLEMS 1. an entry (nder c0& and (nder one o$ the co(ntry do&ains is certain*y #ossib*e 4and co&&on5! 9.+. Its IP address starts 2ith 1. a*tho(gh the *atter &ight ha-e se-era* #arts. years5 a$ter introd(cing the ne2 ser-ers.+ Mb#s channe* the band2idth6#rod(ct de*ay is 2? &egabits or . #*(s a $a&i*y na&e. so it is on a c*ass B net2or%! See <ha#! . Mrs!.<bank. <hina and Ea#an5 do it the other 2ay! " na&ing syste& 2o(*d ha-e to disting(ish an arbitrary n(&ber o$ gi-en na&es. or Lord.c0& and 222. 2e see an e7a&#*e o$ a d(#*icate IP address! Re&e&ber that an IP address consists o$ a net2or% n(&ber and a host n(&ber! I$ a &achine has t2o Ethernet cards. It is not an abso*(te na&e. can #re$i7 the na&e! Peo#*e co&e in generations.! 42. it starts a ti&er! I$ the ti&er e7#ires. .+ #ac%ets to $i** the #i#e. $or the IP address &a##ing! 3. and i$ so. so the 2indo2 sho(*d be at *east 22..3*.c$. =r!. $o**o2ed by the $a&i*y na&e..3*. b(t re*ati-e to .la-=.

So&e e7a&#*es and #ossib*e he*#ers are a##*ication'&se7ce*4E7ce*5. the &essage trans$er agent has to chec% 2hether a -acation dae&on is set (# to res#ond to the inco&ing e6&ai*. Ph!=!. H00.2 <Rs and . $or e7a&#*e! By no2 2e sho(*d be ab*e to #*ease e-en the *earned> Pro$! =r! "bigai* Barbara <ynthia =oris E! de Dries III. The base 6/ encoding 2i** brea% the &essage into 1+2/ (nits o$ . so a** e)(a* signs a*2ays start esca#e se)(ences!*(ded! So&e #eo#*e (se their acade&ic tit*es in their na&es. this se)(ence 2i** be &ista%6 en*y inter#reted as an esca#e se)(ence! The so*(tion is to encode the e)(a* sign itse*$. and other degrees! 0ina**y. i&age'ti$$ 4any gra#hics #re-ie2er5.$$a=. no &ore canned re#*ies 2i** be sent! 18. It is doab*e and re*ati-e*y si&#*e! Ahen inco&ing e6&ai* arri-es. 0irst one is any se)(ence o$ one or &ore s#aces and'or tabs! Second one is any se)(ence o$ one or &ore s#aces and'or tabs and'or bac%s#aces s(b3ect to the condition that the net res(*t o$ a##*ying a** the bac%s#aces sti** *ea-es at *east one s#ace or tab o-er! 19. $or a tota* o$ /+@6 bytes! I$ these are then bro%en (# into *ines o$ + bytes. the SMTP dae&on that acce#ts it has to *oo% (# the *ogin na&e in the +CP" "> &es6 sage! There is certain*y a $i*e or database 2here these na&es are *ocated! That $i*e co(*d be e7tended to ha-e a*iases o$ the $or& FF E**en!EohnsonGG that #oint to the #ersonGs &ai*bo7! Then e6&ai* can a*2ays be sent (sing the #ersonGs act(a* na&e! 13. Qes.2 s(ch *ines 2i** be needed. M!Sc!. there are #eo#*e 2ho inc*(de certain a2ards and honors in their na&e! " 0e**o2 o$ the Roya* Society in Eng*and &ight a##end 0RS. M!"!. bytes each! Each o$ these 2i** be encoded as / bytes. The &essage sent 3(st be$ore *ogo(t 2i** generate a canned re#*y! Its arri-a* 2i** a*so generate a canned re#*y! "ss(&ing each &achine *ogs e6&ai* addresses to 2hich it has a*ready res#onded./.x#. 0RS 12. (se the &. so 2e need PROBLEM SOLUTIONS 0OR <8"PTER ? B!"!. Ph!=!.2 L0s! The tota* *ength 2i** then be /2++ bytes! 14. send an ans2er! The (ser trans$er agent cannot do this beca(se it 2i** not e-en be 35 .-nal<b0%( s(bty#e and 3(st send the URL o$ the $i*e instead o$ the act(a* $i*e! 17. a(dio'&idi 4MI=I so(nd5. and i$ so. The act(a* re#*ies ha-e to be done by the &essage trans$er agent! Ahen an SMTP connection co&es in. a##*ication'##t 4Po2erPoint5.4I(ic%Ti&e #*ayer5! 16. I$ a se)(ence beginning 2ith an e)(a* sign and $o**o2ed by t2o he7adeci&a* digits ha##ens to a##ear in the te7t. adding . -ideo'76d. . B!Sc!. e!g!.

4a5 There are on*y 1/ ann(a* ca*endars. It 2o(*d be 1a hre$HThtt#>''222!ac&!orgTL "<M 1aL ! 35. then the te7t gi-en in A. the te7t &ay be dis#*ayed! 33. de#ending on the day o$ the 2ee% on 2hich 1 Ean(ary $a**s and 2hether the year is a *ea# year! Th(s. 8ere is one 2ay to do it! <html> <head> <title> INTERBURGER </title> </head> <body> <h1> Interburger’s order form </h1> <form action="http://interburger.php" method="post"> <p> Please enter first number: <input type="text" name="first"> </p> <p> Please enter second number: <input type="text" name="second"> </p> <input type="submit"> </form> </body> </html> The P8P scri#t that does the #rocessing *oo%s *i%e this> <html> <head> <title> Addition </title> </head> <body> The sum is <?PHP echo $first + $second. I$ the (ser has t(rned o$$ the a(to&atic dis#*aying o$ i&ages or i$ i&ages can6not be dis#*ayed $or so&e other reason. " hy#er*in% consists o$ 1a hre$HT!!!TL and 1'aL! In bet2een the& is the c*ic%6ab*e te7t! It is a*so #ossib*e to #(t an i&age here! 0or e7a&#*e> 1a hre$HThtt#>''222!abcd!co&'$ooTL 1i&g srcHThtt#>''222!abcd!co&'i&'i&2TL 1'aL 37 34." is dis#*ayed instead o$ the i&age! "*" method=POST> <p> Name <input name="customer" size=46> </p> <p> Street Address <input name="address" size=40> </p> <p> City <input name="city" size=20> </p> Burger size Gigantic <input name="size" type=radio value="gigantic"> Immense <input name="size" type=radio value="immense"> Cheese <input name="cheese" type=checkbox> <p> <input type=submit value="submit order"> </p> </form> </body> </html> (nti* the (ser co&es bac% $ro& -acation! PROBLEM SOLUTIONS 0OR <8"PTER ? 32. ?> </body> </html> 38 PROBLEM SOLUTIONS 0OR <8"PTER ? 37. a Ea-aScri#t #rogra& co(*d easi*y contain a** 1/ ca*endars and a s&a** database o$ 2hich . i$ the &o(se ho-ers o-er the i&age. The #age that dis#*ays the $or& *oo%s *i%e this> <html> <head> <title> Adder </title> </head> <body> <form action="action.

open().++ *ines o$ 8TML! The de*ay is essentia**y the sa&e in both cases beca(se 8TML $i*es are so s&a**! I&age $i*es are *arge. No! In the s#orts case. var has 3 factors = 0.value). if (has 3 factors > 0) document. } </script> </head> <body> <form name="myform"> Please enter a number: <input type="text" name="number"> <input type="button" value="compute primality" onclick="response(this.close().form)"> </form> </body> </html> <*ear*y.writeln(number. Most *i%e*y 8TML #ages change &ore o$ten than EPE. document. " is not a prime"). " is a prime").writeln(number. if (has 3 factors == 0) document. this can be i&#ro-ed in -ario(s 2ays. so not ha-ing to send one is a big 2in! 41.+/ &essage and getting . it is %no2n days in ad-ance that there 2i** be a big cro2d at the Aeb site and re#*icas can be constr(cted a** o-er the #*ace! The essence o$ a $*ash cro2d is that it is (ne7#ected! There 2as a big cro2d at the 0*orida Aeb site b(t not at the Io2a or Minnesota sites! Nobody co(*d ha-e #redicted this in ad-ance! 39 . b(t Ea-aScri#t is $aster! 38. b(t it 2o(*d be s*o2er! 4b5 This re)(ires a *arge database! It &(st be done on the ser-er by (sing P8P! 4c5 Both 2or%. $i*es! Lots o$ sites $idd*e 2ith their 8TML a** the ti&e. var number = eval(test 3 form.year gets 2hich ca*endar! " P8P scri#t co(*d a*so be (sed.writeln("</body> </html>"). var limit = Math.html HTTP/1.1 Host: www. while (n++ < limit) if (number % n == 0) has 3 factors = 1. The co&&ands sent are as $o**o2s> Note the b*an% *ine at the end! It is &andatory! There are ob-io(s*y &any #ossib*e so*(tions! 8ere is one! <html> <head> <title> JavaScript test </title> </head> <script language="javascript" type="text/javascript"> function response(test 3 form) { var n = 2.number. document.writeln("<html> <body>"). document. b(t do not change the i&ages &(ch! B(t the e$$ecti-eness re*ates to not on*y the hit rate b(t a*so the #ayo$$! There is not &(ch di$$erence bet2een getting a . b(t these re)(ire a bit &ore %no2*edge o$ Ea-aScri#t! PROBLEM SOLUTIONS 0OR <8"PTER ? GET / 39. document.

there is no ob3ection to s#ending . the syste& has to 2ait (nti* 1+ &sec (nti* it can send the sa&#*es $or the $irst .+.+++ &ost co&&on 2ords a 166bit code and 3(st trans&it the code! The ter&ina* 2o(*d a(to&atica**y add a s#ace bet2een 2ords! Aords not in the *ist. it 2i** a*so 2or%! I$ the ca**ee is behind a $ire2a** that 2i** not *et U=P #ac%ets o(t.?1/ sec o$ a(dio. and +!. 2o(*d be s#e**ed o(t in "S<II! Using this sche&e. the #ercent errors are 2 .+ bytes $ro& the to#. there are no #rob*e&s at a**! I$ the ca**er is behind a $ire2a** and the $ire2a** is not #ic%y abo(t 2hat *ea-es the site.25 $or i $ro& 1 to .+++ 2o(*d be sa$er! 49. and 1+ #ercent. In theory it co(*d be (sed. . . &sec! 50. S(re! The ISP goes to a n(&ber o$ content #ro-iders and gets their #er&is6sion to re#*icate the content on the ISPGs site! The content #ro-ider &ight e-en #ay $or this! The disad-antage is that it is a *ot o$ 2or% $or the ISP to contact &any content #ro-iders! It is easier to *et a <=N do this! 43. so there is no need $or co&#ression and it is not (sed! 46. "(dio needs 1!/ Mb#s. &in(tes to encode a .6! They are re#resented as +!2.++.+..1. res#ecti-e*y! Th(s. a$ter . the error 2i** contin(e to #ro#agate (nti* the ne7t I6$ra&e! . 2hich is 1?. the high62ater &ar% sho(*d be at *east 62. The n(&ber o$ bits'sec is 3(st ++ C6++ C/+ C or 1. . $or e7a&#*e! Pages that are generated dyna&ica**y are not s(itab*e! 44.+6MB de-ice.! N(&erica**y. It introd(ces e7tra de*ay! In the straight$or2ard sche&e. It de#ends! I$ the ca**er is not behind a $ire2a** and the ca**ee is at a reg(*ar te*e#hone. b(t on*y i$ a chi# e7isted that co(*d do the co&#ression on the $*y 2ith a de*ay o$ aro(nd 1 &sec! 48. JB'sec! On a 6..+++ to be sa$e! Si&i*ar*y. these sines are +!1@. &ost 2ords 2o(*d ta%e 2 bytes. and +!. +!. the $irst #ac%et can be sent! In this sche&e.42. say..+. res#ec6 ti-e*y! 40 PROBLEM SOLUTIONS 0OR <8"PTER ? 47. The tr(e -a*(es are sin42 i '.!6 Mb#s! 52. it 2i** not 2or%! 51.+ &sec to get a #a(se co&&and to the ser-er. It ta%es . $ar *ess than trans&itting the& character by character! Other sche&es &ight in-o*-e (sing 6bit codes $or the &ost co&&on 2ords and *onger codes $or *ess $re)(ent codes 4#ri&iti-e 8($$&an coding5! 45. &sec ha-e e*a#sed. so the *o262ater &ar% sho(*d be 2ay abo-e 62. #robab*y . there is roo& $or . b(t Internet te*e#hony is rea* ti&e! 0or &(sic. +!. It is a bad idea i$ the content changes ra#id*y! Pages $(** o$ (#6to6the second s#orts res(*ts or stoc% )(otes are not good candidates. it 2o(*d be #ossib*e to assign the 6. 2hich is 3(st o-er an ho(r! <=s are ne-er &ore than an ho(r *ong.++.+ bytes 2i** arri-e. Each Ea#anese %an3i 42ord5 has been assigned a n(&ber! There are abo(t 2+.+++ o$ the& in Unicode! 0or an a**6Eng*ish syste&. b(t. that 2o(*d not 2or%! Psychoaco(stic co&#ression co(*d 2or% $or te*e#hony..6&in(te song! 0or rea*6ti&e s#eech. in 2hich ti&e 62..+. Qes! "n error in an I6$ra&e 2i** ca(se errors in the reconstr(ction o$ s(bse6)(ent P6$ra&es and B6$ra&es! In $act.

>-=aniBa#i0n by "! S! Tanenba(&! 3. 2e get ?!/ 6'@!? ! Th(s.+++ is 1/ 1 +1/ 2 +1/ .: o$ the bits she #(ts on the $iber 2i** be 2rong! BobGs one6ti&e #ad 2i** th(s be ?. in 1 bit ti&e. abo(t +!?6/ o$ a** re)(ests 2i** be to &o-ies on &agnetic dis%! Note2orthy is that Ui#$Gs *a2 i&#*ies that a s(bstantia* a&o(nt o$ the distri6 b(tion is in the tai*. the ser-er o(t6#(ts 2++. +1/ / +!!! +1/ 1+++ 3333333333333333333333333333333333 beca(se the <s cance* o(t! E-a*(ating this n(&erica**y. The #*ainte7t is> a digita* co&#(ter is a &achine that can so*-e #rob*e&s $or #eo#*e by carrying o(t instr(ctions gi-en to it! 0ro& S#-*c#*-. co&#ared.. I$ the intr(der had in$inite co&#(ting #o2er. the re)(ired band2idth is 1.&o-ies is gi-en by C/1 +C/2 +C/.@/ Mb#s each. It is> 1+11111 ++++1++ 111++++ 1+11+11 1++1+++ 11+++1+ +++1+11 ++1+111 1++11+1 111++++ 11+111+ 4. O<612 connections is not a s&a** &achine! 54. 8a*$ the ti&e Tr(dy 2i** g(ess right! "** those bits 2i** be regenerated correct*y! The other ha*$ she 2i** g(ess 2rong and send rando& bits to Bob! 8a*$ o$ these 2i** be 2rong! Th(s. a bit ta%es 1+ −11 sec to be trans&itted! Aith the s#eed o$ *ight being 2 C1+ &eters'sec. the *ight #(*se achie-es a *ength o$ 2 && or 2+++ &icrons! Since a #hoton is abo(t 1 &icron in *ength. 2ith a SPE ca#acity o$ .b#s.++ &o-ies at / Mb#s each.++ &o-ies at once! I$ the ser-er has to trans&it .00kin= 5la$$ 4T2eed*ed(& and T2eed*edee5! 2.53.+++ &o-ies #er &onth or abo(t 66++ #er day! I$ ha*$ o$ these are at P!M!. it 2i** s*o2 the intr(der do2n! . the second one is better! It $orces the intr(der to do a co&#(tation to see i$ each %ey tried is correct! I$ this co&#(tation is e7#en6 si-e. at *east 2. +C// +!!! +C/Th(s. "t 1++ . b(t since that is not the case. . say.: right and 2. 2. the ser-er &(st hand*e abo(t .. 2e are no2here near one #hoton #er bit e-en at 1++ .. the ti&e has co&e the 2a*r(s said to ta*% o$ &any things o$ shoes and shi#s and sea*ing 2a7 o$ cabbages and %ings and 2hy the sea is boi*ing hot and 2hether #igs ha-e 2ings b(t 2ait a bit the oysters cried be$ore 2e ha-e o(r chat $or so&e o$ (s are o(t o$ breath and a** o$ (s are $at no h(rry said the car#enter they than%ed hi& &(ch $or that 0ro& "h-0*=h #h. +1/ / +!!! +1/ 1++++ 1/ 1 +1/ 2 +1/ . to e7#onentia* decay! PROBLEM SOLUTIONS 0OR <8"PTER 41 SOLUTIONS TO CHAPTER 8 PROBLEMS 1.% C0&p*#.b#s! Using O<612 connections.. the ratio o$ the $irst 1+++ to the $irst 1+. The $raction o$ a** re$erences to the $irst . Aith 1++.!2 . connections 2i** be needed! " &achine ser-ing . they 2o(*d be the sa&e.b#s! On*y at 2++ Tb#s do 2e achie-e 1 bit #er #hoton! 5. the #(*se is 2+++ #hotons *ong! Th(s.++ &o-ies si&(*taneo(s*y o-er 2.: 2rong! 6.+++ c(sto&ers each getting t2o &o-ies #er &onth.

1. e-ery #*ainte7t b*oc% starting at P i +1 2i** be 2rong no2. the n(&ber o$ ato&s in a** the stars in the (ni-erse is abo(t 1+ ?? ! Th(s.6+. since a** the in#(ts to the VOR bo7es 2i** be 2rong! " $ra&ing error is th(s &(ch &ore serio(s than an in-erted bit! 13.6 =1+ n ! Ta%ing co&&on *ogarith&s. 1?. <i#her b*oc% chaining #rod(ces bytes o$ o(t#(t #er encry#tion! <i#her $eedbac% &ode #rod(ces 1 byte o$ o(t#(t #er encry#tion! Th(s. 1?.. n 15! 0rances notices n 2 =n 1! 0rances no2 can .C. then ? . gra&s! The s(n is &ade &ost*y o$ hydrogen and the n(&ber o$ ato&s in 1 gra& o$ hydrogen is abo(t 6 C1+ 2. and MooreGs *a2 &ay not con6 tin(e $or ?. . &od . The e)(ation 2 n =1+ 1.. =1 &od . =1+6. the n(&ber o$ 2. satis$ies the e)(ation 1. 2?. 1. a ty#ica* star. res#ecti-e*y! 15. 1/. so 2e &(st choose % to be re*ati-e*y #ri&e to 6+! Possib*e -a*(es are> ?. te**s (s n. C H 1. *og 2 1+ or n =. ?21. one bit 2i** be 2rong in b*oc% P i +1 ! 8o2e-er.7. a** s(bse)(ent #*ainte7t b*oc%s 2i** be correct! " sing*e bit error th(s on*y a$$ects t2o #*ainte7t b*oc%s! 12. 2ith the sa&e n(&ber o$ cyc*es yo( can encry#t eight ti&es as &(ch #*ainte7t5! 14.6 *og 2. etc! I$ the #*ainte7t is i**ega*. To encry#t P 2e (se the $(nction C =P . the n(&ber o$ do(b*ing #eriods needed! So*-ing. Qes! " contig(o(s se)(ence o$ P6bo7es can be re#*aced by a sing*e P6bo7! Si&i*ar*y $or S6bo7es! 8. try the ne7t %ey! 9. B =6+. &(st be . =ES &i7es the bits #retty thoro(gh*y. 1.66bit %ey. 4c5 Aith these #ara&eters. etc! =i-iding each o$ these in t(rn by ? to see 2hich is di-isib*e by ?. 2hich is ?. The e)(ation 2e need to so*-e is 2 2. 2e $ind that ?21'? H 1+. @. 0or P H 1 to 1+. 11. Un$ort(nate*y. years! E(st b(i*ding that &achine is )(ite a 2ay o$$. decry#t the $irst ci#herte7t b*oc%! I$ the res(*t6ing #*ainte7t is *ega*. 4a5 0or these #ara&eters. 1//1. and 1@! 4b5 I$ .+ do(b*ing #eriods. 1+ 1. . . and 1+. 1.6 by br(te $orce is not *i%e*y to ha##en any ti&e soon! 11.61.1. so a sing*e bit error in b*oc% C i 2i** co&#*ete*y garb*e b*oc% P i ! In addition. try the ne7t b*oc%.? ! Aith 1+ 2+ stars. =6. is 2 C1+ .. 2e get n =2. hence . 0or each #ossib*e . &ore years! 42 PROBLEM SOLUTIONS 0OR <8"PTER 10. so there are abo(t 1+ 2+ stars in the (ni-erse! The &ass o$ the s(n. Maria sho(*d consider changing her %eys! This is beca(se it is re*ati-e*y easy $or 0rances to $ig(re o(t MariaGs #ri-ate %ey as $o**o2s! 0rances %no2s MariaGs #(b*ic %ey is (. so n =??! The n(&ber o$ %eys is th(s 1+ ?? ! The n(&ber o$ stars in o(r ga*a7y is abo(t 1+ 12 and the n(&ber o$ ga*a7ies is abo(t 1+ . 2e get n =1. 4"-ogadroGs n(&ber5! So the n(&ber o$ ato&s in the s(n is abo(t 1!2 C1+ .66bit "ES %eys is e)(a* to the n(&ber o$ ato&s in the 2ho*e (ni-erse 4ignoring the dar% &atter5! <onc*(sion> brea%ing "ES62... ci#her b*oc% chaining is eight ti&es &ore e$$icient 4i!e!.

bac%s#ace. Tr(dy can try to re#*ay the &ost recent &essage to Bob. the 3e2e*er 2i** be ab*e to #rod(ce a signed contract sho2ing that he did! 20. a*ong 2ith a con6 tract signing (# Sa& as a #ornogra#hy or ga&b*ing c(sto&er! I$ Sa& 3(st signs b*ind*y 2itho(t noticing that the contract and signat(re do not &atch. n 15 by si&#*y en(&erating di$$erent so*(tions o$ the e)(ation % 1 ×. there is no2 a danger that i$ a re)(est is 2ritten to dis% $o*6 *o2ed short*y by a crash. the re)(est is ne-er carried o(t! 18. and the #ro6 babi*ity that they ha-e di$$erent birthdays is . 1 =1 &0%n 1! 16. and interchanging s#aces and tabs can a*so be (sed! 22. then the #ro6 babi*ity that one or &ore #airs ha-e the sa&e birthday is abo(t +!/+6! 21. It is doab*e! "*ice encry#ts a nonce 2ith the shared %ey and sends it to Bob! Bob sends bac% a &essage encry#ted 2ith the shared %ey containing the . say. No! The sec(rity is based on ha-ing a strong cry#to a*gorith& and a *ong %ey! The 8@ is not rea**y essentia*! The %ey is 2hat &atters! 17. b(t a** 2i** ha-e di$$erent &essage digests.g(ess MariaGs #ri-ate %ey4% 1.6. The secretary can #ic% so&e n(&ber 4e!g!.@/. ho#ing that he 2i** not see that it is a d(#*icate! One so*(tion is $or Bob to 2rite the + A o$ e-ery inco&ing PROBLEM SOLUTIONS 0OR <8"PTER 43 &essage to dis% b. indicates that he 2ants to b(y so&e #ornogra6#hy. ga&b*e. 2hen Bob a##*ies "*iceGs #(b*ic %ey to the sig6nat(re. adding s#aces at the end o$ *ines.. he 2i** get so&ething that is not the &essage digest o$ the #*ainte7t! Tr(dy can #(t in a $a*se &essage and she can hash it.6. Ahen a c(sto&er. I$ Tr(dy re#*aces both #arts. or 2hate-er.25 s#aces in the *etter.!0-. the Ma$ia $or2ard the signat(re to the 3e2e*er. Aith 2+ st(dents. s#ace! Ahen -ie2ed on the ter6&ina*. so the birthday attac% sti** 2or%s! "*ternati-e*y.51@+ ! This n(&ber is abo(t +!. and #oten6tia**y re#*ace each one by s#ace. 2ho then shi#s the& the dia6 &ond! I$ Sa& *ater c*ai&s he did not order a dia&ond. . b(t she cannot sign it 2ith "*iceGs #ri-ate %ey! 19. the Ma$ia order a dia&ond on Sa&Gs credit card $ro& a 3e2e*er! Ahen the 3e2e*er sends a contract to be signed 4#res(&ab*y inc*(ding the credit card n(&ber and a Ma$ia #ost o$$ice bo7 as address5. doing the 2or%! In this case.! The #robabi*ity that a** 1@+ #airs ha-e di$$erent birthdays is th(s 4. a** -ariants 2i** *oo% a*i%e. there are 42+ C1@)/ 2 =1@+ #airs o$ st(dents! The #robabi*6ity that the st(dents in any #air ha-e the sa&e birthday is 1'. Sa&. The + A s $ro& the *ast &essage &ay sti** be in R"M! I$ this is *ost.@/! I$ the #robabi*ity that a** #airs are &is&atches is +!.6/'.6.6 4/ . the re#*ay attac% 2i** not 2or%! 8o2e-er. the Ma$ia $or2ards the hash o$ the 3e2e*erGs &essage to Sa&.

. a** -ariants 2i** *oo% a*i%e. or 2hate-er. the Ma$ia $or2ards the hash o$ the 3e2e*erGs &essage to Sa&. so the birthday attac% sti** 2or%s! "*ternati-e*y. I$ Tr(dy re#*aces both #arts.6/'. The secretary can #ic% so&e n(&ber 4e!g!. the Ma$ia order a dia&ond on Sa&Gs credit card $ro& a 3e2e*er! Ahen the 3e2e*er sends a contract to be signed 4#res(&ab*y inc*(ding the credit card n(&ber and a Ma$ia #ost o$$ice bo7 as address5.@/.6 4/ . 2ho then shi#s the& the dia6 &ond! I$ Sa& *ater c*ai&s he did not order a dia&ond. and the #ro6 babi*ity that they ha-e di$$erent birthdays is . 2hen Bob a##*ies "*iceGs #(b*ic %ey to the sig6nat(re. say. she is con-inced that it is Bob! PROBLEM SOLUTIONS 0OR <8"PTER &essage to dis% b. there are 42+ C1@)/ 2 =1@+ #airs o$ st(dents! The #robabi*6ity that the st(dents in any #air ha-e the sa&e birthday is 1'.@/! I$ the #robabi*ity that a** #airs are &is&atches is +!. 2hen decry#ted it 2i** not contain "*iceGs nonce! To co&#*ete the #rotoco*. Ste# 1 is to -eri$y the V!.6. she no2 has BobGs #(b*ic %ey. the 3e2e*er 2i** be ab*e to #rod(ce a signed contract sho2ing that he did! 20.25 s#aces in the *etter.nonce. there is no2 a danger that i$ a re)(est is 2ritten to dis% $o*6 *o2ed short*y by a crash.6. then the #ro6 babi*ity that one or &ore #airs ha-e the sa&e birthday is abo(t +!/+6! 21. "*ice sends bac% BobGs nonce encry#ted 2ith BobGs #(b*ic %ey! 23. indicates that he 2ants to b(y so&e #ornogra6#hy. a*tho(gh she sho(*d chec% the <RL i$ there is one! B(t to see i$ it is Bob on the other end o$ the connection. doing the 2or%! In this case. the re#*ay attac% 2i** not 2or%! 8o2e-er. ga&b*e. he 2i** get so&ething that is not the &essage digest o$ the #*ainte7t! Tr(dy can #(t in a $a*se &essage and she can hash it. she needs to %no2 i$ Bob has the corres#onding #ri-ate %ey! She #ic%s a nonce and sends it to hi& 2ith his #(b*ic %ey! I$ Bob can send it bac% in #*ainte7t.6. adding s#aces at the end o$ *ines.!0-. Aith 2+ st(dents. the re)(est is ne-er carried o(t! 18.! The #robabi*ity that a** 1@+ #airs ha-e di$$erent birthdays is th(s 4. b(t a** 2i** ha-e di$$erent &essage digests. Ahen a c(sto&er. s#ace! Ahen -ie2ed on the ter6&ina*. his o2n nonce.51@+ ! This n(&ber is abo(t +!. the Ma$ia $or2ard the signat(re to the 3e2e*er. and i$ she sends rando& 3(n%. and #oten6tia**y re#*ace each one by s#ace. b(t she cannot sign it 2ith "*iceGs #ri-ate %ey! 19.. Sa&. and the #(b*ic %ey! Tr(dy cannot $orge this &essage. a*ong 2ith a con6 tract signing (# Sa& as a #ornogra#hy or ga&b*ing c(sto&er! I$ Sa& 3(st signs b*ind*y 2itho(t noticing that the contract and signat(re do not &atch. bac%s#ace. and interchanging s#aces and tabs can a*so be (sed! 43 .+@ certi$icate (sing the root <"Gs #(b*ic %ey! I$ it is gen(ine.

I$ Ei& does not 2ant to re-ea* 2ho he is co&&(nicating 2ith to anyone 4inc*(ding his o2n syste& ad&inistrator. A is the root! "$ter this "*ice -eri$ies the #(b*ic %eys in re-erse order starting $ro& the certi$icate that E #ro-ided! In each ste# d(ring -eri$ication. r(ining the chec%s(&! "** #ac%ets 2i** be #ercei-ed as ha-ing errors! 26. then Ei& needs to (se additiona* sec(rity &echanis&s! Re&e&ber that DPN #ro-ides sec(rity $or co&&(nica6 tion on*y o-er the Internet 4o(tside the organiBation5! It does not #ro-ide any sec(rity $or co&&(nication inside the organiBation! I$ Ei& on*y 2ants to %ee# his co&&(nication sec(re $ro& #eo#*e o(tside the co&#any. she no2 has BobGs #(b*ic %ey. 2hich &ight be encry#ted. she needs to %no2 i$ Bob has the corres#onding #ri-ate %ey! She #ic%s a nonce and sends it to hi& 2ith his #(b*ic %ey! I$ Bob can send it bac% in #*ainte7t. and i$ she sends rando& 3(n%. Inco&ing tra$$ic &ight be ins#ected $or the #resence o$ -ir(ses! O(tgoing tra$$ic &ight be ins#ected to see i$ co&#any con$identia* in$or&ation is *ea%6 ing o(t! <hec%ing $or -ir(ses &ight 2or% i$ a good anti-ir(s #rogra& is (sed! <hec%ing o(tgoing tra$$ic. she is con-inced that it is Bob! 44 PROBLEM SOLUTIONS 0OR <8"PTER 24.+@ certi$icate (sing the root <"Gs #(b*ic %ey! I$ it is gen(ine. a*tho(gh she sho(*d chec% the <RL i$ there is one! B(t to see i$ it is Bob on the other end o$ the connection. Qes! S(##ose that Tr(dy VORs a rando& 2ord 2ith the start o$ the #ay*oad and then VORs the sa&e 2ord 2ith the chec%s(&! The chec%s(& 2i** sti** be correct! Th(s. and the #(b*ic %ey! Tr(dy cannot $orge this &essage. a DPN is s($$icient! 29. "*ice sends bac% BobGs nonce encry#ted 2ith BobGs #(b*ic %ey! 23. Ste# 1 is to -eri$y the V!. is near*y ho#e*ess against a serio(s atte&#t to *ea% in$or&ation! 28. It is doab*e! "*ice encry#ts a nonce 2ith the shared %ey and sends it to Bob! Bob sends bac% a &essage encry#ted 2ith the shared %ey containing the nonce. Tr(dy is ab*e to garb*e &essages and not ha-e the& be . his o2n nonce. a$ter -eri$y6 ing BobGs #(b*ic %ey. No! "8 in trans#ort &ode inc*(des the IP header in the chec%s(&! The N"T bo7 changes the so(rce address. (nti* she recei-es a certi$icate -eri$ying the #(b*ic %ey o$ a <" E signed by A and "*ice %no2s "Gs #(b*ic %ey! Note that this &ay contin(e (nti* a root is reached. 8M"<s are &(ch $aster co&#(tationa**y! 27. 2hen decry#ted it 2i** not contain "*iceGs nonce! To co&#*ete the #rotoco*. "*ice ens(res that she is indeed to ta*%ing to Bob (sing the sa&e &ethod as in the #re-io(s #rob*e&! 25. she re#eats the abo-e ste# 2ith Q! "*ice contin(es to do this. she a*so chec%s the <RL to &a%e s(re that the certi$icate #ro-ided ha-e not been re-o%ed! 0ina**y. 0irst "*ice estab*ishes a co&&(nication channe* 2ith D and as%s D $or a certi$icate to -eri$y his #(b*ic %ey! S(##ose D #ro-ides a certi$icate signed by another <" Q! I$ "*ice does not %no2 Q.22. that is.

Tr(dy can a*so gi-e! Under these circ(&stances. &od ?1@ =/+! "*ice %no2s that = ( &od n =. and it 2i** not be (sed again.S tic%et! So. she has the right %ey! "** this sche&e does is increase her 2or%*oad by a $actor o$ t2o! 35.S tic%et *i$eti&e e7#ires! I$ T. on*y those (sers that a*ready ha-e a ser-er tic%et 4obtained $ro& T.! 45 . The J=< needs so&e 2ay o$ te**ing 2ho sent the &essage. the *ess sent in #*ainte7t. There is nothing Bob %no2s that Tr(dy does not %no2! "ny res#onse Bob can gi-e. #(t + B inside the encry#ted &essage instead o$ o(tside it! In this 2ay. It is not essentia* to send + B encry#ted! Tr(dy has no 2ay o$ %no2ing it. No! "** Tr(dy has to do is ca#t(re t2o &essages $ro& or to the sa&e (ser! She can then try decry#ting both o$ those 2ith the sa&e %ey! I$ the rando& n(&ber $ie*d in both o$ the& is the sa&e.S be$ore it 2ent do2n5 $or a ser-er S 2i** be ab*e to access S (nti* their ser-er tic%et *i$eti&e e7#ires! In both cases. he does not %no2 the c(sto&erGs PIN code. Tr(dy 2i** not be ab*e to disco-er + B and the re$*ection attac% 2i** not 2or%! 31. 16 &od n =/+! The %ey is /+! The si&#*est 2ay to do the abo-e ca*c(*ations is to (se the UNIV bc #rogra&! PROBLEM SOLUTIONS 0OR <8"PTER 32.! She co&#(tes . so it is not rea**y secret! On the other hand. In &essage 2. get a T. no sec(rity -io*ation 2i** occ(r! 37. "*ice &ight as 2e** encry#t + B ! 38. 2hich then gi-es it to the card! The <PU on the card then trans$or&s it in a co&#*e7 2ay that de#ends on the PIN code ty#ed direct*y into the card! The res(*t o$ this trans$or&ation is gi-en to the &erchantGs co&#(ter $or trans&ission to the ban%! I$ the &erchant ca**s (# the ban% again to r(n another transaction.S tic%et 4obtained $ro& "S be$ore it 2ent do2n5 can contin(e to access the ser-ers (nti* their T.S goes do2n. and since the cost is so *o2 here. ne2 *egiti&ate (sers 2i** not be ab*e to a(thenticate the&6se*-es. they 2i** not be ab*e to access any ser-ers in the organiBation! Users that a*ready ha-e a T. that is. hence 2hich decry#tion %ey to a##*y to it! 34. The ban% sends a cha**enge 4a *ong rando& n(&ber5 to the &erchantGs co&6#(ter.detected beca(se she can &ani#(*ate the chec%s(& thro(gh the encry#tion! 30. I$ "S goes do2n. the ban% 2i** send a ne2 cha**enge./. The t2o rando& n(&bers are (sed $or di$$erent #(r#oses! + A is (sed to con6-ince "*ice she is ta*%ing to the J=<! + A 2 is (sed to con-ince "*ice she is ta*%ing to Bob *ater! Both are needed! 36. since it is ty#ed direct*y into the card! The on6card dis#*ay is needed to #re-ent the &erchant $ro& dis#*aying> FF P(rchase #rice is /@!@. the better. 2hy gi-e Tr(dy $ree in$or&ation abo(t BobGs rando& n(&ber generatorO In genera*. it is i&#ossib*e $or "*ice to te** i$ she is ta*%ing to Bob or to Tr(dy! 33. Bob %no2s that = x &od n =1@1! 8e co&#(tes 1@1 1./. doing it this 2ay a**o2s a tryo(t o$ : S to &a%e do(b*y s(re that it is a** right be$ore sending data! "*so. bingo.GG b(t te**ing the ban% it is /@@!@. so $(** %no2*edge o$ the o*d one is 2orth*ess! E-en i$ the &erchant %no2s the a*gorith& (sed by the s&art cards.

"*ice co(*d hash each &essage and sign it 2ith her #ri-ate %ey! Then she co(*d a##end the signed hash and her #(b*ic %ey to the &essage! Peo#*e co(*d co&#are -eri$y the signat(re and co&#are the #(b*ic %ey to the one "*ice (sed *ast ti&e! I$ Tr(dy tried to i&#ersonate "*ice and a##ended "*iceGs #(b*ic %ey. e7ce#t that Tr(dy a*so %no2s the ti&e! VORing the rando& n(&ber 2ith the ti&e and a*so 2ith the n(&ber o$ *oo%(#s the ser-er has done in the #ast &in(te 4so&ething Tr(dy does not %no25 and then ta%ing the S8"61 hash o$ this is &(ch better! The tro(b*e here is that S8"61 ta%es a nontri-ia* a&o(nt o$ ti&e and =NS has to be $ast! 43. i$ Tr(dy %no2s one I=.#-*%(<#h. so the a*gorith& (sed $or I= generation is #(b*ic! I$ it is a rando& n(&ber generator.-. No! S(##ose the address 2as a &ai*ing *ist! Each #erson 2o(*d ha-e his or her o2n #(b*ic %ey! Encry#ting the I=E" %ey 2ith 3(st one #(b*ic %ey 2o(*d not 2or%! It 2o(*d ha-e to be encry#ted 2ith &(*ti#*e #(b*ic %eys! 41. it con-erts the #*ainte7t into 3(n%. In ste# .. she can easi*y ca*c(*ate the ne7t one! I$ the rando& n(&ber generated by the a*gorith& is VORed 2ith the ti&e. The =NS code is #(b*ic.s re)(ire ro(gh*y 1 MB #er &in(te.@12 bytes in the *o26order bits! MP. she 2o(*d not be ab*e to get the hash right! I$ she (sed her o2n #(b*ic %ey.c0& and it is ne-er s(#6#*ied! It 2o(*d be better to s(##*y the IP address to be *ess cons#ic(o(s! The res(*t sho(*d be &ar%ed as (ncacheab*e so the tric% can be (sed *ater i$ neces6sary! 42. that FF eGG is the &ost co&&on *etter in Eng*ish te7t5! In e$$ect. The nonces g(ard against re#*ay attac%s! Since each #arty contrib(tes to the %ey. that &a%es it *ess #redictab*e. i$ an intr(der tries to re#*ay o*d &essages. (sing rando& I=s hard*y he*#s at a**! By (sing the sa&e s#oo$ing attac% as sho2n in the te7t. #eo#*e 2o(*d see it 2as not the sa&e as *ast ti&e! . Easy! M(sic is 3(st a $i*e! It does not &atter 2hat is in the $i*e! There is roo& $or 2@/.39. b(t &ore i&#ortant. it a*so 2i#es o(t the $re6)(ency in$or&ation containined in the #*ainte7t 4e!g!. so abo(t 1 sec o$ &(sic co(*d $it! 45. <o&#ression sa-es band2idth. the ISP as%s $or 222. the ne2 %ey generated 2i** not &atch the o*d one! 44. increasing the a&o(nt o$ 2or% the cry#tana*yst &(st do to brea% the &essage! 46 PROBLEM SOLUTIONS 0OR <8"PTER 40. Tr(dy can *earn the c(rrent 4rando&5 I=! Since rando& n(&ber generators are co&#*ete*y deter6 &inistic.<in#-*%.