R1 connects the campus to the internet on g0/1 (outside) and to the LAN on g0/0 (inside). The security team wants an inbound ACL on g0/1 that drops any packet whose source claims to be from the RFC 1918 range 172.16.0.0/12, as a basic anti-spoofing mitigation. Which single ACL entry matches exactly that source range and nothing outside it?
R1(config)# ip access-list extended ANTISPOOF
R1(config-ext-nacl)# deny ip <source> <wildcard> any
R1(config-ext-nacl)# permit ip any any
R1(config)# interface g0/1
R1(config-if)# ip access-group ANTISPOOF in- Adeny ip 172.16.0.0 0.0.15.255 any
- Bdeny ip 172.16.0.0 0.255.255.255 any
- Cdeny ip 172.16.0.0 0.0.255.255 any
- Ddeny ip 172.16.0.0 0.15.255.255 any Correct
Why A is wrong: This wildcard 0.0.15.255 only varies the lower 12 bits, matching 172.16.0.0/20 (172.16.0.0 to 172.16.15.255); it puts the variable bits in the wrong octets and covers far less than the /12 block.
Why B is wrong: 0.255.255.255 is the wildcard for a /8, so this matches 172.0.0.0 to 172.255.255.255 and wrongly catches addresses outside the 172.16.0.0/12 block, such as 172.32.5.1.
Why C is wrong: 0.0.255.255 is the wildcard for a /16, so this matches only 172.16.0.0 to 172.16.255.255 and misses the rest of the /12 range, such as 172.20.0.0.
Why D is correct: A /12 leaves 20 host bits, so the wildcard is the inverse of 255.240.0.0, which is 0.15.255.255; this matches exactly 172.16.0.0 through 172.31.255.255 and nothing else.