IP Addressing and Subnetting

Learn how IP addresses really work, from the bits up. Convert between binary and dotted-decimal notation, read subnet masks and CIDR prefixes, and find the network, broadcast and host addresses of any IPv4 subnet. Tell public, private and special-purpose addresses apart, divide an address block into equal subnets and design a variable-length (VLSM) plan for real host counts. Then move to IPv6: write and shorten 128-bit addresses, plan /64 subnets and recognize global, unique local, link-local, multicast and anycast addresses and modified EUI-64 interface IDs.

BeginnerLesson 4 of 9 in Networking Fundamentals Course

What you will learn

  1. Convert octets between binary and decimal, and explain how a 32-bit IPv4 address is written and how it splits into a network part and a host part.
    • Convert octets between binary and decimal
      Use the place values of an 8-bit octet to turn any number from 0 to 255 into binary and back, quickly and without errors.
    • Explain how an IPv4 address is built
      Read dotted-decimal notation, see that a mask decides where the network part ends, and recognize the historical address classes and why classless addressing replaced them.
  2. Write masks in dotted-decimal and CIDR prefix form, find the network address, broadcast address and usable host range of any IPv4 subnet, and use them to check a host's settings.
    • Write subnet masks in dotted-decimal and prefix notation
      Convert between dotted-decimal masks and prefix lengths, recognize valid masks, and work out the size and block size of a subnet from its prefix.
    • Find the network address, broadcast address and host range
      Apply a mask to any IPv4 address, by the binary method or the block-size method, to find its subnet, its first and last usable addresses and its number of hosts.
    • Check whether hosts share a subnet and verify host settings
      Decide whether two addresses are in the same subnet, explain how a host chooses between direct delivery and its default gateway, and find address, mask and gateway errors.
  3. Tell public from private and shared IPv4 addresses, explain why private addressing exists, and recognize the reserved ranges that have special meanings.
    • Tell public addresses from private addresses
      Recognize the three private ranges and the shared address space, and explain how private networks reach the internet through address translation.
    • Recognize special-purpose IPv4 addresses
      Identify loopback, link-local (APIPA), unspecified, broadcast, multicast, reserved, documentation and benchmarking addresses, and use them when troubleshooting.
  4. Divide a block into equal subnets, design a variable-length plan that fits real host counts, and check a plan for alignment, overlap and blocks that can be combined.
    • Divide a block into equal subnets
      Borrow host bits to create a required number of equal subnets or subnets of a required size, and list every resulting subnet with its range.
    • Design a variable-length (VLSM) address plan
      Size each subnet to its own need, allocate subnets from largest to smallest on correct boundaries, and record a complete, non-overlapping plan with room to grow.
    • Check blocks for overlap and combine them into a summary
      Test whether a prefix is a valid network and whether two blocks overlap, and find the single prefix that summarizes a group of contiguous subnets.
  5. Explain why IPv6 exists, write 128-bit addresses in full and shortened form, and find and plan IPv6 prefixes and subnets.
    • Write IPv6 addresses in full and compressed form
      Use hexadecimal to read IPv6 addresses, apply the two shortening rules and the recommended text form, and describe how IPv4 and IPv6 run side by side.
    • Find and plan IPv6 prefixes and subnets
      Read prefix lengths, find the prefix of an address, divide a site prefix into /64 subnets and check an interface's IPv6 settings.
  6. Recognize unicast, multicast and anycast addresses and the special IPv6 ranges from their prefixes, and build an interface ID with modified EUI-64.
    • Recognize global unicast, unique local and link-local addresses
      Identify the three main kinds of IPv6 unicast address from their first hex digits, and explain where each one can be used.
    • Recognize multicast, anycast and special IPv6 addresses
      Explain why IPv6 has no broadcast, read multicast scopes and well-known groups, build a solicited-node address, and identify anycast, loopback, unspecified, mapped and documentation addresses.
    • Build interface IDs, including modified EUI-64
      Describe the ways an interface gets its 64-bit interface ID, and build and recognize a modified EUI-64 interface ID from a MAC address.

IP Addressing and Subnetting study guide

6 chapters

1

Read IPv4 addresses in binary and dotted-decimal form

An IPv4 address looks like four ordinary numbers, but subnetting works on the bits behind them. Learn to move between those two views without losing your place. The same address can belong to different-sized networks depending on its mask, so reading the number is only the first step. You will also meet the old address classes, which still appear in networking vocabulary even though modern networks use explicit prefixes.

1.1 Convert octets between binary and decimal

An octet is a group of eight bits. Each bit holds either 0 or 1. An IPv4 address has four octets, making 32 bits in all. Start with one octet; the same method works on each of the four parts.

Give each bit its value

Read the positions from left to right:

Position12345678
Value1286432168421

Each position is worth twice the one to its right. Add a position's value only when its bit is 1. For 10101100, the active positions are 128, 32, 8 and 4:

128+32+8+4=172

The zero in the 64 position contributes nothing. In 01100100, the 1s select 64, 32 and 4, giving 100. The leftmost bit carries the greatest value; 10000000 is 128, while 00000001 is 1.

Build binary from decimal

To convert 200, work through the same values in order. At each position, ask whether its value fits into the amount left.

  1. 128 fits: write 1 and leave 72.
  2. 64 fits: write 1 and leave 8.
  3. 32 and 16 do not fit: write 0 in both positions.
  4. 8 fits: write 1 and leave 0.
  5. The 4, 2 and 1 positions are all 0.

The result is 11001000. Check it by adding the selected values: 128 + 64 + 8 = 200. Once the remainder reaches zero, keep writing zeros until all eight positions are filled.

Write decimal 10 as 00001010 when it is an octet. The shorter binary number 1010 has the same value, but eight positions let you line up an address with its subnet mask. Do not treat a binary string as a decimal number: binary 00000100 means four, not one hundred.

Recognize mask patterns

Subnet masks repeatedly use octets whose 1s fill from the left. These patterns are useful enough to learn:

BinaryDecimalBinaryDecimal
1000000012811111000248
1100000019211111100252
1110000022411111110254
1111000024011111111255

Each row adds another place value. For instance, 224 is 128 + 64 + 32. An octet of all zeros is 0; all ones sum to 255.

Count combinations

With one bit there are two possible patterns. With two bits there are four: 00, 01, 10 and 11. Each added bit doubles the possibilities, so n bits give 2n values. Eight bits give 256 values, numbered 0 through 255. This distinction between the number of values and the largest value matters when you count addresses.

Key Takeaways

  • An octet has eight bits, with place values 128 through 1 from left to right.
  • Add the values under 1 bits to convert binary to decimal.
  • Convert decimal by testing each place value and subtracting those that fit.
  • Write eight positions when lining an octet up with a mask.
  • Eight bits give 256 values, from 0 to 255.

1.2 Explain how an IPv4 address is built

An IPv4 address is a 32-bit number used to identify a network interface. Its familiar form, dotted decimal, converts each of four octets to decimal and separates them with dots. The dots mark boundaries between octets; they are not decimal points.

Read four octets

The address 192.168.10.77 is:

11000000.10101000.00001010.01001101

The first octet is 128 + 64 = 192. The second is 128 + 32 + 8 = 168. The third is 8 + 2 = 10, and the fourth is 64 + 8 + 4 + 1 = 77. Each octet must be between 0 and 255. An address such as 192.168.1.256 is invalid because its final number needs more than eight bits.

The full space contains 232 addresses: 4,294,967,296. Some are reserved for specific purposes, so this is not the number available for ordinary internet hosts.

An address belongs to an interface, the connection through which a device joins a network. A router connecting three IP networks needs addressing on all three interfaces. A laptop using Wi-Fi and Ethernet can have a different IPv4 address on each. This is why troubleshooting starts with the interface in use.

Find the boundary with a mask

Every address has a network portion and a host portion. The network portion identifies its subnet; the host portion selects an interface within that subnet. These are portions of the same 32 bits, not extra numbers added to the address.

The address alone does not show the split. With /16, 172.16.45.200 belongs to 172.16.0.0/16. With /21, it belongs to 172.16.40.0/21. The longer prefix keeps more bits in the network portion and leaves fewer for hosts. Always carry the prefix with an address when calculating its subnet.

Understand the old classes

Before CIDR, address classes supplied fixed default boundaries:

ClassFirst octetOld default or purpose
A1–126/8, mask 255.0.0.0
B128–191/16, mask 255.255.0.0
C192–223/24, mask 255.255.255.0
D224–239Multicast groups
E240–255Reserved space

The first bits are 0, 10, 110, 1110 and 1111, respectively. First octets 0 and 127 have special uses even though their leading bit is 0. For example, 150.20.0.9 falls in the historical class B range; 230.0.0.5 is a multicast group address.

Fixed classes wasted space. A network needing 300 host addresses would exceed a class C block's 254 usable addresses but use only a small part of a class B block's 65,534. Classless Inter-Domain Routing (CIDR) replaced fixed boundaries in 1993. A prefix can now be any length from 0 to 32. 10.1.2.0/24 is a valid classless block: the old class A label does not force it to use /8.

Key Takeaways

  • IPv4 uses four decimal octets, each between 0 and 255.
  • An address identifies an interface, so one device can have several addresses.
  • A mask or prefix supplies the network/host boundary.
  • Modern CIDR prefixes override historical class defaults.
2

Use subnet masks and prefixes to find a subnet's boundaries

A subnet mask turns an address into a usable network plan. You will read masks in both common forms, find the first and last addresses of a subnet, and decide which addresses can go on interfaces. Then use the same calculations to check a host and its gateway. The key is to locate the boundary correctly: sometimes it falls within an octet, and sometimes the host portion spans more than the final octet.

2.1 Write subnet masks in dotted-decimal and prefix notation

A subnet mask marks which bits belong to the network. It has 32 bits: a continuous run of 1s from the left, followed by 0s. A 1 keeps the corresponding address bit in the network portion. A 0 marks a host position.

Count network bits

Prefix notation writes the number of mask 1s after a slash. /24 means 24 network bits and eight host bits. Its mask is 11111111.11111111.11111111.00000000, or 255.255.255.0.

For /21, split 21 into 8 + 8 + 5. The first two octets are 255. The next contains five 1s, 11111000, worth 248. The final octet is zero. The mask is 255.255.248.0.

To go the other way, count the 1s in each octet. 255.255.255.192 contains 8 + 8 + 8 + 2 = 26, so it is /26. The partly filled octet is often the only part you need to convert.

PrefixMaskHost bitsTotal addressesOrdinary usable hosts
/24255.255.255.08256254
/25255.255.255.1287128126
/26255.255.255.19266462
/27255.255.255.22453230
/28255.255.255.24041614
/30255.255.255.252242
Check that a mask is valid

A mask octet can be 0, 128, 192, 224, 240, 248, 252, 254 or 255. However, valid octets alone are not enough: the entire mask must keep the continuous run of 1s. After an octet below 255, every later octet must be zero. 255.255.0.255 fails because its 1s restart. 255.255.255.100 fails because binary 100 is 01100100, which breaks the pattern within one octet.

Count addresses and find the increment

If the prefix is p, the host-bit count is h=32−p. There are 2h addresses. In an ordinary broadcast subnet, reserve the all-zero host pattern for the network and the all-one pattern for broadcast, leaving 2h−2 usable addresses. /31 and /32 have special uses and are handled separately.

The block size, or increment, is 256 minus the mask value in the octet where the mask stops being 255. With /26, that octet is the fourth: 256 − 192 = 64. Networks start at .0, .64, .128 and .192. With /21, the increment is 256 − 248 = 8 in the third octet; the fourth octet is still part of the host portion.

A larger prefix number means fewer addresses: /26 is smaller than /25. Each added network bit halves the possible host patterns.

Recognize the ends of the prefix scale

A /0 has no fixed network bits and mask 0.0.0.0; it covers the entire IPv4 space. A /32 fixes all 32 bits and has mask 255.255.255.255; it identifies one exact address. These endpoints help you read a default route or host prefix without trying to assign an ordinary usable-host count to it.

Read settings in different forms

Windows ipconfig displays a dotted-decimal mask. Linux ip addr attaches the prefix to the address. macOS ifconfig may display a hexadecimal mask such as 0xffffff00, equivalent to 255.255.255.0. These are different ways to show the same boundary.

Key Takeaways

  • A valid mask has contiguous 1s followed by 0s.
  • A prefix counts network bits; the remaining bits are host bits.
  • Ordinary usable host count is 2h−2.
  • The increment is 256 minus the mask value in the boundary octet.
  • A longer prefix describes a smaller block.

2.2 Find the network address, broadcast address and host range

The network address has every host bit set to 0. The broadcast address has every host bit set to 1. In an ordinary IPv4 subnet, the addresses between those endpoints are available for interfaces.

Apply the mask bit by bit

A bitwise AND keeps a 1 only when both input bits are 1. All other pairs give 0. ANDing an address with its mask preserves the network bits and clears the host bits.

For 192.168.10.77/26, the first 24 bits are fully masked. Work on the final octet:

Address: 01001101   (77)
Mask:    11000000   (192)
AND:     01000000   (64)

The network is 192.168.10.64. Six host bits remain. Set them all to 1: 01111111 is 127, making the broadcast 192.168.10.127. The usable range runs from 192.168.10.65 through 192.168.10.126, containing 26−2=62 addresses.

The broadcast is one less than the next network address. Adding the whole block size to .64 produces .128, the next subnet, not this subnet's broadcast.

Use the block-size shortcut

For 172.16.45.200/21, convert /21 to 255.255.248.0. The boundary is in octet three, with increment 8. Multiples around 45 are 40 and 48, so 45 lies in the block starting at 40.

  • Network: 172.16.40.0.
  • Next network: 172.16.48.0.
  • Broadcast: 172.16.47.255.
  • First and last usable: 172.16.40.1 and 172.16.47.254.

The full fourth octet is host space, so clear it to 0 for the network and fill it with 255 for the broadcast. The block has 11 host bits, giving 211−2=2,046 usable addresses.

An address ending in .0 or .255 can still be a host address in a larger subnet. Both 172.16.41.0 and 172.16.44.255 lie between these endpoints. Their complete host portions are neither all zeros nor all ones. Judge all host bits, not only the last decimal number.

The increment describes movement in one octet, not always the number of addresses in the whole block. In the /21 example, eight third-octet values each contain 256 final-octet values, giving 2,048 total addresses. Subtracting the two reserved endpoints gives the same 2,046 usable addresses as the host-bit formula. Keep these two meanings of “block size” separate when the boundary is before octet four.

Handle /31 and /32 correctly

A /31 contains two addresses. On a supported point-to-point router link, both are usable under RFC 3021; no broadcast reservation is needed. For example, 10.0.0.8/31 can number its two endpoints as 10.0.0.8 and 10.0.0.9.

A /32 identifies one exact address, such as a router's logical loopback interface. It does not supply a range of hosts. Do not apply the ordinary subtract-two formula to either special case.

Check an endpoint calculation

Verify that the network begins on the increment, the original address falls within the block, and the next network begins immediately after the broadcast. For ordinary broadcast subnets, first usable is network + 1 and last usable is broadcast − 1. If the prefix cuts the third octet, a calculation that changes only the fourth octet has missed the boundary.

Key Takeaways

  • AND the address with its mask to find the network address.
  • Set all host bits to 1 to find the broadcast address.
  • Use the increment in the octet where the prefix boundary falls.
  • The next network is one address beyond the broadcast.
  • An ending of .0 or .255 alone does not decide whether an address is usable.
  • A supported /31 link uses both addresses; /32 identifies one address.

2.3 Check whether hosts share a subnet and verify host settings

A host uses its own address and mask to decide whether a destination is local. If both addresses produce the same network address under that mask, it sends directly on the local network. Otherwise, it sends to its default gateway, a router interface in its own subnet.

Compare networks, not the first three numbers

192.168.1.100/25 belongs to 192.168.1.0/25. The address 192.168.1.130/25 belongs to 192.168.1.128/25. Their first three octets match, but the /25 boundary divides the last octet in half. They are in different subnets.

The prefix also changes whether an address is assignable. 192.168.10.64 is a usable address in 192.168.10.0/25, whose hosts run from .1 to .126. In 192.168.10.64/26, the same .64 is the network address. You need both address and mask to judge it.

Check a gateway

Suppose a PC has 192.168.10.70/26 with gateway 192.168.10.1. The PC's subnet is 192.168.10.64/26, with hosts .65 through .126. The gateway .1 is outside that range, so it is not a valid directly connected gateway for these settings.

Check the address plan before changing anything. If the PC belongs in this subnet, use the address of the router interface serving it, such as .65 if that is the configured router address. If the PC belongs elsewhere, correct its address or mask to match that plan. A plausible unused address is not enough: the gateway entry must identify the actual router interface.

Notice mismatched masks

Host A is 192.168.1.10/24; host B is 192.168.1.200/25. A treats B as local. B places itself in 192.168.1.128/25 and treats A as remote. They disagree because their masks define different boundaries. Communication may fail or depend on routing behavior. Interfaces intended to share one subnet must use its planned prefix consistently.

A duplicate address causes a different problem: two interfaces claim the same address on the same network. Traffic may reach the wrong interface or fail intermittently. The fact that private addresses are reusable across separate organizations does not permit duplicates within one connected subnet.

Read the relevant settings

On Windows, run ipconfig or ipconfig /all. On Linux, ip addr shows addresses and prefixes; ip route shows a gateway after default via. On macOS, use network settings or ifconfig for the address and mask.

Ask whether the address is usable under its prefix, whether the actual gateway is in the subnet, and whether the prefix matches the plan. Also check uniqueness when symptoms are intermittent.

On Cisco IOS, an interface-mode command such as ip address 192.168.10.65 255.255.255.192 sets an IPv4 address. show ip interface brief lists interface addresses and status; it does not replace checking the configured mask. Separate routed interfaces normally need non-overlapping subnets, and IOS commonly rejects overlaps.

Key Takeaways

  • Compare calculated network addresses under the same mask to test subnet membership.
  • Use a directly connected router interface as the default gateway.
  • Check the host address, prefix and gateway against the address plan.
  • Keep interface addresses unique within a subnet.
3

Distinguish public, private and special-purpose IPv4 addresses

An address can look ordinary and still have a special job. Private space belongs inside networks; other ranges identify local tests, temporary link-local settings, multicast groups or examples. Learning the exact boundaries helps you choose valid addresses and read troubleshooting clues. You will connect private addressing with NAT, then distinguish a useful clue about a fault from proof of its precise cause.

3.1 Tell public addresses from private addresses

Public IPv4 addresses are globally unique addresses eligible for routing across the internet. Most organizations obtain them from an ISP. IANA allocates space through five Regional Internet Registries: AFRINIC, APNIC, ARIN, LACNIC and RIPE NCC. Being public does not guarantee that a device will accept connections; routes and security settings still matter.

Learn the three private blocks

RFC 1918 reserves address space that organizations can reuse internally:

PrefixInclusive range
10.0.0.0/810.0.0.0–10.255.255.255
172.16.0.0/12172.16.0.0–172.31.255.255
192.168.0.0/16192.168.0.0–192.168.255.255

These addresses are not routed on the public internet. Two separate organizations may both use 10.1.0.0/24 internally. Within either connected subnet, each interface still needs its own address.

Pay particular attention to 172. Only second octets 16 through 31 are private. 172.20.10.2 lies inside the block, while 172.15.0.1 and 172.32.0.1 lie outside it. The mask 255.240.0.0 keeps the first four bits of the second octet fixed, spanning 16 possible second-octet values.

Connect private hosts to public networks

An edge router or firewall can perform network address translation (NAT). For an outgoing connection, it replaces a private source address with a public address and maintains the information needed to translate the reply.

Port address translation (PAT) lets several internal hosts share one public address. Port numbers help distinguish their connections. This reduces the public addresses an organization needs. NAT and PAT describe translation behavior; they are not extra private address ranges.

IPv4 has about 4.3 billion possible addresses, with substantial space reserved for special uses. IANA distributed its last general free pool blocks in February 2011. Private addressing with translation allows reuse; IPv6 supplies a much larger address space.

Recognize an ISP's shared space

100.64.0.0/10 spans 100.64.0.0 through 100.127.255.255. RFC 6598 reserves it for provider networks using carrier-grade NAT (CGNAT). It is neither public space nor one of the three RFC 1918 private blocks.

If a home router's outside interface shows 100.72.5.9, that address lies in the ISP's shared range. The provider may translate it again before traffic reaches the public internet. Calling every nonpublic address “RFC 1918” would hide this difference.

Choose space that can connect later

A large organization may divide the private 10.0.0.0/8 block into site and department networks. Small routers often default to 192.168.0.0/24 or 192.168.1.0/24. Before connecting two sites through a VPN, compare their plans. If both use the same subnet, an address such as 192.168.1.20 cannot uniquely identify which site's host is intended. Choose non-overlapping space for networks that will meet.

Key Takeaways

  • RFC 1918 reserves exactly 10/8, 172.16/12 and 192.168/16.
  • Only second octets 16–31 are private within the 172 range.
  • NAT translates addresses; PAT separates shared-address connections through ports.
  • 100.64.0.0/10 is ISP shared space, distinct from RFC 1918.
  • Avoid overlapping private ranges when connecting sites.

3.2 Recognize special-purpose IPv4 addresses

Special-purpose addresses carry information about how a packet or interface is being used. Check the whole reserved range before treating an unfamiliar address as an ordinary public host.

Tests that stay on the host

127.0.0.0/8 is loopback space. 127.0.0.1 is the usual loopback address, but 127.0.0.53 is also inside the block. A loopback packet stays on the host. A successful ping 127.0.0.1 checks local IP software; the packet never tests the network cable or remote router.

Addresses limited to one link

IPv4 link-local space is 169.254.0.0/16. On Windows it is associated with Automatic Private IP Addressing (APIPA). A host that cannot obtain a DHCP address may select a local address from 169.254.1.0 through 169.254.254.255, using a /16 mask. The first and last /24 blocks are reserved for this selection process.

Such an address supports communication on the local link, not routed internet access. If a DHCP-configured workstation unexpectedly shows 169.254.37.12, check its link, switch port or VLAN and the path to DHCP. The address suggests failed automatic assignment; by itself it does not identify which component failed. A manually entered link-local address can look the same.

Separate the zero and broadcast meanings

0.0.0.0 can be a source meaning that the host has no address yet. In a server's listening settings, it means all local IPv4 addresses. With /0, 0.0.0.0/0 names every IPv4 destination and is used for a default route. The prefix changes the meaning.

255.255.255.255 is the limited broadcast, kept on the local network. A subnet's own broadcast, such as 192.168.10.127 for 192.168.10.64/26, is a directed broadcast. Routers normally disable forwarding of directed broadcasts by default.

Know the other ranges
RangePurpose
224.0.0.0/4Multicast groups, through 239.255.255.255
240.0.0.0/4Reserved space; its last address is limited broadcast
192.0.2.0/24Documentation, TEST-NET-1
198.51.100.0/24Documentation, TEST-NET-2
203.0.113.0/24Documentation, TEST-NET-3
198.18.0.0/15Network benchmark testing, through 198.19.255.255

A multicast address identifies a group destination, not a host's own unicast address. The smaller block 224.0.0.0/24 is reserved for local-link control traffic. Examples include 224.0.0.5 for OSPF routers and 224.0.0.251 for multicast DNS.

Documentation blocks let instructions show realistic address calculations without naming a live public host. Benchmark space serves controlled performance tests. Neither category becomes an ordinary internet host range simply because it is outside RFC 1918. IANA's special-purpose registry is the reference for less familiar blocks.

Key Takeaways

  • Loopback traffic stays on the host.
  • Unexpected APIPA settings suggest a DHCP assignment or connectivity problem.
  • 0.0.0.0, 0.0.0.0/0 and a server listening on 0.0.0.0 have different meanings.
  • Limited broadcast stays local; directed broadcast depends on the subnet.
  • Multicast identifies group destinations.
  • Documentation and benchmark ranges have separate reserved purposes.
4

Subnet an IPv4 address block

Subnetting gives each network enough addresses without letting its range collide with another. Begin with equal-sized blocks, then fit different host counts with VLSM. Planning also means checking what remains free: enough addresses in total can still be unusable if they are split across the wrong boundaries. Finally, learn when several blocks can be named by one shorter prefix and when that summary would include extra space.

4.1 Divide a block into equal subnets

Subnetting divides an address block by moving bits from the host portion into the network portion. All resulting blocks are smaller and have longer prefixes. When they all use the same prefix, the plan is called fixed-length subnet masking (FLSM).

Choose enough subnet bits

Borrowing s bits creates 2s equal subnets. Add s to the starting prefix. From 192.168.10.0/24, suppose you need six subnets. Two extra bits give four subnets, which is too few. Three give eight, so use /27.

A /27 leaves five host bits, giving 25−2=30 usable addresses in each subnet. Its mask is 255.255.255.224, and its increment is 32 in the last octet.

NetworkUsable final octetsBroadcast final octet
192.168.10.0/271–3031
192.168.10.32/2733–6263
192.168.10.64/2765–9495
192.168.10.96/2797–126127
192.168.10.128/27129–158159
192.168.10.160/27161–190191
192.168.10.192/27193–222223
192.168.10.224/27225–254255

The first and last subnets are valid. Subtract two for network and broadcast addresses inside an ordinary subnet, not from the number of subnets. The old rule that avoided “subnet zero” and the all-ones subnet does not apply to modern classless planning.

Choose enough host bits

If the requirement gives host count, choose the smallest host-bit count h satisfying 2h−2 at least equal to that count. Then calculate the prefix as 32−h.

For 500 usable addresses, eight host bits give 254, which is too few. Nine give 510, so use /23. For 30 usable addresses, /27 fits exactly; 31 requires /26.

Count every interface that needs an address. Thirty computers plus a router gateway need 31 usable addresses, even before printers, servers or switch management. If a stated host count already includes the gateway, do not add it a second time.

A prefix change can also carry the list across an octet boundary. Dividing 10.30.8.0/22 into /25s borrows three bits and gives eight blocks. Their starts are 10.30.8.0, 10.30.8.128, 10.30.9.0, 10.30.9.128, continuing through 10.30.11.128. After the final-octet .128 block, the next start increments octet three and resets octet four. Every block still contains 128 total addresses.

Test both limits

A plan can pass the host test and fail the subnet test. Five LANs needing 40 usable addresses each require five /26 blocks. A /24 holds only four of those blocks. The five blocks require 320 total addresses, so they cannot fit into 256. A /23 has room for eight /26 blocks.

Conversely, making many very small blocks can satisfy the subnet count while leaving too few host addresses in each. Start with the supplied parent block, calculate the candidate prefix, and check both requirements before listing networks.

FLSM keeps the plan simple, but all networks receive the same size. Giving a two-interface router link a /27 leaves 28 usable addresses unused. When needs differ substantially, different prefix lengths can use the parent space more efficiently.

Key Takeaways

  • Borrowing s bits produces 2s equal subnets.
  • Find the smallest block that fits every required interface.
  • Add gateways and other infrastructure unless the stated count includes them.
  • Check subnet count and usable hosts together.
  • All subnets, including the first and last, are available in modern classless plans.

4.2 Design a variable-length (VLSM) address plan

Variable-length subnet masking (VLSM) gives each subnet its own prefix length. A large LAN can receive a /25, a smaller LAN a /27, and a two-interface router link a /30, all inside one parent block.

Size the requirements first

Plan 192.168.50.0/24 for three LANs needing 100, 50 and 20 usable addresses, plus two router links. Here the LAN counts already include their gateways.

  • 100 needs seven host bits: 126 usable, so /25.
  • 50 needs six: 62 usable, so /26.
  • 20 needs five: 30 usable, so /27.
  • Each link uses /30: two usable addresses.

Reserve expected growth before making these choices. A current count of 50 may fit a /26, but a requirement of 70 after growth does not.

Allocate largest to smallest

Large blocks have fewer possible starting positions. In a /24, a /25 starts at .0 or .128. Allocating small blocks first can split free space across both halves and leave no whole /25.

UseNetworkUsable addressesBroadcast
LAN A192.168.50.0/25.1–.126.127
LAN B192.168.50.128/26.129–.190.191
LAN C192.168.50.192/27.193–.222.223
Link 1192.168.50.224/30.225–.226.227
Link 2192.168.50.228/30.229–.230.231

All abbreviated addresses in the table begin with 192.168.50. The masks are 255.255.255.128, .192, .224 and .252, respectively.

After placing a block, move to the next free address that is aligned for the next block's size. A /26 must start on a multiple of 64 in the last octet. 192.168.50.100/26 is a host address within the .64 block, not a new network beginning at .100.

Account for the free space

The plan uses 128 + 64 + 32 + 4 + 4 = 232 total addresses. Addresses .232 through .255 remain free: 24 addresses, expressible as 192.168.50.232/29 and 192.168.50.240/28.

A fourth LAN needing 20 usable addresses requires a whole /27, or 32 total addresses. It cannot fit in those 24 remaining addresses. Even when a free total is large enough, its alignment and continuity must also suit the requested block. Starting from a /23 would provide more room to preserve larger growth blocks.

On a supported point-to-point link, a /31 uses both of its two addresses and consumes half the space of a /30. Choose the link convention before completing the plan; its endpoints must support it.

A growth allowance can change a prefix at a sharp threshold. A LAN needing 14 usable addresses fits /28, but adding one more required interface raises the need to 15 and forces /27. Its allocation doubles from 16 total addresses to 32. Add expected devices to the usable requirement before rounding to a power-of-two block; adding a few spare addresses after choosing /28 cannot enlarge that block beyond its boundary.

Audit the plan

Record each network, prefix, dotted mask, usable range and broadcast. Check that every subnet fits its requirement, starts on its own boundary, stays inside the parent block and does not overlap another allocation.

Key Takeaways

  • VLSM uses different prefix lengths within one parent block.
  • Size every requirement before allocating space.
  • Place the largest blocks first on their proper boundaries.
  • Record network, mask, usable range and broadcast for each allocation.
  • Free space must be sufficiently large, contiguous and aligned for growth.
  • A supported /31 can save space on a point-to-point link.

4.3 Check blocks for overlap and combine them into a summary

A usable plan needs distinct, correctly aligned blocks. Summarization, also called aggregation or supernetting, then names suitable groups of blocks with one shorter prefix. The checks for overlap and summary both depend on address boundaries.

Check alignment and overlap

A network address must have all host bits zero. For /26, the last-octet increment is 64. 192.168.1.32/26 is therefore not a network beginning at .32; it lies inside 192.168.1.0/26.

Two correctly aligned CIDR blocks either stay separate or one contains the other. 10.0.0.0/23 covers 10.0.0.0 through 10.0.1.255. A proposed 10.0.1.0/24 lies completely inside it. They overlap even though their written network addresses differ.

To test this efficiently, apply the shorter prefix to both network addresses. If the results match, the more specific block lies inside the less specific one. You can also compare the complete first-to-last ranges. Separate allocations in one address plan must not claim any of the same addresses.

Find an exact summary

Consider four networks: 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24 and 172.16.3.0/24. They are contiguous and contain 1,024 addresses in all.

The first two octets share 16 bits. In the third octet, 0 is 00000000 and 3 is 00000011; they share the first six bits. Keeping 22 bits gives 172.16.0.0/22, covering exactly 172.16.0.0 through 172.16.3.255.

For an exact single-block summary, the combined coverage must be continuous, contain a power-of-two number of addresses, and start on the matching boundary. With equal-sized input blocks, their count must also be a power of two. Different-sized blocks can combine: 192.168.10.0/25, 192.168.10.128/26 and 192.168.10.192/26 fill one complete /24.

Distinguish covering from exact

Four /24 blocks from 172.16.1.0/24 through 172.16.4.0/24 also contain 1,024 addresses, but they start at the wrong boundary for /22. The smallest single block containing them is 172.16.0.0/21. It includes additional /24 blocks outside the requested group.

Use the first address of the first block and the last address of the last block to check a covering prefix. Looking only at network addresses can miss the size of the final block. For example, 10.20.0.0/24 plus 10.20.1.0/23 cannot be treated as two valid adjacent allocations: the second label is misaligned and actually falls within 10.20.0.0/23.

An address plan that gives each site a contiguous aligned parent block is easier to summarize and extend. For example, separate site blocks 10.1.0.0/16 and 10.2.0.0/16 let each site's smaller subnets retain a clear common prefix.

Key Takeaways

  • Check network alignment before comparing blocks.
  • Aligned CIDR blocks either do not overlap or one contains the other.
  • An exact summary requires continuous coverage, a power-of-two size and an aligned start.
  • A covering prefix can include addresses beyond the requested blocks.
5

Write and read IPv6 addresses and prefixes

IPv6 expands the address space and changes how addresses are written. Hexadecimal groups replace dotted decimal, and careful shortening makes long addresses easier to read without changing their bits. You will expand and compress addresses, then divide a site prefix into LAN subnets. The main planning shift is to count subnets and preserve the /64 LAN structure, instead of choosing LAN sizes from individual host counts.

5.1 Write IPv6 addresses in full and compressed form

IPv6 uses 128-bit addresses, compared with IPv4's 32 bits. Its space contains about 3.4×1038 addresses. The larger space supports globally unique addressing at a scale IPv4 cannot provide.

Read hexadecimal groups

Hexadecimal uses 0–9 and a–f; a means 10 and f means 15. Each digit represents four bits, a nibble. Hex 4b represents 0100 1011, or decimal 75. Four hex digits form a 16-bit group, often called a hextet.

A full IPv6 address has eight groups, separated by colons:

2001:0db8:0000:0000:0008:0800:200c:417a

Count eight groups of 16 bits to account for all 128 bits. Hex letters are case-insensitive, but the recommended text form uses lowercase.

Shorten without changing values

First remove leading zeros inside each group. 0db8 becomes db8, 0008 becomes 8, and 0000 becomes 0. Keep internal and trailing zeros: 0800 becomes 800, not 8.

Next, replace one continuous run of all-zero groups with ::. Use it only once. Two double colons would leave the division of missing groups ambiguous. The full example becomes 2001:db8::8:800:200c:417a.

RFC 5952 recommends compressing the longest run. If runs tie, compress the first. Leave a single zero group as 0:

Address after removing leading zerosRecommended form
2001:db8:0:1:0:0:0:12001:db8:0:1::1
2001:db8:0:0:1:0:0:12001:db8::1:0:0:1
2001:db8:0:1:1:1:1:12001:db8:0:1:1:1:1:1

The last address has only one zero group, so recommended form keeps it visible. A valid IPv6 spelling and the recommended spelling are different questions: some valid forms are longer or use uppercase.

Expand a short address

For 2001:db8:acad:12::100, five groups are visible. Eight minus five leaves three zero groups represented by ::. Insert them, then pad each group to four digits:

2001:0db8:acad:0012:0000:0000:0000:0100

This expansion also shows why 2001:db8::1 and 2001:db8::1:0 differ. Their final 16 bits differ; removing a trailing zero group changes the address.

In a URL, square brackets separate an IPv6 literal from a port: http://[2001:db8::10]:8080/. Here the brackets are part of URL syntax, while the colons inside identify the address.

Recognize coexistence approaches

IPv4 and IPv6 use different packet formats and do not communicate directly. Dual stack runs both protocols, allowing each connection to use the appropriate one. Tunneling carries packets of one protocol inside packets of the other across an intervening network. NAT64, commonly paired with DNS64, translates between IPv6-only clients and IPv4-only servers. These are different jobs: adding an IPv6 address to a dual-stack host does not translate an IPv4 packet.

Key Takeaways

  • IPv6 writes 128 bits as eight hexadecimal groups.
  • Remove leading zeros within groups, keeping internal and trailing zeros.
  • Use :: once; recommended form compresses the longest run of at least two zero groups.
  • When runs tie, compress the first and use lowercase.
  • Expand :: by restoring enough groups to make eight.
  • Dual stack, tunneling and translation solve different coexistence needs.

5.2 Find and plan IPv6 prefixes and subnets

An IPv6 prefix keeps the first stated number of bits. 2001:db8:acad:12::25/64 has a 64-bit network prefix and a 64-bit interface ID. IPv6 uses slash prefixes, not dotted-decimal subnet masks.

Keep a /64 for LANs

The standard LAN subnet is /64. It supports the 64-bit interface IDs used by SLAAC and modified EUI-64. One /64 contains 264 addresses, about 1.8×1019, so LAN planning does not shrink blocks to match a few dozen hosts.

For a /64, keep the first four full groups and clear the other four. The address 2001:db8:acad:12:a::1/64 belongs to 2001:db8:acad:12::/64. That prefix remains a complete IPv6 address: omitting the :: would leave only four written groups with no notation for the missing ones.

Separate site, subnet and interface

A typical site plan contains a global routing prefix, a subnet ID and the interface ID. If the site receives a /48, its first three groups are fixed. Group four provides 16 subnet bits before the /64 interface boundary.

The subnet count is 264−48=65,536. Count through the fourth group from 0 to ffff:

  • 2001:db8:acad::/64.
  • 2001:db8:acad:1::/64.
  • 2001:db8:acad:2::/64.
  • Continue through 2001:db8:acad:ffff::/64.

A /56 leaves eight subnet bits, giving 264−56=256 LAN subnets. For 2001:db8:acad:4b00::/56, the first two hex digits of group four, 4b, remain fixed. The /64 subnet group can run from 4b00 through 4bff.

Read boundaries inside groups

Each hex digit holds four bits. Prefix lengths divisible by four fall on nibble boundaries, which are easy to see. For /56, keep 14 hex digits. Applying it to 2001:db8:acad:4b7f::25 produces 2001:db8:acad:4b00::/56: the final two digits of group four become zero.

Subnet IDs are hexadecimal. An ID written 10 represents decimal 16, not ten. A plan can label VLAN 10 with subnet text 10, but that is a naming choice, not decimal arithmetic.

The subnet-count rule also works away from nibble boundaries. A /55 site leaves nine bits before /64, so it holds 512 LANs. For 2001:db8:acad:4a00::/55, the LAN group runs from 4a00 through 4bff: one bit of the second hex digit in that group can vary. A /56 beginning at 4a00 instead stops at 4aff. Use bit counts when a prefix cuts through a hex digit; visually keeping whole digits would lose that extra subnet bit.

Router-to-router links can use /64 or a /127; the latter holds exactly two addresses under RFC 6164. This point-to-point choice does not change the standard /64 layout for LANs.

Configure and verify an interface

In Cisco IOS interface configuration mode, ipv6 address 2001:db8:acad:1::1/64 assigns an address. Appending eui-64 to a /64 prefix command asks the router to build the ID from its MAC address. show ipv6 interface brief lists addresses, including link-local ones. Windows ipconfig and Linux ip -6 addr also show IPv6 settings. Verify the prefix as well as the address: a correct-looking host ID cannot fix a wrong subnet prefix.

Key Takeaways

  • Use /64 LANs with a 64-bit interface ID.
  • A /48 supplies 65,536 /64 subnets; a /56 supplies 256.
  • Clear every bit after the prefix to find the network address.
  • Nibble boundaries align prefixes with complete hexadecimal digits.
  • A /127 is a two-address router-link prefix.
6

Identify IPv6 address types and interface IDs

An IPv6 interface often holds several addresses at once, each with a different reach or purpose. Learn what their prefixes reveal, how multicast replaces broadcast, and why anycast cannot be recognized from its spelling alone. You will also build a modified EUI-64 interface ID from a MAC address, then relate that method to privacy and duplicate-address checks when reading real interface output.

A unicast address identifies one interface. An IPv6 interface normally has a link-local address and may also have global or unique local addresses. Several addresses on one interface are expected, so inspect each address's role before deciding which one to use.

Global unicast addresses

The currently allocated global unicast space is 2000::/3, beginning with hex 2 or 3. These addresses are intended for globally unique, internet-routable unicast communication. The range also contains special-purpose reservations: 2001:db8::/32 and 3fff::/20 are documentation space, for example. A leading 2 or 3 is a first classification clue, not permission to assign an arbitrary address from that space.

As with public IPv4, global scope does not guarantee that a service is reachable. The network must route the prefix, and security policy may block traffic.

Link-local addresses

The reserved link-local prefix is fe80::/10. Its address format uses zero bits through the /64 boundary, followed by a 64-bit interface ID, so normal addresses appear as fe80::....

Link-local addresses serve communication on one link. Routers never forward packets with a link-local source or destination onto another link. IPv6 neighbor discovery and router advertisements use this local reach; a host's default gateway is often a router's link-local address.

Because fe80::1 can exist on several separate links, a host may need a zone index to select the interface. fe80::1%eth0 identifies the Linux interface named eth0. Windows may show an interface number, such as %12. The zone is local information, not another part of the 128 address bits.

Unique local addresses

Unique local addresses (ULAs) occupy fc00::/7. Locally assigned ULAs begin with fd, from fd00::/8. A site prefix combines that beginning with a 40-bit randomly chosen Global ID, producing a /48. Next come a 16-bit subnet ID and a 64-bit interface ID.

For example, fd3c:9a21:7b04::/48 provides site-local addressing without depending on an ISP's global prefix. The random Global ID makes accidental overlap between independently planned sites unlikely. ULAs are not routed on the public internet, but they work within a routed organization without requiring NAT.

A host can use a ULA for an internal service and a global address for an internet service. Its source-address selection chooses an appropriate address for the connection. The older fec0::/10 site-local category was deprecated and replaced by the ULA approach.

TypePrefix clueIntended reach
Global unicastAllocated from 2000::/3Internet routing, except reserved subranges
Unique localfc00::/7; locally assigned fd00::/8Private routed networks
Link-localfe80::/10One link only

A ULA and a link-local address therefore serve different needs: an organization can route a ULA between its internal subnets, while a link-local address stays on its originating link.

Key Takeaways

  • One IPv6 interface can have several unicast addresses.
  • Global allocation begins with 2 or 3, but reserved subranges have special uses.
  • Link-local addresses stay on one link and may need a zone index.
  • Locally assigned ULAs begin with fd and can be routed internally.

6.2 Recognize multicast, anycast and special IPv6 addresses

IPv6 has no broadcast addresses. It uses multicast groups for many tasks that need delivery to multiple interested interfaces. Other special addresses identify local tests, unconfigured sources or compatibility with IPv4.

Read multicast groups and scopes

Multicast addresses begin with ff, the ff00::/8 range. The next four bits are flags and the following four specify scope, the area in which the group is valid. Scope 1 is interface-local, 2 link-local, 5 site-local, 8 organization-local and e global. A multicast address is a destination, never a packet's source.

GroupMembers
ff02::1All nodes on the link
ff02::2All routers on the link
ff02::1:2DHCPv6 servers and relay agents on the link
ff05::1:3DHCPv6 servers in the site

A solicited-node multicast address combines ff02::1:ff00:0/104 with the last 24 bits of a unicast address. For 2001:db8:acad:1::7:3a, expand the ending to 0007:003a. The last 24 bits are 07:003a, giving ff02::1:ff07:3a. Neighbor discovery can send a request to this smaller group instead of all nodes. Different unicast addresses can share the same last 24 bits, so the group need not identify just one interface.

Distinguish anycast from multicast

Anycast configures the same unicast address on several interfaces. Routing delivers a packet to one selected destination, according to routing metrics and policy. It need not be the geographically closest server or the one with the lowest measured delay. Public DNS services use this approach in IPv4 as well as IPv6.

Multicast delivers to group members; anycast selects one destination. An anycast address has no special visible prefix: the configuration and routing make it anycast.

Recognize special single addresses

::1/128 is loopback, the single IPv6 address for traffic that stays on the host. ::/128, normally written ::, is the unspecified address, used as a source before an address is available. With /0, ::/0 instead describes all IPv6 destinations and denotes a default route.

Documentation prefixes are 2001:db8::/32 and 3fff::/20. They support examples without naming live global hosts.

Recognize IPv4 embedded in IPv6 text

IPv4-mapped addresses use ::ffff:0:0/96 on dual-stack hosts. ::ffff:192.0.2.10 is equivalent to ::ffff:c000:20a; the last 32 bits hold the IPv4 value.

You can check the embedded value one byte at a time. Decimal 192 becomes hex c0, 0 becomes 00, 2 becomes 02 and 10 becomes 0a. Grouping the bytes as c000:020a preserves all 32 bits; shortening removes only the leading zero from 020a. This is why a dotted-decimal ending and a hexadecimal ending can name the same mapped value.

The NAT64 well-known prefix is 64:ff9b::/96, so 64:ff9b::192.0.2.10 is 64:ff9b::c000:20a. Although both forms embed IPv4 bits, they serve different purposes. A mapped address represents an IPv4 endpoint within a host's IPv6 programming interface; the NAT64 prefix identifies addresses used by a translator.

Key Takeaways

  • IPv6 replaces broadcast tasks with multicast groups.
  • The multicast scope limits a group’s reach.
  • Solicited-node groups use the unicast address’s last 24 bits.
  • Anycast selects one routed destination and has no distinct address spelling.
  • ::1 is loopback; :: is unspecified; ::/0 is a default route.
  • Mapped and NAT64 addresses embed IPv4 bits for different purposes.

6.3 Build interface IDs, including modified EUI-64

In a /64 subnet, the interface ID is the final 64 bits of the address. It can be set manually, assigned by DHCPv6, or created by the host through SLAAC. Host-created IDs may be random or follow modified EUI-64.

Turn a MAC address into an ID

A MAC address has 48 bits. Modified EUI-64 expands it to 64 bits and changes one bit. Use MAC 00:1a:2b:3c:4d:5e:

  1. Split it into two 24-bit halves: 001a2b and 3c4d5e.
  2. Insert fffe between them: 001a2bfffe3c4d5e.
  3. Regroup into four hextets: 001a:2bff:fe3c:4d5e.
  4. Flip the universal/local bit in the first byte. Its value is 2, the seventh bit from the left. Binary 00000000 becomes 00000010, so 00 becomes 02.

The ID is 021a:2bff:fe3c:4d5e. Combined with 2001:db8:acad:1::/64, it gives 2001:db8:acad:1:21a:2bff:fe3c:4d5e. The leading zero of 021a disappears in recommended IPv6 text. A link-local address using this ID is fe80::21a:2bff:fe3c:4d5e.

Flip the bit in either direction

“Flip” means change 0 to 1 or 1 to 0. It does not always mean add 2. A first byte of 02 changes to 00. For MAC 3c:22:fb:12:34:56, first byte 3c is 00111100. Flipping its bit worth 2 gives 00111110, or 3e. The final ID is 3e22:fbff:fe12:3456.

Insert fffe between the original halves before grouping into hextets. It appears across the middle hextet boundary, in the pattern xxxx:xxff:fexx:xxxx. Appending it at the end produces a different ID.

Read an ID carefully

The middle ff:fe pattern suggests modified EUI-64, but a manually chosen or random ID can contain the same bits. Recover a MAC only when you know this method was used: remove the inserted fffe, then flip the bit worth 2 again. The operation reverses itself.

For a reverse calculation, suppose 0a64:22ff:fe12:ab34 is known to be modified EUI-64. Remove the middle fffe to recover 0a:64:22:12:ab:34. Flip the first byte’s bit worth 2: 0a becomes 08. The original MAC is 08:64:22:12:ab:34. Removing the marker alone would leave the wrong first byte; undo both construction steps.

A MAC-derived ID can let observers link a device's activity across networks. Modern desktop and mobile systems commonly use stable per-network IDs and temporary IDs for outgoing connections, reducing that exposure. A random-looking ID is normal; SLAAC does not require a MAC-derived value.

Check uniqueness before use

A host performs duplicate address detection (DAD) for a new unicast address. It sends a neighbor solicitation from the unspecified source :: to the address's solicited-node multicast group. If a conflict is detected, the host cannot use that address. Otherwise, it can move from tentative to usable after the check completes. A 64-bit interface ID and a correct prefix establish the address's shape; DAD checks whether it is already in use on the link.

Key Takeaways

  • An interface ID can be manual, server-assigned or host-created.
  • Modified EUI-64 inserts fffe between a MAC address’s 24-bit halves.
  • Flip the first byte’s bit worth 2 in either direction.
  • The ff:fe pattern is a clue; configuration establishes how an ID was made.
  • Random IDs reduce exposure of a device’s MAC-derived identity.
  • DAD checks a tentative unicast address for a local conflict.

IP Addressing and Subnetting examples

6 Walkthroughs

1

Read IPv4 from the bits up

10 steps
Convert an octet, assemble an address and interpret its explicit network prefix.
  1. 1
    IntroductionSee the bits behind an address

    A subnet calculation becomes easier when decimal numbers and binary positions describe the same thing to you. Start with one octet, convert it in both directions, and then place it in a complete IPv4 address.

    You will use the mask to separate network and host positions. The dots make an address easier to read, but they do not determine that boundary.

  2. 2
    ExplanationGive eight positions their values

    An octet has eight positions, worth 128, 64, 32, 16, 8, 4, 2 and 1 from left to right. A bit set to 1 contributes its value; a bit set to 0 contributes nothing.

    Think of eight switches, each controlling one fixed amount. Turning on 128 and 64 selects 192. Turning on 8 and 1 as well selects 201; the positions themselves never move.

  3. 3
    ExampleConvert 205 by subtraction

    Begin with decimal 205. Select 128, leaving 77, then 64, leaving 13. Skip 32 and 16 because they do not fit. Select 8, leaving 5; select 4, leaving 1; skip 2 and select 1.

    The eight decisions are 11001101. Check the selected amounts: 128 + 64 + 8 + 4 + 1 = 205. Keep zeros in the skipped positions so the bits remain aligned.

  4. 4
    ChallengeRead a new octet

    What decimal number is 01011001? Work from the eight place values before revealing the answer.

    ---reveal---

    The 1 bits select 64, 16, 8 and 1, giving 89. The first zero contributes nothing; it does not shift the remaining digits. A full octet keeps the 64 position second from the left, whether or not the 128 bit is set.

  5. 5
    Key InsightSeparate patterns from maximum values

    Eight bits give 28=256 patterns, but the largest decimal value is 255 because the first pattern represents zero. Three bits similarly give eight values, numbered 0 through 7.

    This difference matters in addressing: a count tells you how many patterns exist, while a maximum tells you the label on the last one. They differ by one when numbering begins at zero.

  6. 6
    ExampleAssemble four octets

    Place decimal 205 after three other octets to write 192.168.7.205. The complete binary address is 11000000.10101000.00000111.11001101. Four eight-bit groups make 32 bits.

    Each decimal component must fit in one octet. Replacing 205 with 305 would make the address invalid, because 305 cannot fit in eight bits; a dot does not create extra capacity.

  7. 7
    ExplanationLet the mask decide the split

    The network and host portions share those same 32 bits. With /24, the first 24 bits identify the network and the final eight identify positions within it. With /26, two more bits belong to the network.

    The address remains unchanged, but the network is smaller. An interface address without its prefix cannot tell you exactly which other addresses are local.

  8. 8
    ConnectionUse classes as historical vocabulary

    Older classful defaults were /8 for class A, /16 for class B and /24 for class C. Their ordinary first-octet ranges were 1–126, 128–191 and 192–223.

    CIDR removed these fixed boundaries. A configured prefix such as /26 supplies the actual mask even when an address falls in the old class C range. Class D names multicast; class E names reserved space.

  9. 9
    ChallengeCombine notation and prefix reading

    An interface shows 10.19.7.205/26. How many bits are in its complete address, and how many are host bits?

    ---reveal---

    The complete IPv4 address has 32 bits. The /26 assigns 26 to the network, leaving six host bits. Its historical class A beginning does not replace the explicit prefix with /8; each octet still occupies eight positions.

  10. 10
    RecapCarry the address and prefix together

    You can now translate octets without changing bit positions and read their four-part IPv4 form. Use the explicit prefix whenever you divide the 32-bit address into network and host portions.

    For the next calculation, keep both pieces of information visible: the address supplies the bits to examine, and the mask tells you which of them to preserve for the network.

2

Find a subnet and check a host

14 steps
Calculate subnet boundaries, test usable addresses and correct a gateway from an address plan.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionTurn one address into a range
  2. 2
    ExampleTranslate /26 into a mask
  3. 3
    ChallengeCheck another mask
  4. 4
    ExampleLocate the enclosing block
  5. 5
    ExampleCheck with binary AND
  6. 6
    ExampleFind the final and usable addresses
  7. 7
    ExampleMove the boundary to octet three
  8. 8
    ChallengeDecide whether .0 is usable
  9. 9
    TipRecognize the small-prefix exceptions
  10. 10
    ExplanationChoose local delivery or a gateway
  11. 11
    ChallengeInspect a gateway entry
  12. 12
    TipCheck settings in interface output
  13. 13
    ChallengeCombine host validity and gateway checks
  14. 14
    RecapCheck the boundary before the settings
3

Read address categories during troubleshooting

9 steps
Classify private and special ranges, then interpret what those categories reveal about a network.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionUse ranges as practical clues
  2. 2
    ExplanationRead the private range boundaries
  3. 3
    ChallengeClassify two nearby addresses
  4. 4
    ConnectionSeparate NAT, PAT and provider space
  5. 5
    ExampleInterpret unexpected link-local settings
  6. 6
    ChallengeDistinguish local software from a local link
  7. 7
    ExplanationKeep broadcasts and groups distinct
  8. 8
    ChallengeRead an example-address report
  9. 9
    RecapMatch the category to the evidence
4

Allocate and audit a VLSM plan

14 steps
Size unequal LANs, place them on correct boundaries and check growth space and summaries.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionBuild a plan that fits
  2. 2
    ExampleTest an equal-sized choice
  3. 3
    ChallengeCheck count and capacity together
  4. 4
    ExampleChoose a size for each requirement
  5. 5
    ExampleAllocate the largest LAN
  6. 6
    ExamplePlace the middle LAN
  7. 7
    ExamplePlace the small LAN and link
  8. 8
    Key InsightInspect what remains free
  9. 9
    ChallengeMake a growth decision
  10. 10
    ExampleTest a proposed extra allocation
  11. 11
    ExplanationCombine blocks only when coverage fits
  12. 12
    ChallengeFind the summary of unequal blocks
  13. 13
    ChallengeAudit the original plan
  14. 14
    RecapSave the ranges, not just the labels
5

Shorten IPv6 and find its LAN

12 steps
Compress and expand IPv6 addresses, then apply /64 and /56 boundaries.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionRead long addresses with confidence
  2. 2
    ExplanationRead eight hexadecimal groups
  3. 3
    ExampleCompress the longest zero run
  4. 4
    ChallengeCheck the shortened form
  5. 5
    ConnectionSeparate compression from compatibility
  6. 6
    ExampleKeep four groups for a /64
  7. 7
    ExplanationCount site subnet bits
  8. 8
    ExampleFollow a /56 across group four
  9. 9
    ChallengeApply the /56 boundary
  10. 10
    TipRead hexadecimal IDs and link prefixes
  11. 11
    ChallengeCombine shortening and subnet membership
  12. 12
    RecapKeep notation and allocation distinct
6

Identify IPv6 roles and build an interface ID

14 steps
Read address scope, form multicast groups and follow modified EUI-64 through a complete example.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionRead an interface with several addresses
  2. 2
    ExplanationGive each unicast address a role
  3. 3
    ExampleSelect the link for a local address
  4. 4
    ChallengeChoose an address for internal routing
  5. 5
    ExplanationReplace broadcast with interested groups
  6. 6
    ExampleBuild a solicited-node group
  7. 7
    ChallengeDistinguish group delivery from anycast
  8. 8
    ConnectionRecognize the all-zero special case
  9. 9
    ExampleExpand a MAC to 64 bits
  10. 10
    ExampleFlip the bit worth two
  11. 11
    ChallengeCheck the direction of the flip
  12. 12
    TipTreat ID appearance as a clue
  13. 13
    ChallengeConnect multicast to duplicate detection
  14. 14
    RecapRead scope before interpreting an ID

IP Addressing and Subnetting practice questions

50 Practice Questions in 5 sets

Set 1: IPv4 bits, masks and address boundaries10 Practice Questions

Question 1 of 10

A host is 192.168.84.158/28. The address plan reserves the first usable address of each subnet for its router. What default gateway should this host use?
  1. 192.168.84.144
  2. 192.168.84.159
  3. 192.168.84.161
  4. 192.168.84.145
Show answerHide answer
Answer: D
The host belongs to 192.168.84.144/28, whose usable addresses run from .145 through .158. The plan reserves the first usable address, .145, for its router. Address .144 names the network, while .159 is broadcast; neither can serve as the gateway interface address.

Question 2 of 10

How is 172.29.8.4 classified?
  1. Ordinary public unicast
  2. ISP shared address space
  3. IPv4 link-local address
  4. RFC 1918 private
Show answerHide answer
Answer: D
The private 172 block runs from 172.16.0.0 through 172.31.255.255, so a second octet of 29 places this address inside it. Treating it as public would overlook the /12 range. Shared provider space begins at 100.64, and link-local space begins at 169.254.

Question 3 of 10

A workstation can ping 127.0.0.1, but cannot reach its gateway. What has the successful ping tested?
  1. The workstation’s local IP software.
  2. The cable connecting it to its switch.
  3. The router interface serving its subnet.
  4. The DHCP server assigning its address.
Show answerHide answer
Answer: A
Loopback traffic stays within the workstation, so the successful response tests its local IP software. The packet does not travel over the cable to the switch or gateway. A local loopback success therefore leaves an external link or addressing fault entirely possible.

Question 4 of 10

What is the network address of 192.168.42.183/27?
  1. 192.168.42.128
  2. 192.168.42.176
  3. 192.168.42.160
  4. 192.168.42.192
Show answerHide answer
Answer: C
A /27 has an increment of 32 in the last octet, and 183 lies between 160 and 191. Its network is therefore 192.168.42.160. The nearby value .176 aligns to a smaller block, not a /27; .192 begins the next subnet and lies above the supplied address.

Question 5 of 10

What is the broadcast address of 10.26.73.19/20?
  1. 10.26.79.255
  2. 10.26.73.255
  3. 10.26.80.255
  4. 10.26.80.0
Show answerHide answer
Answer: A
The /20 mask is 255.255.240.0, so third-octet blocks advance by 16. Octet 73 lies in 64–79, ending at 10.26.79.255. Using 10.26.73.255 treats the network as /24 and ignores the host bits that remain in the third octet.

Question 6 of 10

A proposed subnet mask is 255.255.240.128. Why is it invalid?
  1. The mask has too many 1 bits for IPv4.
  2. A 1 appears after host bits have begun.
  3. A partial mask octet cannot contain 240.
  4. A mask must end with a complete 255.
Show answerHide answer
Answer: B
The 240 octet is 11110000, which starts the host portion, but the next octet, 128, introduces another 1. Mask 1s must form one continuous run from the left. Both 240 and 128 are possible mask-octet values individually; their placement together breaks the full-mask rule.

Question 7 of 10

What decimal value does the binary octet 10010110 represent?
  1. 146
  2. 150
  3. 154
  4. 166
Show answerHide answer
Answer: B
The 1 bits select 128, 16, 4 and 2, giving 150. A result of 146 misses the position worth 4, while 154 includes a position worth 8 that is zero. Read each position against its place value instead of treating the written digits as decimal.

Question 8 of 10

How is decimal 218 written as an eight-bit octet?
  1. 11010110
  2. 11101010
  3. 11011001
  4. 11011010
Show answerHide answer
Answer: D
218 is 128 + 64 + 16 + 8 + 2, so those positions contain 1 and the others contain 0. This gives 11011010. The similar-looking 11010110 represents 214 because it selects 4 in place of 8; writing all eight place values prevents that swap.

Question 9 of 10

A router has IPv4 address 10.24.8.6/27 on an interface. How many bits of that address form its network portion?
  1. 27 bits
  2. 8 bits
  3. 24 bits
  4. 5 bits
Show answerHide answer
Answer: A
The explicit /27 prefix assigns 27 bits to the network portion and leaves five host bits. The historical class A default of /8 does not override that configured prefix. An address beginning with 10 can be divided with modern classless prefixes just like other unicast blocks.

Question 10 of 10

What dotted-decimal mask represents /22?
  1. 255.255.248.0
  2. 255.255.254.0
  3. 255.255.252.0
  4. 255.255.255.252
Show answerHide answer
Answer: C
A /22 mask has two full octets of 1s and six more 1s in the third octet. Binary 11111100 is 252, giving 255.255.252.0. Placing 252 in the final octet would count 30 network bits, because three preceding octets of 255 already contribute 24.
Set 2: Size and verify an IPv4 address plan10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A /24 must supply at least seven equal subnets. What prefix creates the fewest equal subnets that meet the count?
  1. /26
  2. /28
  3. /27
  4. /25
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A LAN needs addresses for 28 workstations, three printers and one gateway. What is its smallest ordinary IPv4 subnet?
  1. /26
  2. /27
  3. /28
  4. /25
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Can 10.72.4.0/24 supply six equal LAN subnets, each needing 45 usable addresses?
  1. Yes; /27 gives eight subnets and 62 hosts per subnet.
  2. Yes; /26 gives eight subnets and 62 hosts per subnet.
  3. No; /25 fits the hosts but gives only four subnets.
  4. No; /26 fits the hosts but gives only four subnets.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

For a VLSM plan with LAN needs of 90, 24 and 11 usable addresses, which LAN should be allocated first?
  1. The 24-address LAN.
  2. The 90-address LAN.
  3. The 11-address LAN.
  4. Any LAN; the order never affects alignment.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

In 192.168.63.0/24, .0/25 and .128/27 are allocated. What is the first available aligned /26 network?
  1. 192.168.63.160/26
  2. 192.168.63.192/26
  3. 192.168.63.128/26
  4. 192.168.63.176/26
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A /24 plan allocates one /25, one /26 and one /27 without overlap. How many additional /30 blocks fit in its remaining space if allocations leave the final /27 free?
  1. 4
  2. 6
  3. 16
  4. 8
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

How do 10.82.6.0/23 and 10.82.7.128/25 relate?
  1. The /25 lies inside the /23.
  2. They are adjacent without overlap.
  3. The /23 lies inside the /25.
  4. They overlap only at one boundary address.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

What single prefix exactly summarizes 172.22.12.0/24 through 172.22.15.0/24?
  1. 172.22.12.0/21
  2. 172.22.8.0/21
  3. 172.22.12.0/22
  4. 172.22.14.0/23
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

How many usable addresses does an ordinary IPv4 /29 broadcast subnet provide?
  1. 8
  2. 4
  3. 6
  4. 2
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A customer router has outside address 100.111.6.8. What address category is this?
  1. RFC 1918 private space
  2. ISP shared address space
  3. Ordinary public unicast space
  4. IPv4 documentation space
Show answerHide answer

Save this lesson to see this answer.

Set 3: Read IPv6 addresses, prefixes and types10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A site receives 2001:db8:9c00:ab00::/56. How many /64 LANs can it create, and what is the final LAN prefix?
  1. 256; 2001:db8:9c00:abff::/64
  2. 16; 2001:db8:9c00:ab0f::/64
  3. 256; 2001:db8:9c00:ac00::/64
  4. 65,536; 2001:db8:9c00:ffff::/64
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

What is the scope of fe80::91%eth1?
  1. All sites, selected by eth1.
  2. The internet, selected by eth1.
  3. Only the loopback interface.
  4. One link, selected by eth1.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

How many bits does one hexadecimal digit represent in an IPv6 address?
  1. 8
  2. 16
  3. 32
  4. 4
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

What is the recommended compressed form of 2001:0db8:0000:0000:0030:0000:0000:0009?
  1. 2001:db8:0:0:30::9
  2. 2001:db8::30:0:0:9
  3. 2001:db8::3:0:0:9
  4. 2001:db8::30::9
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

How many zero groups does :: replace in 2001:db8:56::a:9?
  1. 3
  2. 2
  3. 4
  4. 5
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

What /64 subnet contains 2001:db8:6a20:17:abcd::6/64?
  1. 2001:db8:6a20::/64
  2. 2001:db8:6a20:17:abcd::/64
  3. 2001:db8:6a20:17::/64
  4. 2001:db8:6a20:10::/64
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

An interface has fd8a:42c1:9b20:4::18/64 and a global address. What can the fd address provide?
  1. Public internet routing through its own global prefix.
  2. Communication restricted to the same physical link.
  3. Routed internal communication without requiring NAT.
  4. A multicast destination for all internal interfaces.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

What destination does ff02::2 identify?
  1. All nodes on the local link.
  2. All routers on the local link.
  3. All DHCPv6 servers in the site.
  4. One router selected by anycast.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

What solicited-node multicast group corresponds to 2001:db8:4::12ab:cdef?
  1. ff02::1:ff12:cdef
  2. ff02::1:ff00:cdef
  3. ff02::1:ffab:cdef
  4. ff02::1:12ab:cdef
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

What modified EUI-64 ID is built from MAC 08:7a:4c:90:12:34?
  1. 087a:4cff:fe90:1234
  2. 0a7a:4cff:fe90:1234
  3. 8a7a:4cff:fe90:1234
  4. 0a7a:4c90:fffe:1234
Show answerHide answer

Save this lesson to see this answer.

Set 4: Diagnose subnet and address-reading mistakes10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Host A is 10.34.5.20/24; host B is 10.34.5.180/25. How does each classify the other destination using its own mask?
  1. A sees B as local; B sees A as remote.
  2. Both hosts see the other as local.
  3. A sees B as remote; B sees A as local.
  4. Both hosts see the other as remote.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A DHCP-configured workstation unexpectedly shows 169.254.88.14/16. What is the most useful next check?
  1. Expand its mask to /8 to reach the DHCP service.
  2. Replace it with a 127 address to restore LAN access.
  3. Check its link and access to the DHCP service.
  4. Use 169.254.0.0 as a routed default gateway.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Can 172.23.11.0 be assigned to an ordinary host in 172.23.8.0/21?
  1. No; any final octet of 0 identifies a network.
  2. No; it is the broadcast address of that /21.
  3. Yes; /21 has no network or broadcast reservation.
  4. Yes; it lies strictly between the subnet endpoints.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

What is the smallest single CIDR block covering 10.90.5.0/24 and 10.90.6.0/24, and does it cover only those networks?
  1. 10.90.5.0/23; it covers exactly those two networks.
  2. 10.90.4.0/22; it also includes third octets 4 and 7.
  3. 10.90.4.0/23; it also includes third octet 4.
  4. 10.90.0.0/21; it adds third octets 0–4 and 7.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

What function lets several private IPv4 hosts share one public IPv4 address while keeping their connections distinct?
  1. Ordinary subnet masking.
  2. IPv4 multicast delivery.
  3. Port address translation.
  4. Fixed-length subnetting.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

How should 2001:db8:0:4:0:9:0:2 be written in RFC 5952 recommended form?
  1. 2001:db8:0:4:0:9:0:2
  2. 2001:db8::4:0:9:0:2
  3. 2001:db8:0:4::9:0:2
  4. 2001:db8:0:4:0:9::2
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

What /60 prefix contains 2001:db8:b170:58c7::12/60?
  1. 2001:db8:b170:5800::/60
  2. 2001:db8:b170:58c7::/60
  3. 2001:db8:b170:58b0::/60
  4. 2001:db8:b170:58c0::/60
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A service configures the same IPv6 unicast address at several sites, and routing delivers each request to one site. What delivery model is this?
  1. Multicast, copied to every configured site.
  2. Anycast, selected by routing metrics and policy.
  3. Broadcast, copied to every reachable interface.
  4. Unicast, guaranteed to choose the lowest-delay site.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

What happens to first MAC byte 02 when building a modified EUI-64 ID?
  1. It becomes 04.
  2. It stays 02.
  3. It becomes 82.
  4. It becomes 00.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

Which IPv6 address category begins with locally assigned prefix fd00::/8?
  1. Unique local unicast.
  2. Link-local unicast.
  3. Link-local multicast.
  4. Global documentation.
Show answerHide answer

Save this lesson to see this answer.

Set 5: Combine planning, diagnosis and IPv6 skills10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

What reserved purpose does 198.19.18.6 belong to?
  1. Public documentation examples.
  2. Private organization addressing.
  3. Provider shared addressing.
  4. Network benchmark testing.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

An IPv6-only client needs to reach an IPv4-only server. What mechanism can provide that connection without adding IPv4 to the client?
  1. Dual stack
  2. IPv6-over-IPv4 tunneling
  3. NAT64
  4. IPv4 PAT alone
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A /24 must hold LANs needing 110, 60 and 26 usable addresses, plus two /30 links. Counts include gateways. How many addresses remain unallocated?
  1. 32
  2. 24
  3. 16
  4. 48
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

In 10.61.8.0/24, a /26 allocation at .0 must stay. Can one /25 and one /26 still be added without overlap?
  1. Yes; place /25 at .64 and /26 at .192.
  2. Yes; place /25 at .0 and /26 at .128.
  3. Yes; place /26 at .64 and /25 at .128.
  4. No; the existing /26 prevents every aligned /25.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A /22 is divided into /26 subnets. How many subnets result, and how many usable addresses does each provide?
  1. 16 subnets; 62 usable each.
  2. 4 subnets; 62 usable each.
  3. 14 subnets; 62 usable each.
  4. 16 subnets; 64 usable each.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

Can 192.168.117.0/25, 192.168.117.128/26 and 192.168.117.192/26 be summarized exactly by one prefix?
  1. No; three input blocks are not a power of two.
  2. Yes; 192.168.117.0/23.
  3. No; different prefix lengths prevent an exact summary.
  4. Yes; 192.168.117.0/24.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A PC is 10.44.9.126/25. The intended router interface is 10.44.9.129/25. Why is that gateway invalid for the PC?
  1. The PC address is the /25 broadcast address.
  2. The router address is the /25 network address.
  3. The gateway is reserved in the PC’s subnet.
  4. Their network addresses differ under /25.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A site needs 300 standard /64 LANs. What is the smallest address allocation that can hold them?
  1. /56
  2. /55
  3. /57
  4. /54
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

An ID is known to use modified EUI-64 and is 0044:55ff:fe66:7788. What MAC address produced it?
  1. 02:44:55:66:77:88
  2. 00:44:55:66:77:88
  3. 80:44:55:66:77:88
  4. 02:44:55:ff:66:77
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

What is the distinction between ::/128 and ::/0?
  1. One loopback address versus all IPv6 destinations.
  2. All link-local addresses versus one unspecified address.
  3. One unspecified address versus all IPv6 destinations.
  4. One unspecified address versus all multicast groups.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

82 Key Terms, each with its definition

A

Address allocation
An address allocation is the reservation of a specific aligned address block for a network, consuming its entire range including reserved endpoints.
Allocating a /30 consumes four parent-block addresses even though only two are usable as ordinary endpoints.
Alignment
Alignment means that a network starts on a boundary matching its block size, so all address bits after the prefix are zero.
A /26 can begin at final octet .0, .64, .128 or .192 within a /24, but it cannot begin at .100.
Anycast
Anycast assigns one unicast address to several interfaces and lets routing deliver each packet to one selected destination according to policy and metrics.
A DNS service can use one anycast address at several sites without promising that routing chooses the lowest delay.
APIPA
Automatic Private IP Addressing (APIPA) is Windows link-local fallback addressing associated with failure to obtain normal DHCP configuration.
Unexpected APIPA on a DHCP-configured PC suggests checking its connection, VLAN and access to the DHCP service.

B

Benchmarking address
A benchmarking address is an address in 198.18.0.0/15, reserved for network performance tests rather than ordinary public-host assignments.
A laboratory can use 198.19.4.1 within the benchmark range that spans second octets 18 and 19.
Binary
Binary is base-two notation, which writes numbers with only the digits 0 and 1 and gives each position a power-of-two value.
Binary 10101100 equals 172 because its 1 bits select the values 128, 32, 8 and 4.
Bit
A bit is one binary position that can hold 0 or 1; its place in a number determines the value contributed when it holds 1.
The leftmost bit in an octet contributes 128 when it is set to 1, while the rightmost contributes 1.
Bitwise AND
Bitwise AND compares two binary values position by position, producing 1 only where both bits are 1; with a mask, it clears host bits.
ANDing final-octet 77 with mask octet 192 produces 64, the subnet’s starting value in that octet.
Block size
The block size is the number of addresses in a subnet, or the decimal increment between subnet starts in the boundary octet.
For /21, the third-octet increment is 8, while the whole block contains 2,048 IPv4 addresses.
Borrowed bit
A borrowed bit is a position moved from a parent block’s host portion into the subnet prefix, doubling the number of equal resulting subnets.
Moving from /24 to /27 borrows three bits and leaves five host bits in each resulting IPv4 subnet.
Broadcast address
A broadcast address is the final address in an ordinary IPv4 subnet, with every host bit set to 1, for delivery across that subnet.
The broadcast for 192.168.10.64/26 is .127; .128 instead starts the next subnet.

C

Carrier-grade NAT
Carrier-grade NAT (CGNAT) is provider-operated address translation that lets an ISP share public IPv4 addresses among multiple customers.
A customer router showing an outside address in 100.64.0.0/10 may be behind the provider’s translator.
CIDR
Classless Inter-Domain Routing (CIDR) describes address blocks with explicit prefix lengths, freeing network boundaries from old address classes.
The block 10.1.2.0/24 is valid even though the first octet 10 once belonged to class A.
Classful addressing
Classful addressing is the historical system that used an address’s leading bits to choose fixed network boundaries such as /8, /16 or /24.
An old class B label suggests a /16 default, but a modern interface can use an explicit different prefix.
Contiguous blocks
Contiguous blocks occupy uninterrupted address space, with each block’s first address immediately following the previous block’s last address.
Two neighboring /24s are contiguous, but they still need an aligned start to combine exactly into a /23.

D

Default gateway
A default gateway is the router interface a host normally sends off-subnet traffic to, using a usable address in the host’s own subnet.
A PC at 192.168.10.70/26 cannot use .1 as its directly connected gateway because .1 is outside its subnet.
Directed broadcast
A directed broadcast is the all-host-bits-one address of a particular IPv4 subnet, with router forwarding normally disabled by default.
192.168.10.127 is the directed broadcast address of the subnet 192.168.10.64/26.
Documentation address
A documentation address belongs to space reserved for examples, allowing instructions to show realistic addresses without naming live public hosts.
An invented external server can be described with 192.0.2.44 from the TEST-NET-1 documentation block.
Dotted-decimal notation
Dotted-decimal notation writes each IPv4 octet as a decimal value between 0 and 255, with a dot separating neighboring octets.
The four numbers in 192.168.10.77 represent separate octets; the dots do not act as decimal points.
Dual stack
Dual stack runs IPv4 and IPv6 on a device or network at the same time, allowing communication through either protocol as appropriate.
A dual-stack host can use IPv4 for one server and IPv6 for another without translating either connection.
Duplicate address
A duplicate address occurs when two interfaces on the same network claim the same IP address, creating conflicting delivery information.
Two workstations both configured as 192.168.5.20 can experience intermittent or failed connections.
Duplicate address detection
Duplicate address detection (DAD) checks whether a tentative IPv6 unicast address is already in use on the link before allowing that address to be used.
A host sends a neighbor solicitation from :: to the tentative address’s solicited-node group during DAD.

E

Exact summary
An exact summary is one prefix whose address range equals the full combined coverage of its input blocks, adding no gaps or outside addresses.
One /25 followed by two /26 blocks can fill a /24 exactly even though there are three input blocks.

F

FLSM
Fixed-length subnet masking (FLSM) gives every subnet in a plan the same prefix length, providing equal capacity even when actual needs differ.
Giving LANs and two-router links the same /27 prefix makes allocation simple but wastes addresses on the links.

G

Global routing prefix
A global routing prefix is the leading IPv6 address portion allocated to a site or organization for use in its wider routing context.
A site receiving 2001:db8:acad::/48 keeps those first three groups fixed across its planned /64 LANs.
Global unicast address
A global unicast address is intended for globally unique, internet-routable IPv6 communication, currently allocated from 2000::/3 with exceptions.
An address beginning with 2 is in the global allocation range, but 2001:db8::/32 is reserved for examples.
Growth reserve
A growth reserve is unallocated address space kept for expected future needs, with size and alignment chosen to support likely new subnets.
Keeping one whole /27 free permits a later 20-host LAN; scattered smaller gaps may not provide that option.

H

Hexadecimal
Hexadecimal is base-16 notation using digits 0–9 and a–f, with each digit representing four bits and each position a power of 16.
Hexadecimal 4b represents decimal 75: four groups of 16 plus the value 11 represented by b.
Hextet
A hextet is a 16-bit IPv6 group, written with up to four hexadecimal digits and separated from other groups by colons.
The hextet 0800 can be shortened to 800, but deleting its trailing zeros would change the value.
Host bit
A host bit is an address position outside the network prefix; combinations of these bits determine the addresses within the block.
A /27 IPv4 subnet has five host bits, giving 32 total address patterns and 30 ordinary usable hosts.
Host portion
The host portion is the set of address bits after an IPv4 network prefix, used to distinguish addresses inside the subnet.
A /26 leaves six host bits, allowing 64 patterns before reserving the network and broadcast addresses.
Host prefix
A host prefix identifies one exact address, such as IPv4 /32, instead of providing a multi-address subnet for attached hosts.
A router can use a /32 address for a logical loopback interface that represents that router.

I

Interesting octet
The interesting octet is the mask octet where the continuous network-bit run ends, used to calculate the subnet’s decimal increment.
In 255.255.248.0, the third octet is the interesting one, and 256 minus 248 gives an increment of 8.
Interface ID
An interface ID is the last 64 bits of an address in a standard IPv6 /64 subnet, separating interface addressing from the network prefix.
In 2001:db8:acad:12::25/64, the interface ID has value 25 in its final hexadecimal group.
IPv4 address
An IPv4 address is a 32-bit identifier for a network interface, commonly displayed as four decimal octets separated by dots.
A router connecting three IPv4 networks has addressing on each interface that connects to one of them.
IPv4 link-local
An IPv4 link-local address belongs to 169.254.0.0/16 and supports communication on the local link without routed reach to other networks.
A host at 169.254.37.12 can communicate locally, but that address does not provide internet routing.
IPv4 loopback
IPv4 loopback is the 127.0.0.0/8 block whose traffic remains inside the originating host, allowing local IP software communication and tests.
A response from 127.0.0.1 can succeed even while the workstation’s external network cable is disconnected.
IPv4 multicast
IPv4 multicast uses group destinations in 224.0.0.0/4 to deliver traffic to group members instead of one ordinary unicast interface.
The local-link multicast group 224.0.0.251 is used by multicast DNS, not as a workstation’s own unicast address.
IPv4-mapped address
An IPv4-mapped address represents an IPv4 address inside the IPv6 form ::ffff:0:0/96, commonly used by dual-stack host programming interfaces.
The mapped text ::ffff:192.0.2.10 has the same final 32 bits as the hex form ::ffff:c000:20a.
IPv6 /127 link
An IPv6 /127 link is a two-address prefix used on router-to-router point-to-point links, distinct from the standard /64 structure for LANs.
Two router endpoints can use the two addresses in a /127 without allocating a whole /64 to that link.
IPv6 address
An IPv6 address is a 128-bit network-interface or group identifier, normally written as eight hexadecimal groups before optional shortening.
The notation 2001:db8::10 compresses a full 128-bit address, not a shorter address with fewer bits.
IPv6 link-local address
An IPv6 link-local address uses fe80::/10 and is valid only on its own link; routers never forward its traffic onto another link.
A host often uses its router’s link-local address as the next hop, even when sending traffic to a global destination.

L

Limited broadcast
The limited broadcast is IPv4 destination 255.255.255.255, delivered on the local network and never forwarded by routers to another network.
A limited broadcast from a workstation remains local instead of traveling through its default gateway.

M

Mask mismatch
A mask mismatch occurs when interfaces intended to share a subnet use different network boundaries, potentially disagreeing about local delivery.
A /24 host may send directly to a peer whose /25 settings classify the return destination as remote.
Modified EUI-64
Modified EUI-64 forms a 64-bit interface ID by inserting fffe into a 48-bit MAC and flipping the first byte’s universal/local bit.
MAC 00:1a:2b:3c:4d:5e produces ID 021a:2bff:fe3c:4d5e before leading-zero shortening.
Multicast scope
An IPv6 multicast scope is the four-bit field limiting how widely a multicast group is valid, such as one link, one site or an organization.
The 2 in ff02 indicates link-local scope, while the 5 in ff05 indicates site-local scope.

N

NAT
Network address translation (NAT) replaces IP addresses as traffic crosses a translating device, such as an edge router or firewall.
An edge router can replace a workstation’s private source address with a public address for an internet connection.
NAT64
NAT64 translates between IPv6 and IPv4 traffic, commonly with DNS64, so IPv6-only clients can communicate with IPv4-only servers.
A translator can use the well-known prefix 64:ff9b::/96 for IPv6 addresses that represent IPv4 destinations.
Network address
A network address names a subnet by keeping its prefix bits and clearing all host bits; an ordinary IPv4 host cannot use it.
Address 192.168.10.64 is the network address for /26, but can be a host address under /25.
Network interface
A network interface is a device’s connection to a network, with IP addressing assigned to that connection rather than the device as a whole.
A laptop can show one IPv4 address for its Wi-Fi interface and a different one for Ethernet.
Network portion
The network portion is the leading set of address bits selected by a subnet mask or prefix to identify the subnet an interface belongs to.
With /21, the first 21 bits of 172.16.45.200 identify its network, 172.16.40.0/21.
Nibble
A nibble is a four-bit group, represented by exactly one hexadecimal digit, which makes IPv6 prefix positions easier to count.
The hexadecimal digit a corresponds to nibble 1010, while f corresponds to the four bits 1111.
Nibble boundary
A nibble boundary is a prefix boundary after a complete four-bit hexadecimal digit, making network bits visible without splitting a hex digit.
A /56 fixes 14 hex digits; in fourth group 4b7f, its first two digits remain fixed while 7f varies.

O

Octet
An octet is a group of eight bits, capable of representing 256 different values from 0 through 255 in an IPv4 address.
The final octet of 192.168.10.77 is decimal 77, written as the eight binary positions 01001101.
Overlap
An overlap occurs when address allocations claim some of the same addresses; with aligned CIDR blocks, one overlapping block contains the other.
Allocating 10.0.0.0/23 to one LAN and 10.0.1.0/24 to another gives the LANs conflicting address space.

P

Parent block
A parent block is the larger address allocation inside which smaller subnets must fit, without extending beyond its first or last address.
A subnet beginning at 192.168.51.0 would fall outside parent block 192.168.50.0/24, even if unused.
PAT
Port address translation (PAT) distinguishes translated connections through transport ports so several hosts can share one public IPv4 address.
Many internal workstations can browse through one public address while PAT keeps their connections distinct.
Place value
A place value is the amount represented by one digit position; binary octet positions run from 128 on the left to 1 on the right.
In 00001010, the two 1 bits occupy positions worth 8 and 2, producing the decimal value 10.
Point-to-point link
A point-to-point link connects exactly two endpoints; a supported IPv4 /31 can use both of its addresses without a broadcast reservation.
Two routers can use 10.0.0.8 and 10.0.0.9 on a link configured as 10.0.0.8/31.
Prefix length
A prefix length is the number of leading address bits fixed for a network, written after a slash in IPv4 or IPv6 notation.
In 192.168.10.77/26, the slash value 26 states the network-bit count, not the number of hosts.
Private IPv4 address
A private IPv4 address belongs to one of the three RFC 1918 blocks, reusable inside networks and not routed on the public internet.
172.20.10.2 is private, while 172.32.10.2 lies beyond the private block ending at 172.31.255.255.
Public IPv4 address
A public IPv4 address is globally unique address space eligible for internet routing, although actual reachability depends on routes and policy.
A public-facing server can still reject inbound connections through its firewall despite having a public address.

S

Same-subnet test
A same-subnet test applies one mask to two IPv4 addresses and compares the network results to decide whether the addresses share that subnet.
With /25, addresses ending in .100 and .130 produce different network addresses despite similar beginnings.
Shared address space
Shared address space is the 100.64.0.0/10 block reserved for provider use with CGNAT, distinct from RFC 1918 private and public addresses.
100.72.5.9 falls inside shared space, while 100.128.0.1 is beyond that reserved /10 block.
SLAAC
Stateless address autoconfiguration (SLAAC) lets a host form IPv6 addresses from an advertised LAN prefix and a host-created interface ID.
A host can combine an advertised /64 with a random interface ID instead of deriving that ID from its MAC.
Solicited-node multicast
A solicited-node multicast group combines ff02::1:ff00:0/104 with a unicast address’s last 24 bits for targeted neighbor-discovery requests.
An address ending in 0007:003a joins ff02::1:ff07:3a, retaining three final bytes rather than just one hextet.
Stable per-network ID
A stable per-network ID is a host-created interface ID designed to stay consistent on one network without exposing a fixed MAC-derived ID everywhere.
A laptop can retain a usable stable address on one network while using a different identifier on another.
Subnet ID
A subnet ID is the part of an IPv6 site allocation used to select an internal subnet before the standard 64-bit interface-ID boundary.
With a /48 site allocation, the fourth hextet supplies 16 subnet bits and can select 65,536 /64 LANs.
Subnet mask
A subnet mask is a 32-bit pattern of leading 1s followed by 0s that marks the network and host portions of an IPv4 address.
The mask 255.255.255.192 keeps 26 network bits and leaves six positions for the host portion.
Subnet zero
Subnet zero is the first subnet formed when all borrowed subnet bits are zero; it is usable in modern classless address planning.
The first /27 produced from 192.168.10.0/24 is 192.168.10.0/27 and counts among the eight usable subnets.
Subnetting
Subnetting divides a parent address block into smaller networks by lengthening its prefix and reducing the host bits available in each block.
Borrowing three bits from a /24 produces eight /27 subnets, each with 30 ordinary usable host addresses.
Summarization
Summarization describes several address blocks with one shorter prefix, potentially including extra addresses if the blocks do not form an exact fit.
Four /24 networks beginning at third octets 0, 1, 2 and 3 summarize exactly as one aligned /22.

T

Temporary interface ID
A temporary interface ID is an IPv6 identifier used for a limited time, commonly for outgoing connections, to reduce long-term address tracking.
A host can keep a stable address while creating temporary addresses for outgoing activity on the same interface.
Tunneling
Tunneling carries a packet of one protocol inside a packet of another, allowing it to cross an intervening network that supports the outer protocol.
An IPv6 packet can cross an IPv4-only part of a path while encapsulated inside an IPv4 packet.

U

Unicast
Unicast addresses one individual interface as the destination, unlike multicast group delivery or routing to one of several anycast instances.
A host may have both a ULA and a global unicast address on the same interface for different connections.
Unique local address
A unique local address (ULA) is IPv6 unicast space for private routed networks, from fc00::/7, with locally assigned prefixes beginning fd.
An organization can route fd3c:9a21:7b04::/48 between internal sites without exposing it on the public internet.
Universal/local bit
The universal/local bit is the first MAC byte’s bit worth 2, which modified EUI-64 inverts when creating the IPv6 interface ID.
A first MAC byte of 02 becomes 00 after inversion, showing why the step is not always addition.
Unspecified IPv6 address
The unspecified IPv6 address is the all-zero address ::/128, used as a source before an interface has an address available for that purpose.
Duplicate address detection uses :: as its source; ::/0 instead names all destinations in a default route.
Usable host range
A usable host range is the set of assignable interface addresses between the network and broadcast endpoints of an ordinary IPv4 subnet.
For 192.168.10.64/26, the usable range runs from 192.168.10.65 through 192.168.10.126.

V

VLSM
Variable-length subnet masking (VLSM) allows different prefix lengths inside one parent block so subnet capacities can match different needs.
A /25 LAN, a /27 LAN and a /30 router link can all be allocated without overlap inside a suitable parent.

Z

Zero compression
Zero compression replaces one continuous run of zero-valued IPv6 groups with a double colon, while preserving the full 128-bit address.
In 2001:db8::1, the double colon replaces five complete zero groups between the visible groups.
Zone index
A zone index identifies the local interface or scope zone for an IPv6 address, resolving addresses that could occur on more than one link.
In fe80::1%eth0, the suffix selects eth0 so the host knows which local link contains the intended router.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started