1601/159.334 ALB Internal
MASSEY UNIVERSITY
ALBANY CAMPUS
EXAMINATION FOR 159.334 COMPUTER NETWORKS
Copyright By PowCoder代写 加微信 powcoder
Semester One 2016
Time allowed: THREE (3) hours
Attempt ALL 6 (six) questions.
This examination contributes 60% to the final assessment.
Calculators are permitted, with no restrictions on type of calculator used.
-Page1of 9-
1601/159.334 ALB Internal
Question 1:
a) Explain briefly the role of the following socket functions: accept()
b) What are the 4 sources of packet delay in a packet-switched network?
c) In which layer are port numbers used?
d) In which layer are IP addresses used?
e) In which layer are MAC addresses used?
-Page2of 9-
1601/159.334 ALB Internal
Question 2: (The Application Layer)
a) If an FTP client is in active mode, what are the two FTP commands (protocol commands) issued by the client when the user issues:
b) In the FTP Server (active FTP mode) program, how many sockets will have to be created in order to allow for one TCP client to connect to the server, be able to request for a command (e.g. dir, get, put, etc.), and actually transfer data? Describe the purpose of each of the socket that will have to be created by the server.
c) Consider that a client establishes a non-persistent HTTP connection (without pipelining) with the HTTP server that contains 2 objects that the user needs to download. Draw a diagram showing how many RTTs (Round Trip Time) take for the completion of the downloading actions.
– Remember that every connection establishment counts 1 RTT, even before the request can be sent to the server.
– The transmission time for each object is 0.5 RTT.
d) Briefly explain two services offered by DNS. Also, briefly explain why centralize DNS may not work on the Internet.
-Page3of 9-
1601/159.334 ALB Internal
Question 3: (The Transport Layer)
a) Complete the missing seq and ack numbers in the diagram below when TCP
segments are sent over an established TCP connection.
Sender Receiver
(Note: copy the diagram and the answers onto the blue answer book).
b) Explain the difference between Flow Control and Congestion Control. Which mechanism use the RcvWindow field in the TCP header?
c) Calculate the UDP checksum for a segment containing a sequence of three 16-bit integers:
0011001101010101
0101010110111011
0001000100010001
[2 marks] d) Draw a diagram to explain how TCP use 3-way handshake to establish a
connection between client and server.
-Page4of 9-
Seq= ACK= DATA=”ok”
Seq= ACK= DATA=”ok”
Seq=1004 ACK=4096 DATA=”abcd”
Seq= ACK= DATA=”cde”
1601/159.334 ALB Internal
Question 4. (Network Layer)
a) Routers have an important role to switch packets from one input port to an output port. Explain why packets can be lost in the router, even if the input ports and output ports have the same transmission capabilities. Give 3 possible answers.
b) An ISP obtained a block of IP address 203.12.32.0/20. It subdivides this block of IP address to 8 subnets for 8 different organizations. List the network address and
the subnet mask of each subnet. c) (Distance Vector Algorithm)
The figure depicts 4 routers connected via certain links, with the numbers indicating the cost for each link between the 4 routers. Suppose that the following table is used for the initialisation of router A’s table:
Router A Cost to ABCD
A 0 10 2 ∞ FromB∞ ∞ ∞ ∞ C∞∞∞∞ D∞∞∞∞
-Page5of 9-
1601/159.334 ALB Internal
In addition, suppose that Router A receives the following advertisements from its neighbours: The minimum cost information is comprised of an array of 4 integers in the order A, B, C, D.
B advertises its minimum costs as: 10, 0, 7, 6
C advertises its minimum costs as: 2, 7, 0, 4
Apply the Distance Vector algorithm to accomplish the tasks below.
Compute for the first update on router A’s table if router A receives packets with the minimum cost information from routers B and C. Show your complete solution by accomplishing the tables given below.
Cost to ABCD
(Note: copy the table and the answers onto the blue answer book).
-Page6of 9-
1601/159.334 ALB Internal
Question 5. (Data-link and Physical Layers)
a) Explain why a switch is more efficient than a hub.
b) What is the difference between Pure Aloha and Slotted Aloha?
c) Explain how the following Random Access Protocols work in the Link Layer. Provide one space-time diagram for each protocol to illustrate how the protocols operate.
d) Calculate the CRC value (in hexadecimal) for the character “1001 0110” considering that the polynomial is the standard 16 bit CRC (0x8005). State any assumptions you make (e.g. initial state of variables, reflected bytes, etc).
-Page7of 9-
1601/159.334 ALB Internal
Question 6. (Network Security)
a) Refer to the figure depicting a Secure e-mail protocol used by Alice. Assuming that Trudy can intercept the email, with the protocol used, is Alice able to send her email to Bob with confidentiality, authentication and message integrity? Explain your answer in terms of each security issue.
Note: the variables depict the following information:
• m – message
• K-A() – Alice’s private key
• K+A() – Alice’s public key
• H() – hash function known to Bob and Alice
b) Considering the RSA algorithm, find suitable d for the following pair of prime numbers:
p=19, q=17ande=5 n=?
Using the Extended Euclidian Algorithm, find d.
Also state which are the numbers (from the list of p,q,n,z,e,d) that compose the
public key and the private key.
c) Explain how Denial of Service (DoS) attacks could be carried out by sending
multiple TCP packets with the header bit SYN=1.
-Page8of 9-
[4 marks] [1 mark]
1601/159.334 ALB Internal
d) Explain how IPsec services provide defence to man(or woman)-in-the-middle attack?
-Page9of 9-
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com