Department of Computer Science and Engineering. CSE 3214: Computer Network Protocols and Applications Instructor: N. Vlajic Date: Feb 10, 2011

Department of Computer Science and Engineering CSE 3214: Computer Network Protocols and Applications Instructor: N. Vlajic Date: Feb 10, 2011 Midter...
Author: Leo Moore
4 downloads 1 Views 173KB Size
Department of Computer Science and Engineering

CSE 3214: Computer Network Protocols and Applications Instructor: N. Vlajic Date: Feb 10, 2011

Midterm Examination Instructions: •

Examination time: 75 min.



Print your name and CSE student number in the space provided below.



This examination is closed book and closed notes.



There are 6 questions. The points for each question are given in square brackets, next to the question title. The overall maximum score is 100.



Answer each question in the space provided. If you need to continue an answer onto the last page, clearly indicate that and label the continuation with the question number.

Question

FIRST NAME: LAST NAME: STUDENT #:

_______________________ _______________________ _______________________

Points

1

/ 20

2

/ 10

3

/ 20

4

/ 18

5

/ 15

6

/ 17

Total

/ 100

1

1.

Multiple Choice

[20 points] time: 15 min

Circle the correct answer(s) for the following statements. For each statement, you will obtain 0 marks if the number of circled answers is more/less than appropriate.

(1.1) In ____________________ the message packet is sent from the source to the destination without being divided into packets. (a) circuit-switching (b) virtual circuit-switching (c) packet switching (d) none of the above

(1.2) In the TCP/IP model, encryption and decryption are functions of ______________ layer. (a) network (b) transport (c) session (d) application

(1.3) ______________ control means regulating the amount of data a source can send without overwhelming the destination. (a) error (b) congestion (c) flow (d) none of the above

(1.4) If the fragment offset in an IP fragment-packet has a value of 100, it means that __________________ . (a) the packet is 100 bytes in size (b) the 1st byte in the payload of this packet is byte 400 in the original IP packet (c) the 1st byte in the payload of this packet is byte 800 in the original IP packet (d) none of the above

(1.5) What is the maximum number of IP addresses recorded in an IP packet, if the value of the length field in the record route option of that packet is 27? (a) 27 (b) 24 (c) 12 (d) 6

2

(1.6) Using the limited broadcast address, a host can send a packet to ____________ on _______________ . (a) one specific host; the same network (b) all other hosts; the same network (c) one specific host; a remote network (d) all other hosts; a remote network

(1.7) IPv6 allows packet fragmentation at ______________ . (a) every hop (b) source only (c) routers only (d) IPv6 does not allow fragmentation

(1.8) When two computers using IPv6 want to communicate but the packet must pass through an IPv4 region, which transition strategy would be most advisable to use, in order to avoid loss of potentially critical information. (a) tunnelling (b) header translation (c) fragmentation (d) none of the above

(1.9) Which of the following reductions is the correct reduction of the IPv6 address 2001:0d02:0000:0000:0014:0000:0000:0095. (a) 2001:0d02::0014::0095 (b) 2001:d02:0:0:14::95 (c) 2001:d02:14:95 (d) none of the above

(1.10) Which of the following statements regarding the relationship between IPv6 Interface Identifier and the respective EUI-64 Identifier is correct? (a) IPv6 Interface Identifier is randomly generated from EUI-64 Identifier. (b) the two identifiers have 63 identical bits (c) IPv6 Interface Identifier is a compressed version of EUI-64 identifier (d) none of the above

3

2.

Optimal Packet Size

[10 points] time: 10 min

Suppose that a certain communications protocol involves a per-packet header of 100 bytes. We send 1 million bytes of data using this protocol. However, one data byte is corrupted and the entire packet containing this particular byte is thus lost and need to be retransmitted. Find the total number of overhead bytes, where overhead = (total header bytes + loss bytes) in the following 4 cases: a) packet size = 1,000 bytes, b) packet size = 5,000 bytes, c) packet size = 10,000 bytes, d) packet size = 20,000 bytes. Which packet size is optimal?

Solution: The number of packets sent:

⎡10 6 ⎤ N=⎢ ⎥ ⎢ P ⎥

Overhead:

⎡10 6 ⎤ O = N * 100[bytes] + ( P + 100) = ⎢ ⎥ * 100[bytes] + ( P + 100) ⎢ P ⎥

Packet size 1,000 5,000 10,000 20,000

Overhead 101,100 25,100 20,100 25,100

Based on the above, the packet size of 10,000 bytes is the optimal packet size.

4

4.

Subnetting

[18 points] time: 10 min

4.1 [6 points] What is the total number of class B addresses available for assignment to individual hosts? Show your work. Solution: Total number of class B networks: 216-2 - 2. (All 0 and all 1 NetID excluded.) Total number of hosts in each class B network: 216 - 2. Total number of class B addresses: (214 - 2)*( 216 - 2) = (16384-2)*(65536-2)=1073577988

4.2 [6 points] IP address 172.16.123.213 is found to be residing on a subnetwork with the following subnet mask: 255.255.255.240. What is the actual address of this subnet? Show your work. Solution: 255.255.255.240 = 11111111 11111111 11111111 11110000. 172.16.123.213 = 10101100 00010000 01111011 11010101 Subnet address: 10101100 00010000 01111011 11010000 = 172.16.123.208

4.3 [6 points] You are given a host IP address 200.180.30.50/28. What is the broadcast IP address of the respective (sub)network? Show your work. Solution: IP address 200.128.30. 0011 | 0010 ------------------------- ------Net ID HostID The broadcast address is obtained by setting the HostID part to all 1s. Hence, Broadcast Address: 200.128.30.63

7

6. IP Fragmentation

[15 points] time: 10 min

An IP datagram carrying 10000 bytes of data must be sent over a link (i.e. network) that has an MTU of 4468 bytes. Assume the datagram has no Options, and the Identification number is 218. How many fragments will be generated? State the values (in decimal numbers) of the following fields for each of the fragments: Identification, Total Length, D-bit, M-bit, Fragmentation Offset. The format of the IP header is shown on the subsequent page.

3 fragments. 1st fragment : 2nd fragment: 3rd fragment:

IDENTIFICATION TOTAL LENGTH DNF MF FRAGMENT OFFSET

4448 +20 bytes 4448 +20 bytes 1104 +20 bytes

First 218 4468 0 1 0

Second 218 4468 0 1 556

Third 218 1124 0 0 1112

http://web2.uwindsor.ca/courses/cs/aggarwal/cs60375/papers/MidTerm1_1.doc

11

5.2)

[4 points]

Consider the network below consisting of four routers. Every link has capacity of 1 Mbps, and every flow sends data at 1 Mbps. Assume that all flows are UDP and use the same packet size.

a) What is the throughput of each flow (i.e. actual rate at which packets of this flow arrive at its respective destination), if all routers implement FIFO scheduling. FIFO scheduling implies that in the case of congestion, each packet is dropped with the same probability. Solution:

Flow 1: 1/4Mbps, Flow 2: 1/2Mbps, Flow 3: 2/3Mbps, Flow 4: 3/4Mbps. Because each link is congested (the sum of the arrival rates of the flows at each link is greater than 1Mbps), ach flow gets a throughput proportional to its arrival rate. On link AB, the arrival rates of both Flow 1and Flow 2 is 1Mbps, so each flow gets 0.5Mbps. On link AB, the arrival rate of Flow 1 is 0.5Mbps while the arrival rate of Flow 3 is 1Mbps, so Flow 3 will get 2/3Mbps, while Flow 1 will get 1/3Mbps. Finally, on link CD, the arrival rate of Flow 1 is 1/3Mbps, while the arrival rate of Flow 4 is 1Mbps, so Flow 4 will get 3/4Mbps, while Flow 1 will get 1/4Mbps.

b) What is the throughput of each flow if all routers implement Weighted Fair Queueing, and each Flow i has weight i? Solution:

Flow 1: 1/5Mbps, Flow 2: 2/3Mbps, Flow 3: 3/4Mbps, Flow 4: 4/5Mbps. On link AB, Flow 1 gets 1/3Mbps while Flow 2 gets 2/3Mbps; on link BC Flow 2 gets 1/4Mbps, while Flow 3 gets 3/4Mbps; on link CD Flow 1 gets 1/5Mbps, and Flow 4 gets 4/5Mbps.

11

3.

NAT and IPv6

[12 points]

3.1) [3 points] Assume an IP packet carrying an HTTP request is going from a local (i.e. home) area network onto the wider Internet through a NAT router. Name all header fields that the NAT router needs to change in the given packet? Explain your answer. (Hint: encapsulation as well as the syntax/semantics of all involved protocols must be taken into consideration.)

SOLUTION: It is very much clear from 3.1) that one IP and TCP header field need to be changed: 1) the source IP address, 2) TCP source port number. The change in the value of these two parameters implies that the following two fields also need to be changed: 3) IP checksum 4) TCP checksum

3.2) [3 points] The diagram below shows a packet traveling through a NAT router. Packet 1 is sent from the internal host (S) to the NAT router, packet 2 is sent from the NAT router to the external web server (D), packet 3 is received from the web server by the NAT router, and packet 4 is sent by the NAT router to the original host. Fill in the missing source and destination IP addresses and port numbers in packets 2-4.

5

SOLUTION: P2: S=138.76.29.7, 5001 P3: S=128.110.40.186, 80 P4: S=128.110.40.186, 80

D=128.110.40.186, 80 D=138.76.29.7, 5001 D=10.0.0.1, 3345

3.3) [3 points] The diagram below shows an IPv6 packet tunnelled over IPv4. Fill in the missing source and destination addresses at places/packets marked 1, 2, and 3.

1

2

3

SOLUTION: 1: S=B D=E 2: S=B D=E 3: S=A D=F

3.4)

[3 points]

Name two modifications of IPv6, from the IPv4, that allow a router to process a

packet quicker.

SOLUTION: 1: fixed header length / better header format 2: no packet fragmentation at routers 3: no checksum

6

IP PACKET FORMAT:

ARP PACKET FORMAT:

12

Suggest Documents