Computernetwoektext
Computernetwoektext
txt
…
cse123A Computer Networks Fall 99 Final
-------------------------------------------
ANSWER KEY
-----------
Name:(please print)
ucsd id No.
Write your answers in the space indicated and provided for with each
question.
Write legibly. Avoid Overwriting. Write with pen only. Do not write
on the reverse side.
Keep rough work separate and do not submit it. Rough work not
evaluated. For rough work separate blank sheets are provided.
2 3 11 4 21 2 31 10
3 9 12 6 22 2 32 4
4 5 13 2 23 1 33 2
5 3 14 2 24 1+2 34 3
6a 1 15 2 25 1
6b 2 16 2 26 3
7 15 17 2 27 3
8 1 18 1 28 1
9 2 19 2 29 1
----------------------------------------------------------------------
PAGE 1
Question 1:
Answer:
1 of 9 07/04/23, 09:33
Firefox https://cseweb.ucsd.edu/classes/fa99/cse123A/webkey.txt
---------------------------------------------------------------------------
Question 2:
Answer:
---------------------------------------------------------------------------
Question 3:
A datagram subnet allows routers to drop packets whenever they need to.
The probability of a router discarding a packet is p. Consider the case of
a source host connected to source router, which is connected to the
destination router, and then to the destination host. If either of the
routers discards a packet, the source host eventually times out and tries
again. If both host-router and router-router lines are counted as hops,
what is the mean number of
Answer: (a) Each packet may make 1, 2 or 3 hops. For 1 hop, the first
router drops it and the probability is p. For 2 hops, it goes through
first router but not the second and the probability is (1-p)p. For 3 hops,
it goes through both routers and the probability is (1-p)(1-p). Mean hops
per transmission is given by
(c) mean hops per packet = mean hops per transmission x mean number
of transmissions which is ( pxp - 3p + 3 ) / ((1-p) x (1-p))
--------------------------------------------------------------------------
Question 4:
Answer: The total number of packets needed is z/p. The total of data+header
works out to (p+h)z/p bits. The source takes (p+h)z/(pb) sec to transmit
this. The forwarding of the last packet by intermediate routers on the way
takes up (k-1)(p+h)/b sec. Adding up the two gives the time to clear the
full pipe (that is, from start at source of the first bit of first packet
to move out till the receipt of the last bit of the last packet at the
destination).
2 of 9 07/04/23, 09:33
Firefox https://cseweb.ucsd.edu/classes/fa99/cse123A/webkey.txt
we get p = sqrt((hz/(k-1))
---------------------------------------------------------------------------
Question 5:
full - 1, 1, 1
---------------------------------------------------------------------------
Question 6:
(a). The following data fragment occurs in the middle of a data stream
using character stuffing for frames. DLE STX A DLE B DLE ETX What is the
output after stuffing?
7 5
(b). What is the remainder obtained by dividing x + x + 1
3
by x + 1 ?
2
Answer: x + x + 1
---------------------------------------------------------------------------
Question 7:
For the network described in the table, give the routing table for each of
the nodes A, B, C, D, E, F. Shortest path (Dijkstra's)routing is used.
Router A A B C C D
Router C D E E F E
cost 3 8 2 1 6 2
Answer: Fill in the following table. Each entry is (hop, total distance)
If hop itself is destination mark it as *.
To: A B C D E F
--------------------------------------
From
3 of 9 07/04/23, 09:33
Firefox https://cseweb.ucsd.edu/classes/fa99/cse123A/webkey.txt
---------------------------------------------------------------------------
Question 8:
Give an example of a 4-bit error that will not be detected by two dimensional
parity. You may use the following as a hint.
0 1 0 1 0 0 1 |1
|
1 1 0 1 0 0 1 |0
|
1 0 1 1 1 1 0 |1
|
0 0 0 1 1 1 0 |1
|
0 1 1 0 1 0 0 |1
|
1 0 1 1 1 1 1 |0
|
---------------|
|
1 1 1 1 0 1 1 |0 <----- column parity bits
---------------------------------------------------------------------------
Question 9:
---------------------------------------------------------------------------
Question 10:
To provide more reliability than what single parity bit can give, an error
detecting code uses one parity bit for the odd numbered bits of a message
and a second parity bit for the even numbered bits of the message. What is
the Hamming distance of this code?
Answer: 2
---------------------------------------------------------------------------
Question 11:
4 of 9 07/04/23, 09:33
Firefox https://cseweb.ucsd.edu/classes/fa99/cse123A/webkey.txt
---------------------------------------------------------------------------
Question 12:
Frames of 1000 bits are sent over a 1 Mbps satellite channel - propagation
delay of 270 msec. Acks are always piggybacked. Headers are very short.
Three bit sequence numbers are used. What is the maximum achievable
channel utilization in frames per sec for (a) stop-and-wait protocol
(b) protocol with go-back-n and (c) protocol with selective-repeat ?
Answer:
At 1Mbps, 1000 bits take 1 msec (neglect headers). The round trip time for
a frame is 1+270++270+1 = 542 msec. (till ack is received by the sender).
(a) channel utilization is 1 frame in 542 msec = 1.85 frames per sec
(b) pipeline 7 frames (3 bit seq number) with roundtrip of 548 msec giving
channel utilization 7/548 = 12.77 frames per sec
---------------------------------------------------------------------------
Question 13:
In wired LANs, all stations can monitor the medium and detect collisions,
but not so in a wireless LAN. What are the two problems this gives rise to
in wireless LANs called?
Answer:
---------------------------------------------------------------------------
Question 14:
Answer: for a random time chosen from the interval [ 0, T x 2**k ], where
T is the worst case round trip propagation time for the channel.
---------------------------------------------------------------------------
Question 15:
Answer: If the RTSs do not collide, the two senders will both receive CTS
and go ahead. If the RTSs collide, they will not get CTS and will have to
try again using some randomised backoff.
---------------------------------------------------------------------------
Question 16:
Answer:
If the RTS is for it, it sends a CTS. Otherwise, it pauses for time
sufficient for a CTS to go to the sender (from some one else).
5 of 9 07/04/23, 09:33
Firefox https://cseweb.ucsd.edu/classes/fa99/cse123A/webkey.txt
---------------------------------------------------------------------------
Question 17:
Answer:
---------------------------------------------------------------------------
Question 18:
Answer:
---------------------------------------------------------------------------
Question 19:
Answer:
---------------------------------------------------------------------------
Question 20:
---------------------------------------------------------------------------
Question 21:
---------------------------------------------------------------------------
Question 22:
Tokens are added every 0.5 secs to a token bucket of capacity 500 bytes.
Each token is 100 bytes in size. (a) If a packet of size 400 bytes arrives
from the host when the bucket has tokens worth 200 bytes, and there are no
other packets queued for service, what is the least and most waiting the
packet will face before transmission?
6 of 9 07/04/23, 09:33
Firefox https://cseweb.ucsd.edu/classes/fa99/cse123A/webkey.txt
Answer:
---------------------------------------------------------------------------
Question 23:
Answer:
---------------------------------------------------------------------------
Question 24:
In a wireless LAN, (i) sender P who may send to Q can not hear R who may
also send to P. What is R called? (ii) Q sends to P and though R can send
to S without collision, it defers. Why? What is R called?
Answer:
Note: The question should read "R who may send to Q" and not
"R who may send to P" - this is a typo. Every one gets 1
mark.
(ii) R hears Q (but does not know it 'll not interfere for P) and defers.
--------------------------------------------------------------------------
Question 25:
---------------------------------------------------------------------------
Question 26:
What are the network number, subnet number and host number for IP address
135.194,192.100 and mask 255.255.128.0 ?
The mask selects the leftmost 17 bits which is gives just a 1-bit subnet
number; the subnet number is 1.
---------------------------------------------------------------------------
Question 27:
How many addresses are spanned by (that is, the maximum number of hosts in
the subnet) the CIDR address 205.12.192.0 with 20 bit subnet mask
255.255.240.0 ? What is the range spanned (give the low and high host
addresses)?
7 of 9 07/04/23, 09:33
Firefox https://cseweb.ucsd.edu/classes/fa99/cse123A/webkey.txt
---------------------------------------------------------------------------
Question 28:
Answer: False
---------------------------------------------------------------------------
Question 29:
What is the name of the technique used to reduce the size of routing
tables and the time for computing them?
---------------------------------------------------------------------------
Question 30:
Why does the Offset field in the IP header specify the offset in 8-byte
units?
Answer: The offset field is 13-bits long and an IP packet can have maximum
65536 bytes length (2**16). Possible values for offset are 0 to 65535 in
bytes and only with 8-byte units, this range can be specified in 13 bits.
---------------------------------------------------------------------------
Question 31:
A router has built up its routing table as given. The router can deliver
packets directly over interfaces 0 and 1, or can forward to routers R2,
R3 or R4. What does the router do with each of the packets (a) to (e) it
receives?
Routing Table:
128.96.40.0 255.255.255.128 R2
194.4.153.0 255.255.255.192 R3
default R4
Answer:
The router masks the destination address of packet with SubnetMask and
matches with SubnetNumber and accordingly sends the packet corresponding to
the matching entry in routing table. For no match, the packet is sent to
the default router.
(b) to R2
8 of 9 07/04/23, 09:33
Firefox https://cseweb.ucsd.edu/classes/fa99/cse123A/webkey.txt
---------------------------------------------------------------------------
Question 32:
Answer:
---------------------------------------------------------------------------
Question 33:
In token ring, what is token holding time? What purpose does it serve?
Answer:
Token holding time is the maximum time a station can use the token (when it
gets a free token) after which it must put out a free token for other
stations on the ring. It ensures that no station can monopolise the token
for long periods resulting in unbounded delays for other stations wanting
to transmit.
---------------------------------------------------------------------------
Question 34:
Name three functions of monitor in a token ring which make the token ring
robust.
Answer:
-------------------------------------------------------------------------------
END OF ANSWER KEY
------------------------------------------------------------------------------
9 of 9 07/04/23, 09:33