Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

Advanced Computer Networks Week-2 Assignment

Uploaded by

joshkimmi4668
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Advanced Computer Networks Week-2 Assignment

Uploaded by

joshkimmi4668
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Advanced Computer Networks Week-2 Assignment

1. Given a destination address of 11101000 in a binary trie, what is the first step during the IP
lookup?
A. Traverse to the left
B. Traverse to the right
C. Randomly choose to move left or right
D. Alternate between left and right traversal

Ans. B (Traverse to the right)

2. Consider the prefix database table shown below; how many fewer nodes will be needed to
represent a path-compressed trie compared to a 1-bit binary trie?

Rule Prefix
P1 *
P2 0*
P3 10*
P4 110*
P5 1010*

A. 0
B. 2
C. 3
D. 4

Ans. B (2)

3. Which among the following is true when the trie constructed with a set of prefixes resulted
into a full binary tree?

A. Only binary trie has the best lookup and update complexity
B. Only path compressed trie has the best lookup and update complexity
C. Both binary and path-compressed tries have the same lookup and update complexity
D. Binary trie and path-compressed tries have the same lookup complexity but different
update complexity.

Ans. C (Both binary and path-compressed tries have the same lookup and update complexity)

4. Consider the prefix database table shown below; what is the height of the trie constructed
using a 1-bit binary trie?
Note: The height of the root node (P1) is 1.

Rule Prefix

P1 *

P2 0*

P3 1*

P4 10*

P5 111*

P6 1000*

A. 6 P7 11001*
B. 7
C. 8 P8 100000*
D. 9 P9 10000010*
Ans. D (9)

5. Consider the following scenarios for how the DIR-24-8 algorithm performs route lookups
using two tables. Assume the routes listed below are already in the table: 10.54/16 (1),
10.54.34/24 (2), and 10.54.34.192/26 (3). The first route requires entries in TBL24 (First
Table), while the second and third routes require entries in TBLlong (Second Table). Which of
the following statements is/are correct based on the above scenario?

A. If a packet arrives with the destination address 10.54.22.147, the table will return an
entry with the correct next hop (1)
B. If a packet arrives with the destination address 10.54.34.23, the table will return an entry
with the correct next hop (2)
C. If a packet arrives with the destination address 10.54.34.15, the table will return an entry
with the correct next hop (1)
D. If a packet arrives with the destination address 10.54.39.128, the table will return an
entry with the correct next hop (1)

Ans. A, B, D (If a packet arrives with the destination address 10.54.22.147, the table will
return an entry with the correct next hop (1), If a packet arrives with the destination address
10.54.34.23, the table will return an entry with the correct next hop (2), If a packet arrives
with the destination address 10.54.39.128, the table will return an entry with the correct
next hop (1))
6. Given the prefix table provided below, identify which prefixes should be combined to
minimize the table size for efficient storage in TCAM.

No. Prefix Netmask Next hop


P1 10001010 11111000 4
P2 11011010 11110000 2
P3 11000110 11110000 2
P4 11100000 11110000 3
P5 10000111 11111000 4
P6 10101010 11110000 5

A. P1 and P4
B. P1 and P5
C. P2 and P3
D. P4 and P6

Ans. B and C (P1 and P5, P2 and P3)

7. What is the overall storage complexity for the binary trie structure in terms of the number of
prefixes (N) and the maximum length of the prefix (W)?

A. O(W)
B. O(N)
C. O(NW)
D. O(N2)

Ans. C. O(NW)

8. How are route prefixes longer than 24 bits handled in the DIR-24-8-BASIC algorithm?

A. Stored directly in TBL24


B. Utilize a separate table, TBLlong, with pointers from TBL24
C. Merged with shorter prefixes for compact storage
D. Increasing the width of memory entries

Ans. B (Utilize a separate table, TBLlong, with pointers from TBL24)


9. Consider the prefix database table shown below; what is the skip value for node P5 and the
segment for node P9 when a trie is constructed using path-compressed technique?

Rule Prefix

P1 *

P2 0*

P3 10*

P4 101*

P5 0101*

P6 10101*

P7 101001*

P8 1010110*

P9 01011010*

A. Skip: 3 and Segment: 01


B. Skip: 1 and Segment: 1010
C. Skip: 2 and Segment: 101
D. Skip: 2 and Segment: 010

Ans. D (Skip: 2 and Segment: 010)

10. In the TCAM device, the IP address 192.131.76.84 yields matches at various memory
locations: 4012, 2535, 1035, and 536. When confronted with multiple matches, the priority
encoder determines the output based on the highest priority. Which memory location is
prioritized by the priority encoder in case of multiple matches?

A. 536
B. 1035
C. 2535
D. 4012

Ans. A (536)

You might also like