You are on page 1of 6

CSE573S HW 2 Due August 1st

1 Sharing a Link
a Describe one advantage and one disadvantage of using Time Division Multiple Access to share a link.
In general both TDMA and FDMA have the advantage of having no collisions, and the disadvantage
that links can only use what is allocated to them, even if they have more to send and no one else
is using the link.
Advantage: Disadvantage: Clocks must be synchronized.
b Describe one advantage and one disadvantage of using Frequency Division Multiple Access to share a link.
Advantage: Each flow can transmit at all times. Disadvantage:
c Describe one advantage and one disadvantage of using random access (such as Aloha or CSMA/CD) to share a
link.
Advantage: Simple implementation with little coordination necessary. Disadvantage: Loss of effi-
ciency due to bad coordination (collisions and idle periods).

2 Network Address Translation


This problem works through an example of a packet and response being sent through a Network Address
Translator (NAT). Host A has IP address 192.168.0.105 . Host B has IP address 64.233.167.147 . And the NAT has
internal IP address 192.168.0.1 and external IP address 69.48.228.103 .

a Host A sends a packet from port 36045 to Host B port 80. Describe the source IP address, destination IP address,
source port number, and destination port number for the packet as it is sent from A, as it arrives at the NAT, as
it leaves the NAT and as it arrives at the host B. If the NAT needs to generate a number use the number 41222.
From A: source IP 192.168.0.105, destination IP 64.233.167.147, source port 36045, destination port
80.
Arrive at NAT: (same as From A) source IP 192.168.0.105, destination IP 64.233.167.147, source
port 36045, destination port 80.
Leave NAT: source IP 69.48.228.103, destination IP 64.233.167.147, source port 41222, destination
port 80.
Arrive at host B: (same as Leave NAT) source IP 69.48.228.103, destination IP 64.233.167.147,
source port 41222, destination port 80.
b Host B sends an acknowledgment (ACK) back to host A through the NAT. Describe the source IP address,
destination IP address, source port number, and destination port number for the ACK as it is sent from B, as it
arrives at the NAT, as it leaves the NAT and as it arrives at the host A. If the NAT needs to generate a number
use the number 55888.
From B: source IP 64.233.167.147, destination IP 69.48.228.103, source port 80, destination port
41222.
Arrive at NAT: (same as From B) source IP 64.233.167.147, destination IP 69.48.228.103, source
port 80, destination port 41222.
Leave NAT: source IP 64.233.167.147, destination IP 192.168.0.105, source port 80, destination
port 36045.
Arrive at host A: (same as Leave NAT) source IP 64.233.167.147, destination IP 192.168.0.105,
source port 80, destination port 36045.

1
Delta 8 network (forward and backwards self routing)

First variation, still forward self routing. Difference in bold.

Delta 16 network (forward and backwards self routing) Second variation, still forward self routing. Difference in bold.

Figure 1: Figure for problem 4 (forward self routing)

2
c What information must the NAT store for this connection to be possible? In what step is this information used?
The NAT must store the IP address and Port Number of any connection which is made with a
host outside the local network (from inside to outside). Along with this information, a random
number is generated for the connection to use as its port to the external world, this must also be
saved with the IP address and port number (and is only generated once at the beginning of the
connection). This information is used when data is sent back to the host inside the network. The
packets are addressed to the port which was randomly generated, and they must be sent to the
stored IP address and Port number associated with that port number.

3 Relays
What is more efficient a switch or a hub. Explain why.
A switch. A switch allows multiple packets to arrive at one time and uses store and forward
to send the packets back out on the appropriate link (or broadcast on all links if it does not know
which link the recipient is on). On the other hand, a hub retransmits packets on a bit by bit basis to
all its links (other than the one the information came in on). This causes collisions if another packet
is being transmitted on another link.

4 Forward Self Routing


Consider a switching fabric network with 8 input ports and 8 output ports, which is implemented using
switching elements with 2 inputs and 2 outputs. Draw two different (non-isomorphic) networks which are forward
self routing. Recall that forward self routing means that an output port can be reached from any input port by
routing a cell along the path that corresponds to the binary representation of the output ports number. See the
second set of lecture slides for 6/20. Slide 14 has a picture of a forward self routing network.
See figure 1. Forward self routing means that if we write the output port number in binary
(starting with 0) then we can take the path which corresponds to that binary number to find the
port. If the number is 4 = 100 in binary then we take the lower link (link 1) out of the first switching
element, the higher link (link 0) out of the second switching element and the higher link (link 0)
out of the third and last switching element. This will be output port 4 no matter which input port
you arrive to the switch from. If this property holds for all the output ports than it is forward self
routing. (Similarly, backwards self routing means we can get to an input port from the output port
using the input port number in the same way). The Delta network (pictured below) is both forward
and backwards self routing (shown with 16 ports so you can see the recursive structure better). It
is the only network with this property. The Delta network is built recursively. Add a layer to the
switch by attaching the upper link (link 0) to a delta subnetwork in order. Attach all the lower links
(link 1) with another delta subnetwork in order. The problem asks for two networks with forward self
routing and 8 ports. The first can be the delta network. For the second notice that we don’t require
the links of a layer to be attached to the subnetwork in order to maintain forward self routing (this is
only necessary for backwards self routing). So we can tweak the network by swapping the particular
switching element we attach two links to as long as we continue routing to the same subnetwork.

5 Congestion Control Theory


a Give the max-min fair rate for the four flows AD, BG, DF, AG.
Increasing all flows at the same rate we stop when we reach the capacity of the first bottleneck.
There are three flows over the link HC and three flows on the link CE so increasing the rate off
all of them at the same time we reach the capacity of link HC first. This occurs when we have set
the rates of all the links to 3. The links that go over HC are AD, BG, and AG. These three links
are fixed at capacity 3 since they cannot increase any without exceeding the capacity of HC. The
only flow left is DF which is currently taking a capacity of 3 but can increase without disturbing
the other flows. The capacity on CE is 15 of which 9 is being used (by flows BG, DF, and AG), so
6 extra capacity can be used by the flow DF. This means the Max-Min fair rates are AD = 3, BG
= 3, DF = 9, AG = 3

3
b What is the main advantage of using Additive Increase Multiplicative Decrease (AIMD) as the congestion control
algorithm as opposed to other end-to-end congestion control algorithms?
AIMD converges to fairness under a synchronous feedback model.
c Give a plot of the throughput of two flows using AIMD against each other. Start at an unfair position and show
how the rates evolve as the algorithm proceeds. Label the lines corresponding to fairness and efficiency.
I Don’t feel like drawing it, ask me if you don’t know.
d What is the main advantage of using Multiplicative Increase Multiplicative Decrease (MIMD) as the congestion
control algorithm as opposed to other end-to-end congestion control algorithms?
MIMD is completely scalable. It doesn’t matter if the link capacity is 1Gbps or 1Kbps the conver-
gence to efficiency rates are the same (assuming packets are infinitely divisible).
e Give a plot of the throughput of two flows using MIMD against each other. Start at an unfair position and show
how the rates evolve as the algorithm proceeds. Label the lines corresponding to fairness and efficiency.
I Don’t feel like drawing it, ask me if you don’t know.

6 Event Based and Rate Based Congestion Control


Consider a link with capacity 8 Mbps (8,000,000 bits per second) and a queuing buffer to get on that link of
125 KB (125,000 Bytes). Consider a flow with Round Trip Time (RTT) of 50 ms for which that link is the bottleneck.
Assume that only this flow is transmitting over the link. You may assume a fluid model for traffic (meaning packets
are infinitely divisible).

a What is the optimal size of the buffer for this particular situation given that the flow uses TCP.
The optimal size of the buffer is one bandwidth delay product. This is equivalent to the amount of
traffic in flight when there is no buffering. 8e6 bits * 50e-3 s *(1Byte/8bits) = 50e3 Bytes = 50KB
b Assume that the flow uses a fixed window size of 16KB (16,000 Bytes) to transmit packets (no congestion control).
I On average at what rate does the flow transmit at.
cwnd/RTT = Rate, 16KB / 50ms = 2.56Mbps
II On average what is the rate on the link.
cwnd/RTT = Rate, 16KB / 50ms = 2.56Mbps
III On average what is the buffer occupancy?
0
c Assume that the flow uses a fixed window size of 100KB (100,000 Bytes) to transmit packets (no congestion
control).

4
I On average at what rate does the flow transmit at.
The flow has a larger window than necessary (which would be 50KB). So it will be transmitting
at the same rate as the bottleneck link (remember that window based protocols are self clocked;
meaning, they can only send packets as fast as they receive acknowledgments). So the rate is
8Mbps
II On average what is the rate on the link.
The link is transmitting as fast as it can, 8Mbps
III On average what is the buffer occupancy?
Some of the congestion window (cwnd) will be continually buffered in the queue for the link.
The size of the window necessary to always transmit something and not fill the buffer at all
is wnd/BaseRTT = LinkRate, which implies that wnd = 8Mbps * 50ms = 50KB. The other
50KB in the cwnd must be stored at the buffer. Notice that the equation cwnd/RTT = Rate
is also true since the RTT has increased due to the queuing delay.
d Assume that the flow sends at a constant bit rate of 2 Mbps (2,000,000,000 bits per second) with no congestion
control.
I On average what is the rate on the link.
2 Mbps
II On average what is the buffer occupancy?
0
e Assume that the flow sends at a constant bit rate of 10 Mbps (10,000,000,000 bits per second) with no congestion
control.
I On average what is the rate on the link.
8Mbps, it can’t possibly be higher than that
II On average what is the buffer occupancy?
the buffer is completely full, so it has 125KB buffered. This protocol is not self clocked, so even
a rate of 8.00001Mbps would eventually fill the queue.

7 Bloom Filter
Consider a counting bloom filter with 16 bins (in one layer), a maximal count of 16, and 4 hash functions.
The following table gives the value of the hash functions for each flow. Flow 1-3 each send 3 packets and flow 4-7
each send 2 packets (in any order).
Flow hash 1 hash 2 hash 3 hash 4
Flow 1 6 12 9 5
Flow 2 11 9 14 0
Flow 3 2 1 9 13
Flow 4 12 14 3 4
Flow 5 1 12 14 11
Flow 6 12 14 7 11
Flow 7 1 3 15 9
Flow 8 9 4 11 0

a What are the counts on the 16 bins after this occurs?


3 7 3 4 2 3 3 2 0 11 0 7 9 3 9 2
b If the threshold for detecting a flow as sending too much is a count of 8 or more packets, are any of the flows
detected?
1 no 2 no 3 no 4 no 5 no 6 no 7 no 8 no

5
c Flow 8 sends 100 packets. What flows are detected as having sent too much after this?
1 no 2 yes 3 no 4 no 5 no 6 no 7 no 8 yes For reference the bins have count: 16 7 3 4 16 3 3 2 0 16
0 16 9 3 9 2

d Is it possible for a flow to be detected as having sent a lot if it has not sent very many packets (false positive)?
Explain.
Yes. The bins which the flow uses to keep track of its count can all be increased by other flows.
This will make it seem like the flow has sent a lot when it hasn’t, hence a false positive.
e Is it possible for a flow to not be detected as having sent a lot if it has sent a lot (false negative)? Explain.
No. There is no way the bins can have numbers lower than the threshold if the flow has sent more
packets than the threshold, since with each packet the count on each bin will be increased.

You might also like