Sunday, December 1, 2019

Fundamentals of Networking Basic Questions and Answers

Fundamentals of Networking
Basic Questions and Answers

a)  Name the five layers in the Internet Protocol Stack.
Application
Transport
Network
Data Link
Physical

b)  Give two reasons why the Internet primarily uses packet switching instead of circuit switching.
Statistical multiplexing for busty traffic; No setup latency; No state; Simple; Robustness in the face of failure

c)  Considering a small network of four hosts and three links as depicted in the figure below. A 1,000,000 bits message is to be sent from A to D. The bandwidth of the first two links is 400,000 bps, but the link between C and D is 1,600,000 bps. Propagation delays of the links are negligible. Assume that circuit switching is used and the total circuit setup time is 100 ms, what is the time to send the message from A to D?
A → B→ C→ D
The overall circuit bandwidth is bounded by the slowest link which is 400,000 bps. Thus the time to send the message is the sum of the setup time (100ms) and the transmission time (1,000,000/400,000 = 2500 ms), which is 2600ms.


d)   Repeat part c by assuming that packet switching is used with packet size 10,000 bits plus header size of 160 bits, store-and-forward routers at B and C, as well as negligible queuing delays.
Number of packets = 1,000,000 / 10,000 = 100 packets
Size of each packets = 10,160 bits
Transmission time for the first packet
= transmission time from A to B + transmission time from B to C + transmission time from C to D
= 10160/400000 + 10160/400000 + 10160/1600000 = 57.15 ms
For the remaining 99 packets, the transmission time is dominated by the slowest link which operates at 400000 bits/second = 99 * 10160/400000 = 2514.6 ms
Total time = 2514.6 + 57.15 = 2571.75 ms

2) Application Layer
a)  Answer True or False to the following statements:
i) To get a Web page with some text and three images, a browser needs to send 1 request message and receives 4 response messages. FALSE
ii) Two pages (e.g. www.uky.edu/research.html and www.uky.edu/index.html) can be sent over the same persistent connection. TRUE
iii) With non-persistent connections, it is possible for a single TCP segment to carry two distinct HTTP request messages. FALSE
iv) HTTP response messages never have an empty message body. FALSE
v) One reason for having a proxy server is to provide caching. TRUE

b) Consider distributing a file of 10 Gbits to 100 peers in a P2P network. The server has an upload rate of 20 Mbps, and each peer has a download rate of 1 Mbps and an upload rate of 200 Kbps. Find the minimum distribution time.
To calculate the minimum distribution time in a P2P network, we can use the formula
DP2P = max{F/us, F/dmin, NF/(us+Σiui )}
where F = 10Gbits = 10,000 Mbits, us = 20 Mbps, dmin = 1 Mbps and ui = 0.2 Mbps for all i. F/us = 500s, F/dmin = 10,000 s and the last term is 25,000 s. So the last term dominates and the minimum distribution is 25,000s.
c) (10 points) Describe the steps a server takes in a typical network program with stream sockets. The first step has been filled in for you.
i) Create a socket
ii) Bind the socket to a well known port
iii) Listen to the socket for connections
iv) Accept the connection and create a temporary socket
v) Send and receive data from the client
vi) Close the temporary socket

3) Transport Layer
a) (5 points) What are the functions of port numbers in the TCP header? Why does TCP header include both source port number and destination port number?
They are multiplexing and de-multiplexing at the host. A TCP server needs both the source and destination port numbers in order to correctly identify the socket when communicating multiple clients.
b) (5 points) Assume that each bit position has at most one error. Identify the error bit locations in the following scenario:
data0: 1110 0110 0110 0100
data1: 1101 1101 0101 0101
checksum: 0100 0100 0000 0011
sum: 100000 0111 1011 1100
carry: 10
and then wraparound: 0000 0111 1011 1110
error bit positions: **** * * *
c) (10 points) A sliding window protocol is used in a transmission. The sender wants to send 10 packets with a rate 1 packet/ms. The propagation delay is 2 ms for any packet, and the time out is 8 ms. Assume Go-Back-N is used, window size is 5 packets and the packet #4 is lost. Fill up the below picture with information about sending packet from sender to receiver and ACK packet in the reverse direction.
Sender
Receiver
1 ms
2
3
4
5
6
7
8
4
5
6
7
8
9
10
Time out is 8 ms
1
\
4) (Outcome 3, 20 points) Transport Layer:TCP
The following graph shows the variation of the size of the congestion window (interpolated) of a TCP sender over time. MSS stands for Maximum Segment Size. Use this graph to answer the following questions.
a) (5 points) At time t0, what is the event that triggers the reduction of the window size by half?
The sender receives three duplicate ACK packets which indicate possible congestion. In response, it reduces the sending rate by halving the sending rate.
b) (5 points) At what rate is the congestion growing between time t0 and t1?
The congestion window grows by 1 MSS for every ACK the sender receives. The
slower increase is to slowly approach the equilibrium (fair) sending rate.
c) (5 points) At time t1, the window size drops to 1 MSS and stays there due time t2. What are the events that trigger the changes in window size in both time t1 and t2?
At time t1, there is a timeout event which is considered to be more serious than three duplicate ACKs. Thus, the sender drastically reduces the window size to 1 MSS rather than merely halving it. No new ACK packet is received until time t1 which then allows the congestion window to increase again.
d) (5 points) What happen at time t3?
To prevent an overshoot of sending rate, the sender changes from slow start to linear increase when the window size reaches half of the window size before the loss event.

3 comments:

  1. https://www.rakuten.com/r/ATINAH4?eeid=28187

    ReplyDelete
  2. I love getting Cash Back and think you will too! Join for free and get $10 when you spend $25. https://www.rakuten.com/r/WEAKSY2?eeid=26474

    ReplyDelete
  3. https://myaccount.fanduel.com/newRegistration.shtml?rfr=x100_Daniel_4B990924-3ABB-4B8F-904C-266C9F336F14

    ReplyDelete