24 IPv4 & IPv6 Addressing Practice Questions & Answers
Every IPv4 & IPv6 Addressing practice question from the Cisco CCNA 200-301 Practice Test, with the correct answer and a short explanation.
Start practice test →1. A printer is configured as 203.0.113.45/29. Which range contains every usable host address in the printer's subnet?
- A.203.0.113.41 to 203.0.113.46✓ Answer
- B.203.0.113.41 to 203.0.113.47
- C.203.0.113.40 to 203.0.113.47
- D.203.0.113.33 to 203.0.113.38
A /29 mask (255.255.255.248) gives a block size of 8, so subnets start at .32, .40, .48 and so on. The address .45 falls in 203.0.113.40/29, whose network address is .40 and broadcast address is .47, leaving .41 through .46 as the 2^3 - 2 = 6 usable hosts. Ranges that include .40 or .47 wrongly count the network or broadcast address, and .33-.38 belongs to the previous subnet.
Ref QB-YDQRMWSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
2. Two routers are joined by a point-to-point link addressed as 10.0.0.0/31. How many usable host addresses does that /31 provide?
- A.One, plus a broadcast
- B.Two, one for each router✓ Answer
- C.Four, like a /30 subnet
- D.Zero, both are reserved
RFC 3021 allows a /31 on point-to-point links: because only two devices share the link, no network or broadcast address is needed and both addresses are usable, one per router. Applying the normal 2^h - 2 rule would wrongly give zero. A /30 contains four addresses in total but only two usable, so it wastes half the block compared with a /31.
Ref QB-FWHK2WSource: RFC 3021; Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
3. An engineer is carving 172.16.10.0/24 with VLSM, largest subnet first. LAN A (100 hosts) has already been given 172.16.10.0/25. LAN B needs 50 hosts. Which subnet should LAN B receive?
- A.172.16.10.128/27
- B.172.16.10.64/26
- C.172.16.10.160/26
- D.172.16.10.128/26✓ Answer
Fifty hosts need 6 host bits (2^6 - 2 = 62 usable), so LAN B needs a /26 with a block size of 64. LAN A occupies .0-.127, so the next free /26 boundary is 172.16.10.128. A .64/26 overlaps LAN A, a /27 holds only 30 hosts, and .160 is not a multiple of 64, so it is not a valid /26 network boundary.
Ref QB-XDCEFVSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
4. A PC is configured with 192.168.50.70, mask 255.255.255.192 and default gateway 192.168.50.1. It reaches hosts on its own segment but nothing remote. What is the problem?
- A.The gateway is its subnet's broadcast address
- B.A gateway requires a /24 mask to be reachable
- C.The PC address is its subnet's network ID
- D.The gateway lies outside the PC's subnet✓ Answer
A /26 mask has a block size of 64, so the PC sits in 192.168.50.64/26 (.64-.127) while the gateway .1 is in 192.168.50.0/26. A host only forwards remote traffic to a gateway it considers on-link, so the gateway must be in the host's own subnet. The PC's network ID is .64, not .70; the broadcast of the gateway's subnet is .63, not .1; and no /24 mask is required.
Ref QB-EW69VUSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
5. A VLAN uses the subnet 172.16.32.0/20. Which of these addresses can be assigned to a host on that subnet?
- A.172.16.32.0
- B.172.16.48.1
- C.172.16.40.0✓ Answer
- D.172.16.47.255
A /20 mask is 255.255.240.0, a block size of 16 in the third octet, so the subnet spans 172.16.32.0 through 172.16.47.255. The address 172.16.40.0 lies inside that range and is neither the network nor the broadcast address; with a prefix shorter than /24, an address ending in .0 can be a valid host. 172.16.32.0 is the network address, 172.16.47.255 is the broadcast, and 172.16.48.1 belongs to the next subnet.
Ref QB-WDZ3AUSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
6. An administrator divides 192.0.2.0/24 into equal subnets using the mask 255.255.255.224. How many subnets result, and how many usable hosts does each one hold?
- A.6 subnets, 30 hosts each
- B.8 subnets, 32 hosts each
- C.16 subnets, 14 hosts each
- D.8 subnets, 30 hosts each✓ Answer
The mask 255.255.255.224 is a /27, which borrows 3 bits from the /24, giving 2^3 = 8 subnets. The 5 remaining host bits give 2^5 - 2 = 30 usable hosts per subnet, because the network and broadcast addresses cannot be assigned. Thirty-two forgets the minus 2, six applies the obsolete rule that discarded the first and last subnet, and 16 subnets of 14 hosts describes a /28.
Ref QB-DWTWPTSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
7. A design document lists a branch LAN as 10.8.16.0/21. Which dotted-decimal subnet mask must be entered on the router interface for that LAN?
- A.255.255.255.248
- B.255.255.252.0
- C.255.255.240.0
- D.255.255.248.0✓ Answer
A /21 prefix is 8 + 8 + 5 one-bits, so the third octet is 11111000, which equals 248, giving 255.255.248.0. The mask 255.255.240.0 is a /20 and 255.255.252.0 is a /22, both one bit off. The mask 255.255.255.248 is a /29, a common slip when the value 248 is placed in the wrong octet.
Ref QB-VDNR4TSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
8. A server has the address 172.20.85.10/18. What is the broadcast address of the server's subnet?
- A.172.20.95.255
- B.172.20.127.255✓ Answer
- C.172.20.85.255
- D.172.20.63.255
A /18 mask is 255.255.192.0, a block size of 64 in the third octet, so subnets begin at 0, 64, 128 and 192. The value 85 falls in the 64-127 block, so the subnet is 172.20.64.0/18 and its broadcast address is 172.20.127.255. 172.20.95.255 would be correct for a /19, 172.20.85.255 assumes a /24, and 172.20.63.255 is the previous subnet's broadcast.
Ref QB-CWFKHSSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
9. On a router, the interface summary shows this line: GigabitEthernet0/1, IP address 192.0.2.1, status administratively down, protocol down. What does this tell the technician?
- A.The interface is disabled by configuration✓ Answer
- B.Its IP address overlaps another interface
- C.The interface has no IP address assigned
- D.The far-end cable is unplugged or faulty
Administratively down means the interface has been disabled in the configuration with the shutdown command (or never enabled), so it will not come up until no shutdown is applied. A cabling or far-end problem shows a status of down, not administratively down. The line already lists an IP address, so one is assigned, and an overlapping address would be rejected when it is configured rather than shown as a status.
Ref QB-UDAEXRSource: Cisco CCNA 200-301 Exam Topics — 1.4 Identify interface and cable issues (collisions, errors, mismatch duplex, and/or speed)Report a problem with this question
10. Router R1 already has interface G0/0 configured as 10.10.10.1/25. Which address and prefix can be configured on G0/1 as a valid host address that does not overlap G0/0?
- A.10.10.10.100/26
- B.10.10.10.130/26✓ Answer
- C.10.10.10.70/27
- D.10.10.10.192/26
G0/0 owns 10.10.10.0/25, which is .0 through .127, and each router interface needs its own non-overlapping subnet. 10.10.10.130/26 sits in 10.10.10.128/26 (.128-.191), outside G0/0's range, and is a usable host. 10.10.10.100/26 (.64-.127) and 10.10.10.70/27 (.64-.95) both fall inside G0/0's subnet, and 10.10.10.192/26 is the network address of its /26, so it cannot be assigned to an interface.
Ref QB-YZ5G2BSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
11. An engineer configures 192.0.2.65 with mask 255.255.255.224 on a router interface that is up/up. Which pair of entries does the IPv4 routing table gain for that interface?
- A.C 192.0.2.0/24 and L 192.0.2.65/32
- B.C 192.0.2.64/27 and L 192.0.2.95/32
- C.C 192.0.2.64/27 and L 192.0.2.65/32✓ Answer
- D.C 192.0.2.65/27 and L 192.0.2.64/32
When an addressed interface comes up, the router adds a connected (C) route for the whole subnet, identified by its network address, and a local (L) /32 host route for the interface's own address. With a /27 the block size is 32, so 192.0.2.65 belongs to 192.0.2.64/27. A connected route never uses the host address as the prefix, the router does not assume the classful /24, and .95 is the subnet's broadcast address, not the interface address.
Ref QB-GHBNMBSource: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
12. A segment must hold 14 IP cameras plus one router interface acting as their default gateway. An engineer proposes a /28 for it. Which assessment is correct?
- A.Fits: 16 addresses cover all 15 devices
- B.Too small: 12 usable, so a /26 is needed
- C.Fits: a gateway needs no host address
- D.Too small: 14 usable, so a /27 is needed✓ Answer
The segment needs 15 host addresses, because the router interface acting as gateway consumes a host address just like each camera. A /28 has 16 addresses, but the network and broadcast addresses leave only 2^4 - 2 = 14 usable, one short. The next size, a /27, provides 30 usable hosts and is the smallest prefix that fits; a /26 would work but wastes more space.
Ref QB-XZS5V9Source: Cisco CCNA 200-301 Exam Topics — 1.6 Configure and verify IPv4 addressing and subnettingReport a problem with this question
13. A company decides to number its internal network from the RFC 1918 block 172.16.0.0/12. Which address range does that block cover?
- A.172.0.0.0 to 172.31.255.255
- B.172.16.0.0 to 172.32.255.255
- C.172.16.0.0 to 172.31.255.255✓ Answer
- D.172.16.0.0 to 172.16.255.255
A /12 fixes the first 12 bits, which leaves a block size of 16 in the second octet, so 172.16.0.0/12 runs from 172.16.0.0 to 172.31.255.255. Addresses such as 172.32.x.x or 172.15.x.x are therefore public, not private. Because RFC 1918 space is not routed on the public internet, hosts using it need NAT or PAT to reach internet destinations.
Ref QB-FHYAFASource: RFC 1918; Cisco CCNA 200-301 Exam Topics — 1.7 Describe private IPv4 addressingReport a problem with this question
14. A small office router's WAN interface receives the address 100.64.12.7/10 from the ISP. What does this address indicate?
- A.The ISP assigned an RFC 1918 private address
- B.DHCP failed and the router self-assigned it
- C.The ISP is using carrier-grade NAT shared space✓ Answer
- D.The router holds a globally routable address
100.64.0.0/10 is the shared address space reserved by RFC 6598 for carrier-grade NAT, so the ISP translates the office's traffic again before it reaches the internet. It is not one of the RFC 1918 private blocks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), it is not the 169.254.0.0/16 APIPA range that signals a DHCP failure, and it is not routable on the public internet.
Ref QB-22V5DDSource: RFC 6598; Cisco CCNA 200-301 Exam Topics — 1.7 Describe private IPv4 addressingReport a problem with this question
15. A technician must enter the compressed address 2001:db8:a::4:0:1 into a tool that accepts only the full, uncompressed form. Which entry is correct?
- A.2001:0db8:000a:0000:0000:0004:0000:0001✓ Answer
- B.2001:0db8:a000:0000:0000:4000:0000:1000
- C.2001:0db8:000a:0000:0004:0000:0000:0001
- D.2001:0db8:000a:0004:0000:0001:0000:0000
The compressed form shows six hextets (2001, db8, a, 4, 0, 1), so the double colon stands for exactly two all-zero hextets, placed where it appears between a and 4. Omitted zeros are always leading zeros, so each hextet is padded on the left: a becomes 000a, 4 becomes 0004 and 1 becomes 0001. Padding on the right or moving the zero run to another position produces a different address.
Ref QB-JH2BYDSource: RFC 4291; Cisco CCNA 200-301 Exam Topics — 1.8 Configure and verify IPv6 addressing and prefixReport a problem with this question
16. A host is configured with the IPv6 address 2001:db8:acad:12:a1b2::9/64. Which prefix identifies the subnet this host belongs to?
- A.2001:db8:acad:a1b2::/64
- B.2001:db8:acad:12::/64✓ Answer
- C.2001:db8:acad:1200::/64
- D.2001:db8:acad::/64
Each hextet is 16 bits, so a /64 prefix is the first four hextets, 2001:db8:acad:12, and the remaining a1b2:0:0:9 is the interface ID. The value a1b2 is the fifth hextet and belongs to the interface ID, not the prefix. Writing 1200 pads 12 on the wrong side (it is 0012), and 2001:db8:acad::/64 sets the fourth hextet to zero, which describes a different subnet.
Ref QB-ZZGT7CSource: RFC 4291; Cisco CCNA 200-301 Exam Topics — 1.8 Configure and verify IPv6 addressing and prefixReport a problem with this question
17. A clinic wants every IPv6 client to receive its address from a server that keeps a record of which address each client holds, along with DNS settings. Which assignment method meets this requirement?
- A.SLAAC plus stateless DHCPv6
- B.Stateful DHCPv6 address leasing✓ Answer
- C.SLAAC with no DHCPv6 server
- D.Static entry on each client
Stateful DHCPv6 has the server assign each client's address and keep a binding table of who holds which address, while also supplying options such as DNS. With SLAAC plus stateless DHCPv6, hosts build their own addresses from the router advertisement and the server hands out only options, so it keeps no address record. SLAAC alone and static addressing involve no server tracking at all.
Ref QB-HHPYSCSource: Cisco CCNA 200-301 Exam Topics — 1.8 Configure and verify IPv6 addressing and prefixReport a problem with this question
18. A host on an IPv6 LAN receives a router advertisement carrying the prefix 2001:db8:5:1::/64 with the autonomous (A) flag set. How does the host build its global unicast address using SLAAC?
- A.It asks a DHCPv6 server for the full 128-bit address to use
- B.It joins the RA's /64 prefix to a self-made interface ID✓ Answer
- C.It takes the router's whole address and increments the last digit
- D.It takes the router's link-local prefix and appends its own MAC
With SLAAC the router supplies only the network part: the host takes the 64-bit prefix advertised in the RA and generates the 64-bit interface ID itself, either with modified EUI-64 from its MAC address or with a randomized method. No DHCPv6 server is needed to form the address, the host never copies or increments the router's own address, and the link-local prefix fe80::/10 is used only for the link-local address, not for the global unicast address.
Ref QB-UZQ5C6Source: Cisco CCNA 200-301 Exam Topics — 1.8 Configure and verify IPv6 addressing and prefix; IETF RFC 4862Report a problem with this question
19. A router interface with MAC address 0c4a.7b11.2233 is given an IPv6 address using the modified EUI-64 method. Which 64-bit interface identifier does it generate?
- A.0e4a:7bff:fe11:2233✓ Answer
- B.8c4a:7bff:fe11:2233
- C.0e4a:7bfe:ff11:2233
- D.0c4a:7bff:fe11:2233
Modified EUI-64 splits the 48-bit MAC into 0c4a7b and 112233, inserts FFFE between the halves, and inverts the seventh bit (the universal/local bit) of the first byte. The first byte 0c is 00001100; flipping the seventh bit gives 00001110, which is 0e, so the result is 0e4a:7bff:fe11:2233. Leaving 0c skips the flip, 7bfe:ff11 inserts the bytes in the wrong order, and 8c flips the first bit instead of the seventh.
Ref QB-CHWAX6Source: RFC 4291 Appendix A; Cisco CCNA 200-301 Exam Topics — 1.9.d Modified EUI 64Report a problem with this question
20. During an audit, a technician finds a server using the IPv6 address fd12:3456:789a:1::10. Which address type is this?
- A.Link-local, within FE80::/10
- B.Multicast, within FF00::/8
- C.Unique local, within FC00::/7✓ Answer
- D.Global unicast, within 2000::/3
The first byte fd is 11111101, which matches the 7-bit prefix 1111110 of FC00::/7, the unique local address range; in practice ULAs start with fd because the eighth bit marks a locally assigned prefix. ULAs are the IPv6 counterpart of private addressing and are not routed on the internet. Link-local addresses begin with fe80, global unicast begins with binary 001 (2000-3fff), and multicast begins with ff.
Ref QB-TVEXGSSource: RFC 4193; Cisco CCNA 200-301 Exam Topics — 1.9.a Unicast (global, unique local, and link local)Report a problem with this question
21. The IPv6 details for a router interface list membership in the multicast group ff02::1:ff3c:4d5e. What is this group used for?
- A.All-routers group for router solicitations
- B.OSPFv3 group for designated router updates
- C.All-nodes group that replaces IPv4 broadcast
- D.Solicited-node group for NDP neighbor lookups✓ Answer
A solicited-node multicast address is ff02::1:ff00:0/104 followed by the last 24 bits of a unicast address, here 3c:4d5e. NDP neighbor solicitations for address resolution and duplicate address detection are sent to this group, so only nodes whose addresses end in those bits process them, which replaces ARP broadcasts. The all-routers group is ff02::2, the all-nodes group is ff02::1, and OSPFv3 uses ff02::5 and ff02::6.
Ref QB-AD9SWRSource: RFC 4291; Cisco CCNA 200-301 Exam Topics — 1.9.c MulticastReport a problem with this question
22. A technician new to IPv6 is reviewing the address types. Which statement is correct?
- A.IPv6 has no broadcast; multicast fills that role✓ Answer
- B.Anycast addresses come from a dedicated prefix
- C.Routers forward link-local traffic within a site
- D.ff02::1 is the IPv6 broadcast address on a link
IPv6 defines unicast, anycast and multicast but no broadcast; functions that used broadcast in IPv4, such as ARP, are handled by multicast groups. ff02::1 is the all-nodes multicast group, which is close in effect but is still multicast. Link-local addresses are never forwarded by routers beyond their link, and anycast addresses are taken from ordinary unicast space, so they look identical to unicast addresses.
Ref QB-SV3MBRSource: RFC 4291; Cisco CCNA 200-301 Exam Topics — 1.9 Describe IPv6 address typesReport a problem with this question
23. A Windows laptop on a wired office LAN shows IPv4 address 169.254.37.12, subnet mask 255.255.0.0, and no default gateway. It cannot reach the file server or the internet. What is the most likely explanation?
- A.No DHCP server answered, so it self-assigned an address✓ Answer
- B.A DHCP server assigned it an address from a /16 pool
- C.An administrator set a static address in the wrong range
- D.The router translated its private address with NAT
Addresses in 169.254.0.0/16 are IPv4 link-local (APIPA) addresses, which a client assigns to itself when it asks for DHCP and gets no offer. That is why there is no default gateway: the host can talk only to other devices on the same link, so the next step is to check DHCP reachability (the server, a relay on the router, or the switch port and VLAN). A DHCP server would normally also supply a gateway, an administrator would not pick the link-local range for a static address, and NAT changes addresses on the router, not the address configured on the host.
Ref QB-9DWERQSource: Cisco CCNA 200-301 Exam Topics — 1.10 Verify IP parameters for Client OS (Windows, Mac OS, Linux); IETF RFC 3927Report a problem with this question
24. A Linux host shows 10.20.30.40/16 with default gateway 10.20.30.1, but the LAN is actually 10.20.30.0/24. The host tries to reach a server at 10.20.31.9, which sits on a different routed subnet. What does the host do?
- A.It forwards the packet to 10.20.30.1 as normal
- B.It asks its DNS server to route the packet onward
- C.It ARPs for 10.20.31.9 directly, skipping the gateway✓ Answer
- D.It drops the packet as the gateway is off-subnet
A host compares the destination with its own network using its configured mask. With /16 it believes 10.20.0.0-10.20.255.255 is all on-link, so it sends an ARP request for 10.20.31.9 itself instead of for the gateway, and the remote server never answers on this segment. The gateway 10.20.30.1 is inside the host's /16, so it is not off-subnet, and DNS only resolves names; it never forwards packets.
Ref QB-RVQ96QSource: Cisco CCNA 200-301 Exam Topics — 1.10 Verify IP parameters for Client OS (Windows, Mac OS, Linux)Report a problem with this question
Other topics in this exam
Practice questions written to Cisco's published CCNA 200-301 exam topics and the IEEE and IETF standards behind them. Cisco and CCNA are trademarks of Cisco Systems, Inc.; this site is not affiliated with or endorsed by Cisco. Exam topics are revised periodically — check the current official topic list before you book. About the CCNA exam (Cisco) →