Solutions - People.vcu.edu

advertisement
1. Give a simple heuristic for finding two paths through a network from a given
source to destination that can survive the loss of any communication line. The
routers are considered reliable enough, so it is not necessarily to worry about the
possibility of router crashes.
a. Consider the router as a node and the communication line as an edge.
Then the problem is to find two edge disjoint paths from a source to
destination. Apply max flow algorithm with source as a source and
destination as a sink, all communication line has a unit value. If max flow
is more than 2, you can easily find the two paths. Please find max flow
algorithm from the book or web.
b. One may think that find a shortest path first and then delete all edges
belong to the shortest path, and then find another shortest path will solve
the problem. Most case that solves the problem. But consider the
following case. It fails even though there are two paths are available.
2. If delays are recorded as 8 bit numbers in a 100 router network, and delay vectors
are exchanged twice a second, how much bandwidth per (full-duplex) line is
chewed up by the distributed algorithm? Assume that each router has three lines
to other routers.
a. It really does not matter how many lines are connected to each router as
long as the line is dedicated line. It needs 8 bits information for each
router and there are 100 routers. Therefore the delay table size is 800bits
and the delay table should be delivered twice a second, meaning 1600 bits
per second of bandwidth in each direction is necessary.
3. Computer the multicast spanning tree four route C in the following subnet for a
group with members at routers A,B,C,D,E,F,I, and k
C
B
D
F
E
A
M
K
N
G
J
H
L
I
a. One of many possible answer is as follow;
31
0
1
29
2
28
3
0,1
27
26
25
5
2
6
Node
Identifie
r
24
4
4
4
7
3
2,3
2,3
23
8
22
IP
su a d
cc d r
es . o
so f
r
30
Actual
Node
st
ar
t
4. Consider the following Chord circle. Suppose that node 10 suddenly go on line.
Does this affect node 1’s finger table, and if so, how?
2
3
5
9
17
4
4
7
12
20
Node 1's
finger
table
5
6
8
12
20
7
7
12
12
20
Node 4's
finger
table
13
14
16
20
28
15
15
20
20
1
Node 12's
finger
table
9
21
10
20
11
2,3
19
12
18
13
17
16
15
14
a. The 4th entry should be changed from 12 to 10. start = 1 + 23 = 9 and the
IP address of successor becomes 10 instead of 12.
5.
A datagram subnet allows router to drop packets whenever they need to. The
probability of 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
connected as hops, what is the mean number of
a. Hops a packet makes per transmission?
It can go 1, 2, 3 hops with probability of p, (1-p)p, and (1-p)(1-p). The
average is p + 2(1-p)p+3(1-p)(1-p) = p2-3p+3
b. Transmissions a packet makes?
To be successfully transmitted, it should have (1-p)2 eventually. So the
transmission a packet makes will be 1(1-p)2 +2(1-(1-p)2 )(1-p)2+3(1-(1p)2) (1-p)2+ … = 1/(1-p)2
c. Hops required per received packet?
(p2-3p+3) * (1/(1-p)2) = (p2-3p+3)/ (1-p)2
6. The byte counting variant of the leaky bucket algorithm is used in a particular
system. The rule is that one 1024 byte packet, or two 512 byte packets, etc., may
be sent on each tick. Give a serious restriction of the system that was not
mentioned in the text.
a. If it wants to send a packet of size 2k for example, it can not.
7. A router has just received the following new IP addresses: 57.0.96.0/21,
57.6.105.0/21, 57.6.112.0/21, and 57.6.120.0/21. If all of them use the same
outgoing line, can they be aggregated? If so, to what? If not, why not?
a. 57.0.96.0/21 = 57.6.01100000.00000000
57.6.105.0/21 = 57.6.01101001.00000000
57.6.112.0/21 = 57.6.01110000.00000000
57.6.120.0/21 = 57.6.01111000.00000000
Without 57.0.96.0/21, I can say “yes” to 57.6.96.0/19.
With it, 57.0.0.0/8 if no other IP starts with 57.x.x.x and means to use
other outgoing line.
8. Consider the effect of using slow start on a line with a 10 msec round trip time
and no congestion. The receiver window is 24K and the maximum segment size is
2KB. How long does it take before the first full window can be sent?
a. It sends out 2KB first, and 4KB on receiving ack, (then 8KB, 16KB then
min(32KB,24KB), meaning it needs 4 round trip time. i.e. 40ms.
9. A client sends a 128 byte request to a server located 100km away over a l gigabit
optical fiber.
a. What is the efficiency of the line during the remote procedure call?
b. Compute the minimum possible response time both for given 1 Gbps line
and for a 1Mbps line. What conclusion can you drive?
c. 128*8 = 1Kbit, meaning it will takes 1K/1G sec using optical fiber.
Considering the fact that the speed of light is 200km/s, it will takes, 1
msec rrt, meaning the efficiency is about 0.1 %.
d. If we use 1M line with pipelined manner, the best possible reposne time
would be 2 ms, 1msec to send, 0.5ms delay for last bit to be received,
0.5ms to get ack. The performance of 1Mlin is twice slower than the 1G
optical lines. If it is worthy, one can use it.
10. A CPU executes instructions at the rate of 1000MIPS. Data can be copied 64 bits
at a time. With each word copied costing 10 instructions. If a coming packet has
to be copied four times, can this system handle a 1 G bps line? For simplicity,
assume all instructions, even those instructions that read or write memory, run at
the full 1000MIPS rate.
a. It can copy 100M number of 64 bits per second, meaning it can copy
1600M bits per second.( note we need to 4 copies per packet). In other
words, it can copy 1.6G bits/sec. So it can handle 1G bps line if there is no
other bottleneck.
Download