You are on page 1of 21

Chapter 4: P4 P10 P19 P26 P28 P38 P46 P49

Chapter 5: P6 P15 P18 P22 P26 P29

Chapter 7: P19 P21

P4. Consider the network below.


a. Suppose that this network is a datagram network. Show the forwarding
table in router A, such that all traffic destined to host H3 is forwarded
through interface 3.
b. Suppose that this network is a datagram network. Can you write down a
forwarding table in router A, such that all traffic from H1 destined to host
H3 is forwarded through interface 3, while all traffic from H2 destined to
host H3 is forwarded through interface 4? (Hint: this is a trick question.)

c. Now suppose that this network is a virtual circuit network and that there is
one ongoing call between H1 and H3, and another ongoing call between
H2 and H3. Write down a forwarding table in router A, such that all traffic
from H1 destined to host H3 is forwarded through interface 3, while all
traffic from H2 destined to host H3 is forwarded through interface 4.
d. Assuming the same scenario as (c), write down the forwarding tables in
nodes B, C, and D
.

P10. 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 five 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
Chapter 4: P4 P10 P19

P19. 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. How many fragments are generated? What are the
values in the various fields in the IP datagram(s) generated related to

fragmentation?

The maximum size of data field in each fragment = 680 (because there are 20 bytes IP header).
Thus the number of required fragments [2400 − 20 / 680 ] = 4
Each fragment will have Identification number 422. Each fragment except the last one will be of
size 700 bytes (including IP header). The last datagram will be of size 360 bytes (including IP
header). The offsets of the 4 fragments will be 0, 85, 170, 255. Each of the first 3 fragments will

have flag=1; the last fragment will have flag=0.

P26
P26. 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. Show how the algorithm works by computing a table similar to

Table 4.3.

P28 P28. Consider the network shown below, and assume that each node initially
knows the costs to each of its neighbors. Consider the distance-vector algorithm and show
the distance table entries at node z.
P38 P37. Consider the network shown below. Suppose AS3 and AS2 are running OSPF
for their intra-AS routing protocol. Suppose AS1 and AS4 are running RIP
for their intra-AS routing protocol. Suppose eBGP and iBGP are used for the
inter-AS routing protocol. Initially suppose there is no physical link between

AS2 and AS4.


a. Router 3c learns about prefix x from which routing protocol: OSPF, RIP,
eBGP, or iBGP?
b. Router 3a learns about x from which routing protocol?
c. Router 1c learns about x from which routing protocol?

d. Router 1d learns about x from which routing protocol?

a. eBGP
b. iBGP
c. eBGP
d. iBGP

P38. Referring to the previous problem, once router 1d learns about x it will put an

entry (x, I) in its forwarding table.


a. Will I be equal to I1 or I2 for this entry? Explain why in one sentence.
b. Now suppose that there is a physical link between AS2 and AS4, shown by
the dotted line. Suppose router 1d learns that x is accessible via AS2 as
well as via AS3. Will I be set to I1 or I2? Explain why in one sentence.
c. Now suppose there is another AS, called AS5, which lies on the path
between AS2 and AS4 (not shown in diagram). Suppose router 1d learns
that x is accessible via AS2 AS5 AS4 as well as via AS3 AS4. Will I be set

to I1 or I2? Explain why in one sentence.

a. I1 because this interface begins the least cost path from 1d towards the gateway router

1c.

b. I2. Both routes have equal AS-PATH length but I2 begins the path that has the closest

NEXT-HOP router.
c. I1. I1 begins the path that has the shortest AS-PATH.

P46 P46. Consider the operation of the reverse path forwarding (RPF) algorithm in Figure
4.44. Using the same topology, find a set of paths from all nodes to the source
node A (and indicate these paths in a graph using thicker-shaded lines as in Figure
4.44) such that if these paths were the least-cost paths, then node B would receive a copy of
A’s broadcast message from nodes A, C, and D under RPF.
P49 P49. Consider the topology shown in Figure 4.46, and suppose that each link has
unit cost. Suppose node C is chosen as the center in a center-based multicast
routing algorithm. Assuming that each attached router uses its least-cost path
to node C to send join messages to C, draw the resulting center-based routing tree. Is the re-
sulting tree a minimum-cost tree? Justify your answer.
Chapter 5:

P6 P6. Consider the previous problem, but suppose that D has the value
a. 1001010101.
b. 0101101010.

c. 1010100000.

P15

P15. Consider Figure 5.33. Now we replace the router between subnets 1 and 2
with a switch S1, and label the router between subnets 2 and 3 as R1.
a. Consider sending an IP datagram from Host E to Host F. Will Host E ask
router R1 to help forward the datagram? Why? In the Ethernet frame containing
the IP datagram, what are the source and destination IP and MAC
addresses?

b. Suppose E would like to send an IP datagram to B, and assume that E’s


ARP cache does not contain B’s MAC address. Will E perform an ARP
query to find B’s MAC address? Why? In the Ethernet frame (containing
the IP datagram destined to B) that is delivered to router R1, what are the
source and destination IP and MAC addresses?

c. Suppose Host A would like to send an IP datagram to Host B, and neither A’s
ARP cache contains B’s MAC address nor does B’s ARP cache contain A’s
MAC address. Further suppose that the switch S1’s forwarding table contains
entries for Host B and router R1 only. Thus, A will broadcast an ARP request
message. What actions will switch S1 perform once it receives the ARP
request message? Will router R1 also receive this ARP request message? If so,
will R1 forward the message to Subnet 3? Once Host B receives this ARP
request message, it will send back to Host A an ARP response message. But
will it send an ARP query message to ask for A’s MAC address? Why? What
will switch S1 do once it receives an ARP response message from Host B?

PROBLEMS 505

P18

P18. Suppose nodes Aand B are on the same 10 Mbps broadcast channel, and the
propagation delay between the two nodes is 325 bit times. Suppose CSMA/CD
and Ethernet packets are used for this broadcast channel. Suppose node Abegins
transmitting a frame and, before it finishes, node B begins transmitting a frame.
Can Afinish transmitting before it detects that B has transmitted? Why or why
not? If the answer is yes, then Aincorrectly believes that its frame was successfully
transmitted without a collision. Hint: Suppose at time t = 0 bits, Abegins
transmitting a frame. In the worst case, Atransmits a minimum-sized frame of
512 + 64 bit times. So Awould finish transmitting the frame at t = 512 + 64 bit
times. Thus, the answer is no, if B’s signal reaches Abefore bit time t = 512 + 64

bits. In the worst case, when does B’s signal reach A?

P22

P22. Suppose now that the leftmost router in Figure 5.33 is replaced by a switch.
Hosts A, B, C, and D and the right router are all star-connected into this
switch. Give the source and destination MAC addresses in the frame encapsulating
this IP datagram as the frame is transmitted (i) from A to the switch,
(ii) from the switch to the right router, (iii) from the right router to F. Also
give the source and destination IP addresses in the IP datagram encapsulated

within the frame at each of these points in time.


P26

P26. Let’s consider the operation of a learning switch in the context of a network
in which 6 nodes labeled A through F are star connected into an Ethernet
switch. Suppose that (i) B sends a frame to E, (ii) E replies with a
frame to B, (iii) A sends a frame to B, (iv) B replies with a frame to A. The
switch table is initially empty. Show the state of the switch table before
and after each of these events. For each of these events, identify the link(s)
on which the transmitted frame will be forwarded, and briefly justify your

answers.
P29
P29. Consider the MPLS network shown in Figure 5.29, and suppose that routers
R5 and R6 are now MPLS enabled. Suppose that we want to perform traffic
engineering so that packets from R6 destined for A are switched to A via
R6-R4-R3-R1, and packets from R5 destined for A are switched via
R5-R4-R2-R1. Show the MPLS tables in R5 and R6, as well as the modified

table in R4, that would make this possible.

Chapter 7: P19

P19. Consider again the figure for P18.


a. Assume a priority service, with packets 1, 4, 5, 6, and 11 being highpriority
packets. The remaining packets are low priority. Indicate the slots
in which packets 2 through 12 each leave the queue.
b. Now suppose that round robin service is used, with packets 1, 4, 5, 6, and
11 belonging to one class of traffic, and the remaining packets belonging
to the second class of traffic. Indicate the slots in which packets 2 through
12 each leave the queue.
c. Now suppose that WFQ service is used, with packets 1, 4, 5, 6, and 11
belonging to one class of traffic, and the remaining packets belonging to
the second class of traffic. Class 1 has a WFQ weight of 1, while class 2
has a WFQ weight of 2 (note that these weights are different than in the
previous question). Indicate the slots in which packets 2 through 12 each
leave the queue. See also the caveat in the question above regarding WFQ

service.

P21 P20. Consider the figure below, which shows a leaky bucket policer being fed by a
stream of packets. The token buffer can hold at most two tokens, and is initially
full at t = 0. New tokens arrive at a rate of one token per slot. The output
link speed is such that if two packets obtain tokens at the beginning of a
time slot, they can both go to the output link in the same slot. The timing
details of the system are as follows:
PROBLEMS 665
Arrivals
Packet queue
(wait for tokens)
1. Packets (if any) arrive at the beginning of the slot. Thus in the figure,
packets 1, 2, and 3 arrive in slot 0. If there are already packets in the
queue, then the arriving packets join the end of the queue. Packets
proceed towards the front of the queue in a FIFO manner.
2. After the arrivals have been added to the queue, if there are any queued
packets, one or two of those packets (depending on the number of available
tokens) will each remove a token from the token buffer and go to the
output link during that slot. Thus, packets 1 and 2 each remove a token
from the buffer (since there are initially two tokens) and go to the output
link during slot 0.
3. A new token is added to the token buffer if it is not full, since the token
generation rate is r = 1 token/slot.
4. Time then advances to the next time slot, and these steps repeat.
Answer the following questions:
a. For each time slot, identify the packets that are in the queue and the number
of tokens in the bucket, immediately after the arrivals have been
processed (step 1 above) but before any of the packets have passed
through the queue and removed a token. Thus, for the t = 0 time slot in the
example above, packets 1, 2 and 3 are in the queue, and there are two

tokens in the buffer.

b. For each time slot indicate which packets appear on the output after the
token(s) have been removed from the queue. Thus, for the t = 0 time
slot in the example above, packets 1 and 2 appear on the output link
from the leaky buffer during slot 0.
P21. Repeat P20 but assume that r = 2. Assume again that the bucket is initially
full.

You might also like