0% found this document useful (0 votes)
55 views7 pages

CNET Final Exam (Solution) (Fall-2023)

Uploaded by

Muhammad Awais
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views7 pages

CNET Final Exam (Solution) (Fall-2023)

Uploaded by

Muhammad Awais
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Question 1: MCQs – Set # 1 [20 Marks]

S. No. A B C D E S. No. A B C D E
01 X 21 X
02 X 22 X
03 X 23 X
04 X 24 X
05 X 25 X
06 X 26 X
07 X 27 X
08 X 28 X
09 X 29 X
10 X 30 X
11 X 31 X
12 X 32 X
13 X 33 X
14 X 34 X
15 X 35 X
16 X 36 X
17 X 37 X
18 X 38 X
19 X 39 X
20 X 40 X

Page 1 of 7
Question 2 (part-a) [10 Marks]
1.
Subnet 1:

 Router 1 Interface 0: 192.168.1.1


 Host A: 192.168.1.2
 Host B: 192.168.1.3

Subnet 2:

 Router 1 Interface 1: 192.168.2.1


 Router 2 Interface 0: 192.168.2.2
 Host C: 192.168.2.3
 Host D: 192.168.2.4

Subnet 3:

 Router 2 Interface 1: 192.168.3.1


 Host E: 192.168.3.2
 Host F: 192.168.3.3

2.

Assigning MAC addresses to the adapters:

 Router 1 Interface 0: MAC_A


 Router 1 Interface 1: MAC_B
 Router 2 Interface 0: MAC_C
 Router 2 Interface 1: MAC_D
 Host A: MAC_E
 Host B: MAC_F
 Host C: MAC_G
 Host D: MAC_H
 Host E: MAC_I
 Host F: MAC_J

3.

Steps for sending an IP datagram from Host E to Host B:

1. Host E checks its ARP table to find the MAC address for 192.168.3.1 (Router 2
Interface 1). Suppose the MAC address is MAC_D.
2. Host E encapsulates the IP datagram destined for Host B inside an Ethernet
frame.
o Source IP: 192.168.3.2 (Host E's IP address)
o Destination IP: 192.168.1.3 (Host B's IP address)

Page 2 of 7
o Source MAC: MAC_I (Host E's MAC address)
o Destination MAC: MAC_D (Router 2 Interface 1's MAC address)
3. Host E sends the Ethernet frame onto its LAN.
4. The Ethernet frame reaches Router 2 Interface 1.
5. Router 2 checks its ARP table to find the MAC address for 192.168.1.3 (Host
B). Suppose the MAC address is MAC_F.
6. Router 2 encapsulates the received Ethernet frame inside a new Ethernet
frame.
o Source IP: 192.168.3.1 (Router 2 Interface 1's IP address)
o Destination IP: 192.168.1.3 (Host B's IP address)
o Source MAC: MAC_D (Router 2 Interface 1's MAC address)
o Destination MAC: MAC_F (Host B's MAC address)
7. Router 2 sends the new Ethernet frame onto its LAN.
8. The Ethernet frame reaches Host B.
9. Host B receives the frame, extracts the IP datagram, and processes it.

Question 2 (part-b) [10 Marks]

Solution:
The full solution for figure 1 is shown below:

10001111 01110101 0
00010000 10100110 1
00110111 00000111 0
00111010 00001011 1
10111001 00001010 1
00101011 11010101 1

1. The parity bits for the 16 columns is: 00101011 11010101

2. The parity bits for the 5 rows is: 01011

3. The parity bit for the parity row is: 1

4. The bit that was flipped in figure 2 is (9,2):

00111111 10001100 1
01000010 11110110 0
00000111 01110000 1
00000001 11110100 0
11101110 01000100 0
10010101 11111010 0

5. Yes, with 2D parity, you can detect and correct a single flipped bit

Page 3 of 7
Question 3: MCQs – Set # 2 [15 Marks]

S. No. A B C D E S. No. A B C D E
41 X 56 X
42 X 57 X
43 X 58 X
44 X 59 X
45 X 60 X
46 X 61 X
47 X 62 X
48 X 63 X
49 X 64 X
50 X 65 X
51 X 66 X
52 X 67 X
53 X 68 X
54 X 69 X
55 X 70 X

Question 4 [10 Marks]

After obtaining first SampleRTT 106 ms:


DevRTT = 0.75*5 + 0.25 * | 106 - 100 | = 5.25 ms
EstimatedRTT = 0.875 * 100 + 0.125 * 106 = 100.75 ms
TimeoutInterval = 100.75+4*5.25 = 121.75 ms

After obtaining 120 ms:


DevRTT = 0.75*5.25 + 0.25 * | 120 – 100.75 | = 8.75 ms
EstimatedRTT = 0.875 * 100.75 + 0.125 * 120 = 103.16 ms
TimeoutInterval = 103.16+4*8.75 = 138.16 ms

After obtaining 140 ms:


DevRTT = 0.75*8.75 + 0.25 * | 140 – 103.16 | = 15.77 ms
EstimatedRTT = 0.875 * 103.16 + 0.125 * 140 = 107.76 ms
TimeoutInterval = 107.76+4*15.77 = 170.84 ms

Page 4 of 7
Question 5: MCQs – Set # 3 [10 Marks]

S. No. A B C D E S. No. A B C D E
71 X 81 X
72 X 82 X
73 X 83 X
74 X 84 X
75 X 85 X
76 X 86 X
77 X 87 X
78 X 88 X
79 X 89 X
80 X 90 X

Question 6 [25 Marks]

Question 6 (part-a) [10 Marks]

1. The address 160.24.10.0/24 is public.

2. Maximum number of hosts = 2^x - 2 = 2^8 - 2 = 254. The reason we have to subtract 2
from the final number is because there are always 2 addresses allocated for each address
block: the subnet ID (the first address) and the broadcast address (the last address); for
example, if you have 5 bits for hosts, you can have 30 hosts, because 2 of the addresses
are for the subnet ID and the broadcast address which when added equals 32, which is
2^5.

3. Subnet A has 21 hosts, so it will need at least 23 addresses (for the subnet ID and
broadcast address). The least number of bits that satisfy this is 5 bits. Knowing that, we
take the prior subnet and add 32, the result of which is 160.24.10.64/27

4. The broadcast address of subnet A (160.24.10.64/27) is 160.24.10.95, because it is the


last address in the IP range.

5. The first IP address of subnet A (160.24.10.64/27) is 160.24.10.65, found by adding 1


to the subnet address.

6. The last IP address of subnet A (160.24.10.64/27) is 160.24.10.94, found by


subtracting 1 from the broadcast address (160.24.10.95).
Page 5 of 7
7. Similar to the prior subnet, subnet B has 45 hosts, so it will need at least 47 addresses
(for the subnet ID and broadcast address). The least number of bits that satisfy this is 6
bits. Knowing that, we take the prior subnet and add 64, the result of which is
160.24.10.0/26

8. The broadcast address of subnet B (160.24.10.0/26) is 160.24.10.63, because it is the


last address in the IP range.

9. The first IP address of subnet B (160.24.10.0/26) is 160.24.10.1, found by adding 1 to


the subnet address.

10. The last IP address of subnet B (160.24.10.0/26) is 160.24.10.62, found by


subtracting 1 from the broadcast address (160.24.10.63).

Question 6 (part-b) [15 Marks]:

Show your steps in the table below [12 Marks].


B C D E F G
Step N’ D(B),P(B) P(C), D(D),P(D) D(E),P(E) D(F),P(F) D(G),P(G)
P(C)
0 A 1, A 3, A ∞ ∞ 10, A ∞
1 AB 2, B 8, B 6,B 10, A 3, B
2 ABC 8, B 5, C 10, A 3, B
3 ABCG 8, B 5, C 10, A
4 ABCGE 8,B 7, E
5 ABCGEF 7, E
6 ABCGEFD

1) List the vertices in the order which you marked them known [1 Mark].

ABCGEFD
2) Draw the shortest path tree from node A [1 Mark].

Page 6 of 7
3) Fill out the following forwarding table for A to all the destination nodes
[1 Mark].

Destination Link

B (A, B)

C (A, B)

D (A, B)

E (A, B)

F (A, B)

G (A, B)

Page 7 of 7

You might also like