IP Addressing & Subnetting: practice questions

IPv4 addressing and subnetting, private ranges, IPv6 address types and assignment, and how TCP and UDP compare.

CCNA 200-301 v1.1, exam topic 1.5-1.9 · part of 1. Network Fundamentals, 20% of the exam

The same material in the CCNA 200-301 v2.0 exam: IPv4 Addressing & Subnetting

The same material in the CCNA 200-301 v2.0 exam: IPv6 Addressing

What this topic covers

Reliable byte stream
Sequence numbers and acknowledgments deliver data in order.
TCP header fields
Ports, sequence and acknowledgment numbers, flags and window.
UDP properties
Connectionless, no reliability, minimal header.
Well-known ports
Servers listen on well-known port numbers such as 80 and 443.
Ports as demultiplexing keys
Ports identify the application process on a host.
Three-way handshake
SYN, SYN+ACK, ACK exchange to open a connection.
Retransmission and timeouts
Lost segments are resent after a timer expires.
Advertised window
The receiver tells the sender how much it can buffer.
Address structure
32 bits with a network part and a host part.
Historical classes
Class A, B and C splits and why classless addressing replaced them.
Octet conversion
Converting an 8-bit octet between binary and decimal.
Slash notation
/n means the first n bits are the network prefix.
Prefix length and block size
A /n block contains 2^(32-n) addresses.
Mask and prefix conversion
Masks are contiguous ones followed by zeros.
Applying the mask
Bitwise AND of address and mask gives the network number.
Network address
The lowest address in the block, host bits all zero.
Broadcast address
The highest address in the block, host bits all one.
Usable host addresses
2^(32-n) minus two usable addresses in a subnet.
Why subnet
Dividing one network number among several physical networks.
Subnet boundaries
Determining which subnet an address belongs to.
Variable-length subnetting
Different subnets in one network can use different masks.
Prefix aggregation
Combining contiguous prefixes into one shorter prefix.
Private ranges
10/8, 172.16/12 and 192.168/16 are not routed on the Internet.
Address compression
Leading zeros can be dropped and one run of zeros replaced by ::.
Prefix hierarchy
Providers, sites and subnets receive nested prefixes.
Unicast, multicast and anycast
IPv6 has no broadcast; multicast replaces it.
Anycast addresses
One address is assigned to a set of interfaces, and packets go to the nearest of them as the routing protocols see it.
Link-local scope
fe80::/10 addresses are valid only on the local link.
Modified EUI-64
An interface ID built from the MAC address: split it, insert FFFE and flip the universal/local bit.
Unique local addresses
fc00::/7 addresses, in practice fd00::/8, are for use inside a site and are not routed on the Internet.
SLAAC, DHCPv6 and static
Hosts can autoconfigure from router advertisements, lease an address from a DHCPv6 server, or be set by hand.
ND messages
Solicitations and advertisements replace ARP and help autoconfiguration.
Stateless autoconfiguration
A host builds its own address from the prefix routers advertise and its interface ID, with no server involved.
Well-known multicast groups
ff02::1 reaches all nodes and ff02::2 all routers on the link; IPv6 uses these where IPv4 would broadcast.
Solicited-node addresses
Neighbor discovery asks for an address through a multicast group built from its last 24 bits, so few hosts are disturbed.
Multicast scope
A multicast address carries a scope, such as link-local or site-local, that limits how far it travels.
Delivery types
One-to-one, one-to-many and one-to-all delivery.

Sample question

Try it, then open the answer. Our questions are written by AI and checked independently before they are published.

Easy Single choice

Refer to the exhibit. Which prefix represents the broadest organizational scope in the hierarchy?

Packet Capture Summary
No.  Source              Destination   Protocol  Info
1    2001:db8:100::1     fe80::2       DHCPv6    Reply (IA_PD: 2001:db8:100::/40)
2    fe80::2             ff02::1       ICMPv6    Router Advertisement (Prefix: 2001:db8:100:20::/56)
3    fe80::3             ff02::1       ICMPv6    Router Advertisement (Prefix: 2001:db8:100:20:1::/64)
  1. A. 2001:db8:100::/40
  2. B. 2001:db8:100:20::/56
  3. C. 2001:db8:100:20:1::/64
  4. D. fe80::/10
Show the answer

Answer: A. 2001:db8:100::/40

In the IPv6 address hierarchy, a shorter prefix length (smaller prefix number) indicates a larger block of addresses representing a broader organizational scope, such as an upstream provider or regional allocation. A longer prefix length indicates a more specific, narrower scope such as a site (/56) or an individual subnet/link (/64). Comparing the prefixes shown in the message exchange, 2001:db8:100::/40 has the shortest prefix length and thus encompasses the broadest scope.

Further reading