Computer Network Final Exam 2005 answer 1. What are the differences between routing and forwarding?

Please briefly explain each of them. (5%) ns: forwarding: mo!e pac"ets from router#s input to appropriate router output. routing: determine route ta"en by pac"ets from source to destination. $. %uring normal &P pac"et forwarding at a router' which the following pac"et fields are
updated? ($%)

Ans:
(c)(() (d)chec"sum

*. +outing lgorithm ,onsider the networ" topology shown below. (he topology consists of multiple routers interconnected by lin"s. -ach lin" has a static cost associated with it which represents the cost of sending data o!er that lin". x 3 y 10 z 2 s 1 5 1 m 2

2 n 1 3 7 u

a. Please use %i."stra#s shortest/path algorithm to compute the shortest path from y to all networ" nodes. 0how your wor" by computing a table similar to tables below. Ans: N’ D(x) D(m), D(z), D(n), D(s), D(u),p ,p(x p(m) p(z) p(n) p(s) (u) ) y ym ymx ymxn ymxns ymxnsz 3,y 2,m 1,y 10,y 6,m 6,m 5,n 5,n 5,n Inf 3,m 3,m inf Inf inf 4,n Inf inf Inf 10,n 7,s

When the lin" cost between x and y changes.ymxnszu b. 2or the following figure (a)' please show why good news (cost change from * to 1) tra!el fast' and for figure (b)' please show why bad news (cost change from * to 34) tra!el slowly. router periodically broadcasts routing information to all other routers in the 0' not . Please describe how the routing table of x changes with time. (14%) 1 3 x y 1 z x 90 3 y 1 z 80 80 2ig (a)5 6ood news tra!el fast 2ig (b)5 7ad news tra!el slowly 8. . (his routing information sent by a router has one entry for each of the router#s neighbors: the entry gi!es the distance from the router to the neighbor. What is the difference between )in"/)ayer and (ransport/)ayer reliable data transfers? (.onsider the %istance 1ector lgorithm.(5%) Ans: OSPF uses Link state algorithm . 5. Use Distance Vector Algorithm. = lin" layer reliable deli!ery ser!ice is often used for lin"s that are prone to high error rates' such as a wireless lin"' with the goal of correcting an error locally>on the lin" where .int5 With the (. RIP ad!ertisement sent by a router contains information about all the networ"s in the 0' although this information is only sent to its neighboring routers. .ust to its neighboring routers.ompare and contrast the ad!ertisements used by +&P and 90P2.P reliable data transfer' why does the underlying lin" layer support data transmission reliability?) (5%) Ans: 0imilar to transport <layer reliable deli!ery ser!ice' a lin" layer reliable deli!ery ser!ice is achie!ed with ac"nowledgements and retransmissions.

(14%) Ans: Pure )9.0M I. Please list its ad!antages (8%) and compare it with slotted )9. (課本 P. Please deri!e the maximum efficiency 0(-P/7@/0(-P.0M . ' pure )9.ollision probability increases5 2rame sent at t4 collides with other frames sent in Ct4/1't4D1E P(success by gi!en node) F P(node transmits) .the error occurs>rather than forcing an end/to/end retransmission of the data by transport or application/layer protocol. (?%)共(14%) . 0uppose that in pure )9.  Anslotted loha5 simpler' no synchroniBation  When frame first arri!es' transmit immediately  . . -ach node transmits in a slot with probability p. (1/p)G/1 .% as its protocol instead of others. P(no other node transmits in Cp4/1'p4E Fp . and . (1/p)G/1F E ( p ) = Np(1 − p ) $ ( N −1) choosing optimum p and then letting n /H inftyF 1I($e) E ( p ) = Np (1 − p ) $ ( N −1) (?%) E J ( p ) = N (1 − p ) $ ( N −$ ) − Np $( N −1)(1 − p ) $ ( N −*) = N (1 − p ) $ ( N −*) ((1 − p ) − p $( N −1)) 1 $N −1 E J ( p ) = 4 ⇒ pK = E ( pK) = N 1 (1 − ) $ ( N −1) $ N −1 $ N −1 N →∞ lim E ( pK) = 1 1 1 ⋅ = (8%) $ e $e L. P(no other node transmits in Cp4/1'p4E . Why -thernet chooses . 2ind the maximum efficiency of pure )9. ' there are N acti!e nodes with many frames to send.8$1) ?.

uman analogy5 don#t interrupt othersN  colliding transmissions aborted' reducing channel wastage (1%)  (he same with .0M I. %u)s S*itches an+ Routers a.% but only detection but when collision happens' it can not handle it. Please briefly describe the sameness and differences between switches and routers. (.(5%) Ans: .Ans: S!A" D # ollision Detection$  collisions detected within short time  colliding transmissions aborted' reducing channel wastage  collision detection5  easy in wired ) Gs5 measure signal strengths' compare transmitted' recei!ed signals  human analogy5 the polite con!ersationalist ALO%A  unslotted loha5 simpler' no synchroniBation  when frame first arri!es transmit immediately  collision probability increases5 frame sent at t4 collides with other frames sent in Ct4/1't4D1E KKKmaximum efficiency: 1 $e and e!en worse= S&ALO%A Pros  single acti!e node can continuously transmit at full rate of channel(1%)  highly decentraliBed5 only slots in nodes need to be in sync  simple ons  collisions' wasting slots  idle slots  cloc" synchroniBation KKKefficiency: 1 (1%) e S!A arrier Sense !ulti'le Access ($%) &f channel sensed idle5 transmit entire frame &f channel sensed busy' defer transmission .

+.0ameness:(hey are both store/and/forward de!ices. code:1411 14.ow can you sol!e it?Please describe the details.+. (5%) Ans: . &n a single segment' the maximum node and its hub is 144 meters. . the LA/ segments )elong to the same collision +omain. ll of the transmitting nodes will enter exponential bac"off. &f a host was shut down and replaced its networ" interface card' it will cause the inconsistency of +P caches in the other hosts in the same ) G. All o. (5%) Ans: A collision *ill ha''en i. code for message 141141114411 with the generator 14411. What is a collision domain? (Please associated it with switches and hubs). no+e recei-es t*o or more signals at the same time. Ans: .ilters 'ackets2  same/) G/segment frames not usually forwarded onto other ) G segments 333segments )ecome se'arate collision +omains 3. . 0hene-er t*o or more no+es on the LA/ segments transmit at the same time1 there *ill )e a collision.et*een the hu) an+ the hosts that connect to the hu). +outers maintain routing tables' implement routing algorithms 0witches maintain switch tables' implement filtering' learning algorithms b. %ifferences:7ut routers are networ" layer de!ices (examine networ" layer headers) and switches are lin" layer de!ices. &ndi!idual segment collision domains become one large collision domain and bandwidth can not be aggregated S*itch installation )reaks su)net into LA/ segments  s*itch . Ase module $ arithmetic to compute the .

Please list the characteristics of wireless lin"? (5%) Ans:課本 P.g. address pac"et,藉以 !新的值值 " 11.-789:.B) shared by other de!ices (e.ects ground' arri!ing at destination at slightly different times 3456. address mappings for some ) G nodes5 Q &P address: M . address 的對應,other host in the same )en 可將 +P tables 中的值值 改掉; 值 等 other host#s +P table (() timeout 後,重新對 host 發出 Ruery 詢問 &PIM .ormation that times out #goes a*ay$ unless re.ormation )ecomes ol+ #times out$  so.an mo!e ) G card from one ) G to another S&P hierarchical address G9( portable %epends on &P subnet to which node is attached 1$.t state2 in.' $.<=>?@AB . address: (()H  (() ((ime (o )i!e)5 time after which address mapping will be forgotten (typically $4 min) 4ach a+a'ter on LA/ has uni5ue LA/ a++ress an+ A caches #sa-es$ IP&to& !A a++ress 'air in its ARP ta)le until in. What#s the main deference between M .  4ach IP no+e #%ost1 Router$ on LA/ has ARP ta)le +P (able5 &PIM .54T  %ecreased signal strength5 radio signal attenuates as it propagates through matter (path loss) #$%&'()*  &nterference from other sources5 standardiBed wireless networ" freRuencies (e.reshe+ (he host 重新連上 networ" 後,向所有人發出 broadcast 的 +P pac"et,include &PIM .g.8 6.' phone): de!ices (motors) interfere as well +. flat address and &P hierarchical address?(*%) ns: SM . flat address ➜ portability .-./%0 share 12  Multipath propagation5 radio signal reflects off ob.ARP:A++ress Resolution Protocol  is Oplug/and/playP5  Godes create their +P tables without inter!ention from net administrator.

%) $ .%? (14%) Ans: I444 (67.T4$.(0 in response to +(0  +(0 heard by all nodes Ksender transmits data frame Kother stations defer transmissions Avoid data frame collisions completely using small reservation packets! . Why &--.U' increase random bac"off inter!al' repeat $ T4$.11 recei!er / if frame recei!ed 9U return .0M I.0M I.88 !A Protocol2 S!A" A  !oid collisions5 $D nodes transmitting at same time T4$.%.0M I.115 .0M I.U needed due to hidden terminal problem) !oiding collisions (more) idea: allow sender to Oreser!eP channel rather than random access of data frames5 a!oid collisions of long data frames  sender first transmits small reRuest/to/send (+(0) pac"ets to 70 using . Please compare .(ollision) (!oidance) T4$. with .11 uses .11 sender 1.0M I.0M  +(0s may still collide with each other (but they#re short)  70 broadcasts clear/to/send .115 no collision detectionN  difficult to recei!e (sense collisions) when transmitting due to wea" recei!ed signals (fading)  can#t sense all collisions in any case5 hidden terminal' fading  goal5 avoid collisions: .U after SIFS ( . instead of .if sense channel busy then start random bac"off time timer counts down while channel idle transmit when timer expires if no .mobile portable CDEF 1*. if sense channel idle for DIFS then transmit entire frame (no .0M / sense before transmitting' don#t collide with ongoing transmission by other node T4$.

% + . Please compare mobility support !ia %irect +outing with that !ia &ndirect +outing. 的z{JK wireless |}的~•,J€•‚ƒ中€„% …`†‡%…ˆw†‡‰ collision is hard to detect,{Š有 signal fading and hidden terminal problem,{‹\Œy .0M I.0M I. V\N detection g hN collision a!oidance,J sense ! idle 後,3ijk random bac"off time 以 lm collision 的發n,%o可`ST^W`所有的 data,`p]後qr%s ac",以tuv的有w!" T4$. GHIJK,-LM3N sensing,OP sense idle Q3 RST,UVW等XYZ["\H]IJK:.%" 18.% N^ collision detection _ST`a?bcd,e有 collision fb中[,.0M I.0M I.0M I.11 xy .0M I.ollision A-oi+ance2 R9S& 9S exchange . (5%) Ans: Let end-systems handle it: indirect routing communication from correspondent to mobile goes through home agent' then forwarded to remote direct routing correspondent gets foreign address of mobile' sends directly to mobile In+irect routing !o)ile uses t*o a++resses2  permanent address5 used by correspondent (hence mobile location is transparent to correspondent)  care/of/address5 used by home agent to forward datagrams to mobile 2oreign agent functions may be done by mobile itself (riangle routing5 correspondent/home/networ"/mobile  inefficient when correspondent' mobile are in same networ" Su''ose mo)ile user mo-es to another net*ork  registers with new foreign agent  new foreign agent registers with home agent  home agent update care/of/address for mobile .

oreign net*orks trans'arent2 on going connections can !e maintained!  Direct routing O-ercome triangle routing 'ro)lem  non/transparent to correspondent5 correspondent must get care/of/address from home agent  &f mobile changes !isited networ" ccommodating mobility with direct routing  anchor foreign agent5 2 in first !isited networ"  data always routed first to anchor 2  when mobile mo!es5 new 2 arranges to ha!e data forwarded from old 2 (chaining) .pac"ets continue to be forwarded to mobile (but with new care/of/ address) mo)ility1 changing .

Sign up to vote on this title
UsefulNot useful