Feedback on Quiz # 6 (Summative)
The Quiz # 6 was composed of 10 questions, which were randomly selected from a Question Bank of 20 questions. Answers and feedback comments for all of the questions are given below:
Q01
(a)
(b)
(c)
(d)
The switching fabric is at the very heart of a router. It can be implemented in several ways such as switching via memory, a bus and a crossbar. Which of the following statement(s) is/are correct?
(Select all that apply. Marks will be deducted for incorrect answers)
In memory-based switching fabrics, two packets can be forwarded simultaneously.
In bus-based switching fabrics, a packet is forwarded to all ports, and only the matching port
accepts the packet for onward transmission.
(e)
In crossbar-based switching fabrics, a packet being forwarded to an output port can never be blocked from reaching that output port.
In crossbar-based switching fabrics, it is possible to have n input ports switching packets to n
output ports simultaneously.
In memory-based switching fabrics, a packet travels twice on the system bus, before being
transmitted on the output port.
Feedback:
In switching via memory, two packets cannot be forwarded at the same time, even if they have different destination ports, since only one memory read/write can be done at a time over the shared system bus. In switching via a bus, all output ports receive the packet, but only the port that matches the label (header) will keep the packet. A crossbar switch is non-blocking¡ªa packet being forwarded to an output port will not be blocked from reaching that output port as long as no other packet is currently being forwarded to that output port. However, if two packets from two different input ports are destined to the same output port, then one will have to wait at the input, since only one packet can be sent over any given output port at a time.
Q02
Assume we have a 2500byte message (e.g. an email) to be transmitted between a sender and a receiver (with no intermediate switches or routers) with a bandwidth of 1 Gbps. The distance between the sender and the receiver is 12000 km. Light travels at 2.4 ¡Á 108 m/s. Then, the propagation and the transmission delays are:
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
The propagation delay = 50 ms, and the transmission delay = 0.02 ms
(b)
The propagation delay = 0.02 ms, and the transmission delay = 50 ms
(c)
The propagation delay = 0.50 ms, and the transmission delay = 0.2 ms
(d)
The propagation delay = 0.2 ms, and the transmission delay = 0.50 ms
(e)
The propagation delay = 50 ms, and the transmission delay = 0.0025 ms
Feedback:
Propagation delay = (12000 ¡Á 1000 ) / (2.4 ¡Á 108) = 0.05 sec = 50 ms Transmission time = (2500 ¡Á 8) / 109 = 0.00002 sec = 0.02 ms (1 Gbps = 109 bps)
Q03
A block of addresses is granted to a small organization. If we know that one of the addresses is 205.16.37.39/28, then what is the network address of the subnet, which includes this address?
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
205.16.37.8
(b)
205.16.37.16
(c)
205.16.37.32
(d)
205.16.37.64
(e)
205.16.37.128
Feedback:
The binary representation of the given address is: 11001101 00010000 00100101 00100111
The mask is 28 i.e. 11111111.11111111.11111111.11110000
That means, 28 bits are reserved for the network portion and the rest (32-28 = 4 bits) are reserved for the host portion. If we set the host portion bits (the rightmost bits) to 0, we get:
11001101 00010000 00100101 00100000 or 205.16.37.32. This is the network address in this subnet.
Q04
A block of addresses is granted to a small organization. If we know that one of the addresses is 205.16.37.39/28, then what is the broadcast address of the subnet, which includes this address?
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
205.16.37.63
(b)
205.16.37.255
(c)
205.16.37.47
(d)
205.16.37.127
(e)
205.16.37.31
Feedback:
The binary representation of the given address is: 11001101 00010000 00100101 00100111
The mask is 28 i.e. 11111111.11111111.11111111.11110000
That means, 28 bits are reserved for the network portion and the rest (32-28 = 4 bits) are reserved for the host portion. If we set the host portion bits (the rightmost bits) to 1 in the host address, we get: 11001101 00010000 00100101 00101111 or 205.16.37.47. This is the last address in this subnet, which is used for broadcasting messages in this subnet.
Q05
A TCP host X is connected to host Y i.e. TCP connection is already established and is sending a 10240 bytes long message to Y. The MSS used by host X is 512 bytes and the initial sequence number chosen by X is 160. We assume that all packets reach their destination. What are the sequence numbers of segments that are sent from X to Y?
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
160, 672, 1184, 1696, …, 9888
(b)
0, 512, 1024, 1536, …, 9728
(c)
20, 84, 148, 212, …, 1236
(d)
0, 64, 128, 192, …, 1216
(e)
160, 224, 288, 352, …, 1376
Feedback:
The sequence number of any segment is based on the implicit number of data bytes. For the first segment the sequence number is 0 + initial chosen offset, which is 160 in this case. The second segment will have a sequence number of 0 + 160 + MSS => 0 + 160 + 512 = 672. The third segment will have a sequence number of 0 + 160 + 2*MSS => 0 + 160 + 2*512 = 1184 and so on. The correct answer is: 160, 672, 1184, 1696, …, 9888
Q06
A TCP host Y is connected to host Z i.e. TCP connection is already established and is sending a 20480 bytes long message to Z. The MSS used by host Y is 1024 bytes and the initial sequence number chosen by Y is 320. We assume that all packets reach their destination. What are the sequence numbers of segments that are sent from Y to Z?
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
320, 1344, 2368, 3392, …, 19776
(b)
0, 1024, 2048, 3072, …, 19456
(c)
40, 168, 296, 424, …, 2472
(d)
0, 128, 256, 384, …, 2432
(e)
320, 448, 576, 704, …, 2752
Feedback:
The sequence number of any segment is based on the implicit number of data bytes. For the first segment the sequence number is 0 + initial chosen offset, which is 320 in this case. The second segment will have a sequence number of 0 + 320 + MSS => 0 + 320 + 1024 = 1344. The third segment will have a sequence number of 0 + 320 + 2*MSS => 0 + 320 + 2*1024 = 2368 and so on. The correct answer is: 320, 1344, 2368, 3392, …, 19776
Q07
Suppose the path from A to B has a single switch S in between: A ©¤©¤©¤ S ©¤©¤©¤ B. Each link has a propagation delay of 600¦Ìsec and a bandwidth of 16Mbps. What will be the minimum end-to- end delay for sending two consecutive packets of 300 bytes each from host A to B? You can consider that the switch does not add any delay.
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
Packet#1 arrives at 750¦Ìsec and Packet#2 arrives at 900¦Ìsec.
(b)
Packet#1 arrives at 1350¦Ìsec and Packet#2 arrives at 1500¦Ìsec.
(c)
Packet#1 arrives at 1500¦Ìsec and Packet#2 arrives at 1650¦Ìsec.
(d)
Packet#1 arrives at 1500¦Ìsec and Packet#2 arrives at 3000¦Ìsec.
(e)
Packet#1 arrives at 900¦Ìsec and Packet#2 arrives at 1050¦Ìsec.
Feedback:
The transmission delay for each 300-byte packet is 150¦Ìsec, so the first packet arrives at S at T=750¦Ìsec. The second packet arrives one transmission delay (i.e.,150¦Ìsec) later, at T=900¦Ìsec at S. The first packet takes another 750¦Ìsec to travel from S to B, arriving at T=1500¦Ìsec; the second packet arrives 150¦Ìsec later at T=1650¦Ìsec.
Q08
Suppose the path from A to B has a single switch S in between: A ©¤©¤©¤ S ©¤©¤©¤ B. Each link has a propagation delay of 400¦Ìsec and a bandwidth of 16Mbps. What will be the minimum end-to- end delay for sending two consecutive packets of 400 bytes each from host A to B? You can consider that the switch does not add any delay.
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
Packet#1 arrives at 600¦Ìsec and Packet#2 arrives at 800¦Ìsec.
(b)
Packet#1 arrives at 1000¦Ìsec and Packet#2 arrives at 1200¦Ìsec.
(c)
Packet#1 arrives at 1200¦Ìsec and Packet#2 arrives at 1400¦Ìsec.
(d)
Packet#1 arrives at 1200¦Ìsec and Packet#2 arrives at 2400¦Ìsec.
(e)
Packet#1 arrives at 800¦Ìsec and Packet#2 arrives at 1000¦Ìsec.
Feedback:
The transmission delay for each 400-byte packet is 200¦Ìsec, so the first packet arrives at S at T=600¦Ìsec. The second packet arrives one transmission delay (i.e.,200¦Ìsec) later, at T=800¦Ìsec at S. The first packet takes another 600¦Ìsec to travel from S to B, arriving at T=1200¦Ìsec; the second packet arrives 200¦Ìsec later at T=1400¦Ìsec.
Q09
You manage the network 154.231.145.128. You need to create subnetworks that will be able to support a maximum of 15 client machines on each subnetwork. Which one(s) of the following subnet masks would meet this requirement?
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
154.231.145.128/27
(b)
154.231.145.128/26
(c)
154.231.145.128/25
(d)
154.231.145.128/29
(e)
154.231.145.128/28
Feedback:
To support 15 client machines you will need a total of 17 addresses (including one for the router and one broadcast address i.e. the address that ends with all 1¡¯s for the host address is used as a broadcast address and cannot be assigned to a host). Therefore, you will need at least 5 bits for the host address.
Q10
You manage the network 200.250.150.0. You need to create subnetworks that will be able to support a maximum of 31 client machines on each subnetwork. Which one(s) of the following subnet masks would meet this requirement?
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
200.250.150.0/27
(b)
200.250.150.0/26
(c)
200.250.150.0/25
(d)
200.250.150.0/24
(e)
200.250.150.0/28
Feedback:
To support 31 client machines you will need a total of 33 addresses (including one for the router and one broadcast address i.e. the address that ends with all 1¡¯s for the host address is used as a broadcast address and cannot be assigned to a host). Therefore, you will need at least 6 bits for the host address.
Q11
John is using RSA to encrypt and decrypt messages that he sends / receives on a public network. He has chosen the following values for his RSA setup: p=23,q=19,e=283andd=7.
Decode the list of numbers [81, 283, 401] by decrypting each number separately and then translating it to corresponding English letter by using the following mapping:
A=1, B=2, C=3, …, Z=26
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
PEN
(b)
PAN
(c)
TEA
(d)
BUY
(e)
BOY
Feedback:
The given setup includes p = 23, q = 19, e = 283 and d = 7. We also need to compute n for using RSA encryption / decryption which is n = p x q = 437
We can now decode each number using m = cd mod n
(81^7)mod437=16=P
(283^7)mod437=5=E (401^7)mod437=14=N So, the correct answer is PEN.
Q12
Julia is using RSA to encrypt and decrypt messages that she sends / receives on a public network. She has chosen the following values for his RSA setup: p=23,q=19,e=283andd=7.
Decode the list of numbers [3, 250, 118] by decrypting each number separately and then translating it to corresponding English letter by using the following mapping:
A=1, B=2, C=3, …, Z=26
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
PEN
(b)
PAN
(c)
TEA
(d)
BUY
(e)
BOY
Feedback:
The given setup includes p = 23, q = 19, e = 283 and d = 7. We also need to compute n for using RSA encryption / decryption which is n = p x q = 437
We can now decode each number using m = cd mod n
(3^7)mod437=2=B
(250^7)mod437=21=U (118^7)mod437=25=Y So, the correct answer is BUY.
Q13
Consider the following figure, which shows two private networks with routers that implement NAT. Suppose host B is connected to the web server at host E, which uses port 80.
Show the values of the address and port fields (according to the format below), for a typical packet sent by host B. Also, show the fields in the packet as it would appear when it reaches server E. You can use the following format to give this information:
[Source IP, Dest. IP, Source Port, Dest. Port]
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
From host B [10.1.1.2, 4.3.2.1, 45, 80], at server E [1.2.3.4, 4.3.2.1, 180, 80]
(b)
From host B [10.1.1.2, 1.2.3.4, 45, 180], at server E [1.2.3.4, 4.3.2.1, 180, 80]
(c)
From host B [10.1.1.2, 4.3.2.1, 180, 80], at server E [1.2.3.4, 4.3.2.1, 45, 80]
(d)
From host B [10.1.1.2, 4.3.2.1, 45, 80], at server E [10.1.1.2, 4.3.2.1, 45, 80]
(e)
From host B [10.1.1.2, 4.3.2.1, 180, 80], at server E [10.1.1.2, 4.3.2.1, 180, 80]
Feedback:
A typical packet from Host B that is sent to host E will look like: [10.1.1.2, 4.3.2.1, 45, 80]
where 10.1.1.2 is the IP address of host B, and 45 is the port number used by it. The IP address of web server is 4.3.2.1 and the destination port number will be 80.
The same packet will appear as [1.2.3.4, 4.3.2.1, 180, 80] where the source IP has been replaced by the IP address of NAT router i.e. 1.2.3.4 and the source port has been replaced by the external port number i.e. 180. The destination IP and port number will remain unchanged i.e. 4.3.2.1 & 80.
Q14
Consider the following figure, which shows two private networks with routers that implement NAT. Suppose host C is connected to the web server at host E, which uses port 80.
Show the values of the address and port fields (according to the format below), for a typical packet sent by server E to host C. Also, show the fields in the packet as it would appear when it reaches host C. You can use the following format to give this information:
[Source IP, Dest. IP, Source Port, Dest. Port]
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
From server E [4.3.2.1, 5.6.7.8, 80, 220], at host C [4.3.2.1, 10.1.1.3, 80, 66]
(b)
From server E [4.3.2.1, 10.1.1.3, 80, 66], at host C [4.3.2.1, 10.1.1.3, 80, 66]
(c)
From server E [4.3.2.1, 5.6.7.8, 80, 66], at host C [4.3.2.1, 10.1.1.3, 80, 220]
(d)
From server E [4.3.2.1, 5.6.7.8, 80, 220], at host C [5.6.7.8, 10.1.1.3, 220, 66]
(e)
From server E [4.3.2.1, 5.6.7.8, 80, 66], at host C [4.3.2.1, 10.1.1.3, 80, 66]
Feedback:
A typical packet from server E that is destined for host C will be sent to the NAT router, as host C is not visible to server E. Therefore, the format from server will be: [4.3.2.1, 5.6.7.8, 80, 220]
where 4.3.2.1 is the IP address of server E, and 80 is its port number. The IP address of NAT router is 5.6.7.8 and the destination port number will be 220 i.e. the external port # for this connection.
The same packet will appear as [4.3.2.1, 10.1.1.3, 80, 66] where the destination IP has been replaced by the IP address of host C i.e. 10.1.1.3 and the destination port has been replaced by the internal port number i.e. 66. The source IP and port number will remain unchanged i.e. 4.3.2.1 & 80.
Q15
You are planning to setup a network for a multinational company. You have been allocated a Class A network address of 120.0.0.0 and need to create 700 subnets. What is the new subnet mask to satisfy this criterion and how many usable IP addresses will be available within each subnet? You will aim to maximize the number of IP addresses on each subnet while creating the required number of subnets.
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
120.0.0.0, 255.255.128.0, 32768 addresses
(b)
120.0.0.0, 255.255.128.0, 32766 addresses
(c)
120.0.0.0, 255.255.192.0, 16384 addresses
(d)
120.0.0.0, 255.255.192.0, 16382 addresses
(e)
120.0.0.0, 255.255.224.0, 8192 addresses
Feedback:
The default Class A subnet mask is 255.0.0.0 = 11111111.00000000.00000000.00000000
In order to have 700 subnets, we will need to use 10 bits from the host part and create 2^10 = 1024 subnets, as 2^9 = 512 will not be enough. The new subnet mask we will use for this configuration is: 255.255.192.0 = 11111111.11111111.11000000.00000000 (or /18)
We will be left with 14 bits for the host addresses and the number of usable addresses within each subnet is given by the following formula:
host per subnet: (2^n)-2 (where n is the number of zero bits in the subnet mask)
Therefore, we will have (2^14)-2 = 16382 usable host addresses within each subnet.
So, the correct answer is: 120.0.0.0, 255.255.192.0, 16382 addresses
Q16
You are planning to setup a network for a multinational company. You have been allocated a Class B network address of 130.120.0.0 and need to create 80 subnets. What is the new subnet mask to satisfy this criterion and how many usable IP addresses will be available within each subnet? You will aim to maximize the number of IP addresses on each subnet while creating the required number of subnets.
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
130.120.0.0, 255.255.252.0, 1022 addresses
(b)
130.120.0.0, 255.255.252.0, 1024 addresses
(c)
130.120.0.0, 255.255.254.0, 510 addresses
(d)
130.120.0.0, 255.255.254.0, 512 addresses
(e)
130.120.0.0, 255.255.255.0, 254 addresses
Feedback:
The default Class B subnet mask is 255.255.0.0 = 11111111.11111111.00000000.00000000
In order to have 80 subnets, we will need to use 7 bits from the host part and create 2^7 = 128 subnets, as 2^6 = 64 will not be enough. The new subnet mask we will use for this configuration is: 255.255.254.0 = 11111111.11111111.11111110.00000000 (or /23)
We will be left with 9 bits for the host addresses and the number of usable addresses within each subnet is given by the following formula:
host per subnet: (2^n)-2 (where n is the number of zero bits in the subnet mask)
Therefore, we will have (2^9)-2 = 510 usable host addresses within each subnet.
So, the correct answer is: 130.120.0.0, 255.255.254.0, 510 addresses
Q17
Consider a datagram of 5840 bytes and the MTU is given as 1460 bytes. Compute the number of fragments and (length, offset) values for each fragment. You should assume that the IP header requires 20 bytes.
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
5 fragments, [(1460, 0), (1460, 180), (1460, 360), (1460, 540), (100, 720)]
(b)
5 fragments, [(1440, 0), (1440, 180), (1440, 360), (1440, 540), (80, 720)]
(c)
4 fragments, [(1460, 0), (1460, 183), (1460, 366), (1460, 459)]
(d)
5 fragments, [(1460, 0), (1460, 1440), (1460, 2880), (1460, 4320), (100, 5760)]
(e)
4 fragments, [(1460, 0), (1460, 1460), (1460, 2920), (1460, 4380)]
Feedback:
Each fragment has an MTU = 1460 bytes out of which 20 bytes are used for the IP header; therefore, we can carry 1440 bytes payload per datagram. We will need a total of 5 fragments, where the first four fragments will carry 1440 bytes each and the last one will have 80 bytes of data (payload excluding IP header). The first four datagrams will be 1460 bytes long (payload + IP header) while the last one will be 100 bytes in length. Offsets within each datagram are computed by dividing the payload offset by 8 i.e. 0, 180, 360, 540 and 720 in this case. Therefore, the correct answer is:
5 fragments, [(1460, 0), (1460, 180), (1460, 360), (1460, 540), (100, 720)]
Q18
Consider a datagram of 4880 bytes and the MTU is given as 1220 bytes. Compute the number of fragments and (length, offset) values for each fragment. You should assume that the IP header requires 20 bytes.
(Select all that apply. Marks will be deducted for incorrect answers)
(a)
5 fragments, [(1220, 0), (1220, 150), (1220, 300), (1220, 450), (100, 600)]
(b)
5 fragments, [(1200, 0), (1200, 150), (1200, 300), (1200, 450), (80, 600)]
(c)
4 fragments, [(1220, 0), (1220, 153), (1220, 306), (1220, 459)]
(d)
5 fragments, [(1220, 0), (1220, 1200), (1220, 2400), (1220, 3600), (100, 4800)]
(e)
4 fragments, [(1220, 0), (1220, 1220), (1220, 2440), (1220, 3660)]
Feedback:
Each fragment has an MTU = 1220 bytes out of which 20 bytes are used for the IP header; therefore, we can carry 1200 bytes payload per datagram. We will need a total of 5 fragments, where the first four fragments will carry 1200 bytes each and the last one will have 80 bytes of data (payload excluding IP header). The first four datagrams will be 1220 bytes long (payload + IP header) while the last one will be 100 bytes in length. Offsets within each datagram are computed by dividing the payload offset by 8 i.e. 0, 150, 300, 450 and 600 in this case. Therefore, the correct answer is:
5 fragments, [(1220, 0), (1220, 150), (1220, 300), (1220, 450), (100, 600)]
Q19
Consider the following network of nodes and the associated cost of links between them:
Apply Dijkstra¡¯s algorithm to find out the path(s) with minimum cost from node A and E? (Select all that apply. Marks will be deducted for incorrect answers)
(a)
A->C->D->E
(b)
A->C->B->E
(c)
A->B->C->E
(d)
A->B->C->D->E
(e)
A->D->E
Feedback:
The easiest way will be to compute the costs of all given paths and select the minimum one i.e.
A->C->D->E=4+2+4=10 A->C->B->E=4+1+5=10 A->B->C->E=6+1+8=15 A->B->C->D->E=6+1+2+4=13 A->D->E=7+4=11
The proper way, however, is given below:
Step
N¡¯
D(B)/p(B)
D(C)/p(C)
D(D)/p(D)
0
1
A
AC
ACB
6,A
4,A
7,A
D(E)/p(E)
INFINITY
5,C
6,C
12,C
2
6,C
10,B
3
ACBD
10,D
We can see that the cost of reaching E is the same from B & D, therefore, we will consider both options. The exact solution will depend on the implementation of the minimum function, which is used by Dijkstra¡¯s algorithm. Now backtracking from E, we get the following shortest paths: A->C->D->E
A->C->B->E
Q20
Consider the following network of nodes and the associated cost of links between them:
Apply Dijkstra¡¯s algorithm to find out the path(s) with minimum cost from node A and E? (Select all that apply. Marks will be deducted for incorrect answers)
(a)
A->B->C->D->E
(b)
A->B->D->E
(c)
A->B->C->E
(d)
A->C->D->E
(e)
A->C->B->D->E
Feedback:
The easiest way will be to compute the costs of all given paths and select the minimum one i.e.
A->B->C->D->E=5+3+1+4=13
A->B->D->E=5+5+4=14
A->B->C->E=5+3+5=13
A->C->D->E=9+1+4=14 A->C->B->D->E=9+3+5+4=21 The proper way, however, is given below:
Step
N¡¯
D(B)/p(B)
D(C)/p(C)
D(D)/p(D)
0
1
2
3
A
AB
ABC
ABCD
5,A
9,A
INFINITY
9,C
D(E)/p(E)
INFINITY
8,B
10,B
INFINITY
13,C
13,D
We can see that the cost of reaching E is the same from C & D, therefore, we will consider both options. The exact solution will depend on the implementation of the minimum function, which is used by Dijkstra¡¯s algorithm. Now backtracking from E, we get the following shortest paths: A->B->C->D->E
A->B->C->E