Homework Chapter 4
- 格式:doc
- 大小:232.00 KB
- 文档页数:4
《Computer Networks and Internet》
1 Homework Chapter 4
1. In the text we have used the term connection-oriented service to describe a
transport-layer service and connection service for a network-layer service. Why
the subtle shades in terminology?
(地址空洞)2. Consider a datagram network using 32-bit host addresses. Suppose a
router has four links, numbered 0 through 3, and packets are to be forwarded to
the link interfaces as follows:
Destination Address Range Link Interface
11100000 00000000 00000000 00000000
through 0
11100000 00111111 11111111 11111111
11100000 01000000 00000000 00000000
through 1
11100000 01000000 11111111 11111111
11100000 01000001 00000000 00000000
through 2
11100001 01111111 11111111 11111111
otherwise 3
a. Provide a forwarding table that has four entries, uses longest prefix matching, and
forwards packets to the correct link interfaces.
b. Describe how your forwarding table determines the appropriate link interface for
datagrams with destination addresses:
11001000 10010001 01010001 01010101
11100001 01000000 11000011 00111100
11100001 10000000 00010001 01110111
3. Consider a datagram network using 8-bit host addresses. Suppose a router uses
longest prefix matching and has the following forwarding table:
For each of the four interfaces, give the associated range of destination host addresses
and the number of addresses in the range.
4. Consider sending a 2400-byte datagram into a link that has an MTU of 700 bytes.
Suppose the original datagram is stamped with the identification number 422. 《Computer Networks and Internet》
2 How many fragments are generated? What are the values in the various fields in
the IP datagram(s) generated related to fragmentation?
5. Suppose datagrams are limited to 1500 bytes (including header) between source
Host A and destination Host B. Assuming a 20-byte IP header, how many
datagrams would be required to send an MP3 consisting of 5 million bytes?
Explain how you computed your answer.
6. Consider the network setup in following Figure. Suppose that the ISP instead
assigns the router the address 24.34.112.235 and that the network address of the
home network is 192.168.1/24.
a. Assign addresses to all interfaces in the home network.
b. Suppose each host has two ongoing TCP connections, all to port 80 at host
128.119.40.86. Provide the six corresponding entries in the NAT translation table.
7. As a possible congestion control mechanism in a network using virtual circuits
internally, a router could refrain from acknowledging a received packet until (1) it
knows its last transmission along the virtual circuit was received successfully and
(2) it has a free buffer. For simplicity, assume that the routers use a stop-and-wait
protocol and that each virtual circuit has one buffer dedicated to it for each
direction of traffic. If it takes T sec to transmit a packet (data or acknowledgement)
and there are n routers on the path, what is the rate at which packets are delivered
to the destination host? Assume that transmission errors are rare and that the
host-router connection is infinitely fast. Let time be slotted in units of T sec.
8. A datagram network 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 the source router, which is connected to the destination router, and 《Computer Networks and Internet》
3 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
a. hops a packet makes per transmission?
b. transmissions a packet makes?
c. hops required per received packet?
9. What is the maximum bandwidth at which an IP host can send 576-byte packets
without having the Ident field wrap around within 60 seconds? Suppose that IP’s
maximum segment lifetime (MSL) is 60 seconds; that is, delayed packets can
arrive up to 60 seconds late but no later. What might happen if this bandwidth
were exceeded?
10. Consider the following network. With the indicated link costs, use Dijkstra’s
shortest-path algorithm to compute the shortest path from x to all network nodes.
And compute the shortest path from t to all network nodes. Show how the
algorithm works by computing a table.
Answer:
Step N’ D(t),p(t) D(u),p(u) D(v),p(v) D(w),p(w) D(y),p(y) D(z),p(z)
0 x
1
2
3
4
5
6
Step N’ D(x), p(x) D(u),p(u) D(v),p(v) D(w),p(w) D(y),p(y) D(z),p(z)
0 t
1