Loading...
Address configuration determines local delivery and the route beyond a subnet. Distinguish allocation, subnet calculation and translation because they solve different problems.
What you'll be able to do
An IPv4 address has 32 bits. A prefix length such as /26 identifies how many leading bits form the network part; the remaining bits identify positions within that subnet. Bitwise AND of the address and mask yields the network identifier.
For 192.168.10.77/26, the final-octet mask is 192, binary 11000000. The address’s final octet 77 is 01001101; AND gives 01000000=64. The network is 192.168.10.64/26. In the usual IPv4 subnet model, the block ends at .127, with ordinary host addresses .65 through .126.
IPv6 uses 128-bit addresses and greatly expands the address space compared with IPv4. Private IPv4 ranges can be reused inside separate local networks and are not routed as ordinary public destinations on the global Internet. “Private address” does not mean the data are automatically encrypted.
DHCP can lease an address and related configuration such as subnet mask, gateway and DNS settings to a client. It reduces manual configuration work; it does not make the leased address a permanent personal identity. Public allocation and routing remain separate infrastructure concerns.
NAT rewrites addressing information at a boundary. A common IPv4 arrangement also maps ports so several internal hosts can share an external address. The translation table connects returning traffic with the appropriate internal communication. NAT is not itself a substitute for a complete firewall policy.
Port forwarding configures an inbound mapping from an external endpoint to a chosen internal host/service. It can support an authorised service behind a translating router, subject to routing and access rules. It should not be confused with DHCP, which supplies configuration rather than translating each packet.
| Mechanism | Task |
|---|---|
| Subnet mask | Identify a network part |
| DHCP | Supply leased configuration |
| NAT with port mapping | Translate endpoints at a boundary |
| Port forwarding | Map selected inbound traffic to an internal service |
Attempt the task before opening its worked response. Record each change of state, explain the rule used, and check the result against the original requirements. Code examples labelled Python 3 use that language’s conventions; pseudocode states its own assumptions.
Common mistakes to avoid
Key takeaways
Test yourself
Answer a few questions, then review anything you missed.
Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.