Professional Documents
Culture Documents
Homework of Chapter 5-Computer Networks
Homework of Chapter 5-Computer Networks
6. Consider the topology network of Fig. 5-12(a) (ignore the link weight). Distance vector
routing is used, and the following vectors have just come in to router C: from B: (5,0,8,12,6,2);
from D: (16,12,6,0,9,10); from E: (7,6,3,9,0,4). The cost of the links from C to B, D and E are 6, 3
and 5, respectively. What is C’s new routing table? ( Give both the outgoing line to use and the
cost.)
Answer:
7+5=1
To A 5+6=11 16+3=19 11 B
2
6+5=1
To B 0+6=6 12+3=15 6 B
1
To 9+5=1
12+6=18 0+3=3 3 D
D 4
8. In fig.5-13 the boolean OR of the two sets of ACF bits are 111 in every row. Is this just an
accident here , or does it hold for all networks under all circumstances?
Answer:
It always holds. If a packet has arrived on a line, it must be acknowledged. If no packet has
arrived on a line, it must be sent there. The cases 00 (has not arrived and will not be sent) and
11 (has arrived and will be sent back) are logically incorrect and thus do not exist.
30. Assume there are large number of consecutive IP Addresses available starting from
198.16.0.0. Suppose four organizations A,B,C and D apply for 4000, 2000, 4000, and 8000 IP
addresses, respectively. Please assign IP addresses for them. Show the scheme in the w.x.y.z/s
notation and give the first and last IP address assigned.
Answer:
30. To start with, all the requests are rounded up to a power of two. The starting
31. The router has been allocated four new IP Address blocks: 57.6.96.0/21; 57.6.104.0/21;
57.6.112.0/21; 57.6.120.0/21. If all of them go through the same outgoing line, can they be
aggregated? And how to do?
Answer:
31.
128 64 32 16 8 4 2 1
57.6.96.0/21 0 1 1 0 0 x x x
57.6.104.0/2 0 1 1 0 1 x x x
1
57.6.112.0/2 0 1 1 1 0 x x x
1
57.6.120.0/2 0 1 1 1 1 x x x
1
default Router 2
How will the router deal with the packet with the following IP destination Address?
(4) 192.53.40.7
Answer:
(a) Interface 1
(b) Interface 0
(c) Router 2
(d) Router 1
(e) Router 2
Supplement:
Answer:
What (information) Routing table (all network and Link state (LSP, only neighbor
cost and next hop) list and cost)
2. IP packet’s total length is 3820 bytes, its data part is 3800bytes (fixed header=20bytes).
Assume next link only support 1420 bytes of data. Ask how to frament IP packet? Show the
fields of IHL, ID, DF, MF, OFFSET in the IP header.
Answer:
IHL ID MF DF OFFSET
Orignal IP packet 3820 12345 0 0 0
IP fragment 1 1420 12345 1 0 0
IP fragment 2 1420 12345 1 0 175
IP fragment 3 1020 12345 0 0 350