CS FundamentalsVery hardGATE CS (PYQ pattern)
A router uses longest-prefix match with the table: 0.0.0.0/0 → e0; 172.16.0.0/12 → e1; 172.16.64.0/18 → e2; 172.16.80.0/20 → e3; 172.16.80.128/25 → e1; 172.20.0.0/14 → e2. Eight packets have destinations 172.16.80.200, 172.16.81.5, 172.16.100.1, 172.17.0.9, 172.21.255.1, 172.24.0.1, 8.8.8.8 and 172.16.64.7. How many of them leave through e1?
- A. 3
- B. 4
- C. 2
- D. 5
Correct answer: A. 3
Interfaces chosen, in order: ['e1', 'e3', 'e2', 'e1', 'e2', 'e1', 'e0', 'e2']. The /12 covers 172.16.0.0 to 172.31.255.255, so addresses not caught by a longer prefix go to e1; the /25 also maps to e1 although a /20 contains it.
More Computer Networks questions
- What is the longest prefix (smallest block) that covers all of the addresses 200.18.77.5, 200.18.79.250, 200.18.72.0 and 200.18.75.130?
- A host has address 172.20.145.200 and subnet mask 0xFFFFF800. How many usable host addresses of its subnet are numerically greater than…
- A router ACL entry matches an address if every bit position where the wildcard mask has a 0 equals the corresponding bit of 192.168.4.0…
- A 4000-byte IPv4 datagram (20-byte header, 3980 bytes of data) crosses links with MTUs 1500, 1000 and 576 bytes in turn, and every router…
- A DHCP client gets a 6-hour lease at time 0 and uses the default timers T1 = 50% and T2 = 87.5% of the current lease. At T1 its unicast…
- A host with MAC address 00:1A:2B:3C:4D:5E forms its IPv6 link-local address using modified EUI-64. What is the address (shortest form)?