Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COMS3200 Computer Networks
Assignment 1
Marks: 100
Weight: 25% of your final grade.
Revision: 1.0
Introduction
This assignment introduces the Network Edge & Core, the top three Networking layers (from OSI
models) such as Application Layer, Transport Layer, and a small part of Network Layer. After
finishing the assignment, you should be able to distinguish between Packet and Circuit Switching,
understand End-to-End Delay, be able to interpret and analyse network packets and do network
programming.
This assignment contains three (3) parts: Part A, Part B and Part C. For Part A and B, you will need to
submit you answers through the Blackboard Quiz. For Part C, you will submit your code via
COMS3200 subversion (SVN). All submitted work will be marked automatically. And it's strongly
recommended that you have read this specification very carefully.
Note that this assignment is individual work. Using answers (or code) that you did not calculate
(or write) is against course rules and may lead to a misconduct charge.
2
Part A (34 marks)
Answer each of the following questions in the associated quiz on Blackboard, following the specified
instructions. All answers will be automatically marked.
Figure 1. A simple network configuration map.
Figure 1 shows a simple network map that includes two edges: a Local Network (represented as the
grey area) and a Global Network (white area).
In the Local Network, there are the three circuit switches (SC1, SC2 and SC3). They are interconnected
by two links (LC1 and LC2). Each of these circuit links has three slots. Each host is directly connected
to one of the switches. In this part, you only consider the communication scenarios between Host A
and Host B. The network reserves one slot on each of the two links. In Figure 1, the dedicated end-to-
end connection uses the second slot in both links LC1 and LC2 (see the red coloured line). We assume
3
that device C (which is located between is LC3 and L1) is the combination of modem and router in the
Local Network and connected to SC3 through LC3.
In the Global Network, packet-switching technique is used in the entire network. We have a scenario
where a client requests a web page from a remote server on a remote island via a slow satellite link
above the earth in a geostationary orbit. There is one client C, one server S, and four DNS servers. D1
is a Local DNS Server, D2 is a Root DNS Server, D3 is a Top-level Domain DNS Server, and D4 is
an Authoritative DNS Server. We don’t need to know where the Link L7 is connected in this
assignment.
Scenario 1 – Local Network (6 marks)
Host A sends a file of 2,790,000 bits to Host B at the time t0 = 0 mili-second (msec). Link LC1 and
link LC2 use time-division multiplexing, all of them have one frame, and it is one second that is divided
by three slots. The total bit rate is 9 Mbps (from SC1 to SC3). It needs 500 msecs to establish an end-
to-end circuit before Host A begins to transmit the file. And the second slot of the circuits in LC1 and
LC2 is allocated for the transmission between Host A and Host B. At the time t0
+ 500 msecs, the first
slot of the circuits in LC1 and LC2 starts to transmit. At the time t1, Host B has received all bits of the
file from Host A. After 400 msecs from t1, Host B sends a file of 990,000 bits to Host A. Host A has
received all bits of the file from Host B at time t2.
There are some assumptions for the Local Network:
• There are no propagation delays in this networking.
• There are no transmission delays between Host A and SC1, as well as Host B and SC3.
• The network starts without data transmission.
• The slot of the circuits is allocated for the transmission can be used in both directions.
• All switches have no processing delays (this is unrealistic though, we assume to simplify
calculations).
Answer the questions below in mili-seconds (msecs) rounded to three decimal places.
Question 1: What is the value of t1? (3 marks)
Question 2: What is the value of t2? (3 marks)
Scenario 2 – Global Network (21 marks)
A program on one of the hosts in the Local Network starts the process of retrieving a webpage from
the Server S. The following events happen sequentially:
1. Client C sends a DNS request to D1.
2. D1 sends a response with Server S’s IP address to Client C.
4
3. C sends a TCP request (SYN) to open a connection to Server S.
4. Server S acknowledges (SYN/ACK) the TCP request and opens the connections with Client C.
5. Client C sends a HTTP GET (which also includes the TCP ACK) request to Server S. This
packet is considered just a HTTP GET packet (i.e. 1000 bytes in total)
6. Server S sends the web page to Client C, segmented into 7 packets, which includes the HTTP
response plus the HTML file.
7. After receiving each data packet, Client C sends an ACK message back to Server S. Note that
S does not need to wait for an ACK before sending the next data packet. After receiving the
last data packet acknowledgement, S sends a TCP FIN packet to close the connection.
8. After receiving FIN from Server S without any processing delays, Client C sends one FIN/ACK
packet back to S. After receiving FIN/ACK without any processing delays, S sends a final ACK
packet back to C. When this final ACK packet is received at C the connection is finally closed.
There are some assumptions for the Global Network:
• The network is packet-switched.
• The network starts with no other packets in queues - only packets that are a part of this question.
• All events outlined are successful (i.e., no corrupted packets, retransmissions, etc)
• Apart from the switches, there are no other processing delays.
• Each link is bidirectional and can concurrently handle bits travelling in opposite directions.
• All required records are stored in the DNS servers.
• C, D1 and S have no processing delays (this is unrealistic, just to simplify calculations).
• All DNS packets are 100 bytes long, including all headers, queries, responses, etc.
• All TCP SYN, ACK, FIN, SYN/ACK, and FIN/ACK packets are 200 bytes long, including all
headers, preamble, etc.
• All HTTP GET and response packets are 1000 bytes long, including headers, preamble, etc.
• 1 Mbps = 10^6 bps; 1 Kbps = 10^3 bps (bps is bits per second).
Answer the following questions below in mili-seconds (msecs) rounded to three decimal places.
Question 3: In event 1, how long does it take for D1 to receive the DNS request from Client C? (2
marks)
Question 4: In event 2, how long does it take for Client C to receive the response from D1? (2 marks)
Question 5: In event 3, how long does it take for Server S to receive the SYN packet from Client C?
(2 marks)
Question 6: In event 4, how long does it take for Client C to receive the SYN/ACK packet from Server
S? (2 marks)
Question 7: In event 5, how long does it take for Server S to receive the HTTP GET packet from Client
C? (2 marks)
Question 8: In event 6, how long does it take for Client C to receive the first HTTP packet from Server
S? (2 marks)
5
Question 9: In event 6, how long does it take for Client C to receive the second HTTP packet after
Server S sends the first HTTP packet? (3 marks)
Question 10: In event 6, how long does it take for Client C to receive the last HTTP packet after Server
S sends the first HTTP packet? (3 marks)
Question 11: How long does it take for Client C to receive the ACK packet (event 8) after sending the
ACK packet for the last HTTP packet (event 7)? (3 marks)
Some information about Transmission Links and Switches that you may need in your calculations.
Table 1. Tranmission Links
Link Connect Between Transmission Rate Length Propagation Speed
L1 C S1 100 Mbps 240 m 2 x 10^8 m/s
L2 S1 S2 100 Kbps 42,000 km 3 x 10^8 m/s
L3 S2 S4 100 Mbps 60 m 3 x 10^8 m/s
L4 S2 S3 500 Mbps 3,300 km 3 x 10^8 m/s
L5 S3 D1 200 Mbps 500 m 2 x 10^8 m/s
L6 S4 S 50 Mbps 60 m 2 x 10^8 m/s
Table 2. Switches and Processing Delay
Switch Link Associated Processing Delay
S1 L1, L2 1 msec
S2 L2, L3, L4 2 msec
S3 L4, L5 0.5 msec
S4 L3, L6, L7 0.25 msec
Scenario 3 – The Internet’s Directory Service (7 marks)
In this scenario, we consider on the Global Network only. The following events happen sequentially:
1. Client C sends a DNS query message of a host name to D1.
2. D1 receives the DNS message, then forward the query message to D2.
3. D2 receives the DNS message, then sends a DNS message to D1.
4. D1 receives the DNS message, then sends the DNS message to D3.
5. D3 receives the DNS message, then sends a DNS message to D1.
6. D1 receives the DNS message, then sends the DNS message to D4.
7. D4 receives the DNS message, then sends a DNS message to D1.
8. D1 receives the DNS message, then forwards the message to Client C.
Answer the following questions.
Question 12: Which on these events can combined together to form an recursive DNS query? (2 marks)
Question 13: Which on these events can combined together to form an iterative DNS query? (2 marks)
Question 14: In event 3, what is DNS record type in the message that D2 sends to D1? (1 mark)
6
Question 15: In event 5, what is DNS record type in the message that D3 sends to D1? (1 mark)
Question 16: In event 8, what is DNS record type in the message that D1 sends to C? (1 mark)