CS FundamentalsVery hardGATE CS · Product company CS fundamentals
A firewall applies the first matching rule: 1. deny tcp from any to 10.0.0.0/8 port 23 2. permit tcp from 192.168.1.0/24 to any port 22–23 3. deny ip from 192.168.1.128/25 to any 4. permit ip from any to any What happens to (a) TCP 192.168.1.200 → 10.1.1.1:23, (b) TCP 192.168.1.200 → 172.16.0.1:23, (c) UDP 192.168.1.130 → 8.8.8.8:53?
- A. deny, permit, deny
- B. deny, deny, deny
- C. deny, permit, permit
- D. permit, permit, deny
Correct answer: A. deny, permit, deny
(a) matches rule 1 first: deny. (b) is not to 10/8, so rule 2 permits it before rule 3 (which would deny its source) is reached. (c) is UDP, so rules 1–2 do not apply and rule 3 denies it. Order matters more than specificity.
More Computer Networks questions
- A 20 mW signal travels through 3 km of cable that loses 6 dB per km and then through an amplifier with 10 dB gain. What is the output power?
- 172.20.0.0/22 is divided with VLSM for LANs of 500, 200, 100 and 60 hosts, largest first, each at the lowest free aligned address. Which…
- From 10.10.10.0/26, one /28 is assigned to a server LAN. How many /30 point-to-point links can be carved from the remaining addresses?
- A firewall allows traffic to 10.0.0.0/9, 10.64.0.0/10, 10.128.0.0/10 and 10.192.0.0/11. How many distinct destination addresses are allowed?
- A packet capture shows the destination address as the hexadecimal value C0A80A64, on a network using /28 subnets. What is the address in…
- The first 20 bytes of an IPv4 header are (hex): 45 00 05 DC 1C 46 40 00 3F 11 B1 E6 C0 A8 00 01 C0 A8 00 C7. How many bytes of payload…