Professional Documents
Culture Documents
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).
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)
Delta 16 network (forward and backwards self routing) Second variation, still forward self routing. Difference in bold.
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.
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.
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
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.