IP addressing is one of the most fundamental concepts in networking.
Every network engineer and senior system administrator should understand how IPv4 and IPv6 addresses identify network interfaces, how hosts determine whether a destination is local or remote, and how subnet masks and prefixes define network boundaries.
This article establishes the IP addressing foundation that will be required for the upcoming CCNA section.
We will cover:
- IPv4 structure
- IPv4 address types
- Subnet masks
- CIDR
- Network and host portions
- Private and public addressing
- Loopback
- APIPA
- Link-local addressing
- IPv6 structure
- IPv6 address types
- Global unicast
- Unique local addresses
- Multicast
- IPv6 loopback
- IPv6 link-local
- Address assignment
- Addressing troubleshooting
Detailed subnetting calculations, VLSM and route summarization will be covered later in the CCNA section to avoid repeating the same material.
IPv4 Addressing
1. What is an IPv4 address?
IPv4 is a Layer 3 addressing protocol that uses 32-bit addresses.
An IPv4 address is normally written as four decimal octets.
Example:
192.168.10.25
Each octet contains 8 bits:
192 . 168 . 10 . 25
8 bits 8 bits 8 bits 8 bits
Therefore:
4 × 8 = 32 bits
2. How many IPv4 addresses are possible?
IPv4 provides:
2^32
possible bit patterns.
That equals:
4,294,967,296
possible IPv4 addresses.
Not all of these are available for normal host assignment because many address ranges have special purposes.
3. What is an IPv4 octet?
An IPv4 address contains four octets.
Example:
192.168.1.100
The octets are:
192
168
1
100
Each octet can represent values from:
0–255
because an octet contains 8 bits.
4. What is the network portion of an IP address?
The network portion identifies the IP network to which an address belongs.
The exact boundary is determined by the subnet mask or prefix length.
For example:
192.168.10.25/24
The /24 means the first 24 bits represent the network prefix.
The remaining 8 bits are available for host addressing within that subnet.
5. What is the host portion?
The host portion identifies an address within the network defined by the prefix.
For:
192.168.10.25/24
the conceptual division is:
Network Host
192.168.10 .25
The actual binary boundary is determined by /24, not simply by the decimal octets.
Subnet Masks
6. What is a subnet mask?
A subnet mask identifies which bits of an IPv4 address represent the network portion and which represent the host portion.
Example:
IP Address:
192.168.10.25
Subnet Mask:
255.255.255.0
The equivalent CIDR notation is:
192.168.10.25/24
7. What is CIDR?
CIDR stands for Classless Inter-Domain Routing.
CIDR uses a prefix length to specify how many bits represent the network portion.
Examples:
192.168.1.0/24
10.10.0.0/16
172.16.10.0/28
CIDR replaced the limitations of traditional classful addressing.
8. What does /24 mean?
/24 means:
24 network bits
8 host bits
because IPv4 contains 32 bits.
The commonly associated subnet mask is:
255.255.255.0
9. What does /16 mean?
/16 means:
16 network bits
16 host bits
The corresponding mask is:
255.255.0.0
10. What does /8 mean?
/8 means:
8 network bits
24 host bits
The corresponding subnet mask is:
255.0.0.0
11. Why is CIDR important?
CIDR allows networks to be sized according to actual requirements rather than forcing every organization to use fixed classful network sizes.
It enables:
- Flexible subnet sizes
- Efficient address utilization
- Route summarization
- More precise routing
- VLSM
These concepts become particularly important in CCNA and CCNP routing.
Network, Broadcast and Host Addresses
12. What is a network address?
The network address identifies the subnet itself.
For example:
192.168.10.0/24
Here:
192.168.10.0
is the network address.
It is not normally assigned to an ordinary host in that subnet.
13. What is a broadcast address?
In an IPv4 subnet that supports broadcast, the directed broadcast address has all host bits set to 1.
For:
192.168.10.0/24
the broadcast address is:
192.168.10.255
A broadcast is delivered to hosts within the applicable broadcast domain according to the network configuration.
14. What are usable host addresses?
For a traditional IPv4 subnet such as:
192.168.10.0/24
the commonly used host range is:
192.168.10.1
through
192.168.10.254
The first address is the network address and the last is the broadcast address.
There are important exceptions for special prefix lengths such as /31 and /32, which will be discussed later.
15. How many usable hosts are available in a /24 subnet?
A /24 leaves 8 host bits.
Therefore:
2^8 = 256
total addresses.
Under traditional subnetting rules:
256 - 2 = 254
usable host addresses.
The two excluded addresses are normally:
- Network address
- Broadcast address
16. What is a /32 address?
A /32 represents a single IPv4 address.
It has:
32 network bits
0 host bits
It is commonly used for:
- Host routes
- Loopback addresses
- Router identification
- Specific route entries
17. What is a /31 subnet?
A /31 provides two IPv4 addresses.
RFC 3021 defines the use of /31 prefixes for point-to-point links, allowing both addresses to be used as endpoints without requiring a traditional network and broadcast address.
This can improve address efficiency on point-to-point links.
Private and Public IPv4 Addresses
18. What are private IPv4 addresses?
Private IPv4 address space is defined by RFC 1918.
The three private ranges are:
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
These addresses are intended for use within private networks.
They are not globally routable on the public Internet.
19. What is the difference between private and public IP addresses?
Private IP
Used within private networks.
Examples:
10.10.10.20
172.16.5.10
192.168.1.50
Public IP
Globally routable addressing used for Internet communication, subject to Internet routing and allocation policies.
A private address usually requires a mechanism such as NAT to communicate with public Internet destinations.
20. Is every 172.x.x.x address private?
No.
Only:
172.16.0.0 – 172.31.255.255
belongs to the RFC 1918 private range.
For example:
172.20.10.10
is private.
But:
172.50.10.10
is not part of the RFC 1918 private range.
This is a common interview trap.
Special IPv4 Addresses
21. What is the IPv4 loopback address?
The IPv4 loopback range is:
127.0.0.0/8
The most commonly used loopback address is:
127.0.0.1
It refers back to the local host.
Testing:
ping 127.0.0.1
tests the local IP stack rather than the physical network.
22. What is APIPA?
APIPA stands for Automatic Private IP Addressing.
On Windows, when a DHCP client cannot obtain an IPv4 address and APIPA is used, it may automatically assign an address from:
169.254.0.0/16
Example:
169.254.25.10
APIPA is link-local addressing and is not a substitute for normal enterprise DHCP configuration.
23. What does a 169.254.x.x address usually indicate?
It often indicates that a Windows host configured an IPv4 link-local address because it could not obtain a normal DHCP address.
Possible causes include:
- DHCP server unavailable
- DHCP relay problem
- VLAN problem
- Switch connectivity problem
- DHCP scope exhaustion
- Client configuration issue
Do not simply conclude that the DHCP server is down; investigate the complete DHCP path.
24. What is 0.0.0.0?
0.0.0.0 has context-dependent meanings.
For example:
- As a source address, it can represent an unspecified address.
- In routing,
0.0.0.0/0represents the default route. - A server binding to
0.0.0.0can mean listening on all applicable local IPv4 interfaces.
Therefore, the meaning depends on where it appears.
25. What is the IPv4 default route?
The IPv4 default route is:
0.0.0.0/0
It matches destinations for which no more specific route exists.
For example:
0.0.0.0/0 → 192.168.1.1
means traffic without a more specific matching route can be sent to 192.168.1.1.
IPv6 Fundamentals
26. Why was IPv6 introduced?
The primary driver was the exhaustion of globally routable IPv4 address space.
IPv6 provides a much larger address space and introduces other protocol improvements.
IPv6 uses:
128-bit addresses
instead of IPv4’s:
32-bit addresses
27. How many IPv6 bits are there?
IPv6 addresses contain:
128 bits
They are normally represented as eight groups of four hexadecimal digits.
Example:
2001:0db8:0000:0000:0000:0000:0000:0010
28. How is IPv6 written?
IPv6 uses hexadecimal notation separated by colons.
Example:
2001:db8:10:20::100
Each hexadecimal character represents four bits.
29. What is IPv6 zero compression?
Consecutive groups of zero can be compressed using:
::
For example:
2001:0db8:0000:0000:0000:0000:0000:0001
can be written as:
2001:db8::1
The :: notation can be used only once in an IPv6 address.
30. What is IPv6 leading-zero suppression?
Leading zeros within an individual hexadecimal group can be removed.
For example:
0db8
becomes:
db8
Similarly:
0001
becomes:
1
This is different from :: compression.
IPv6 Address Types
31. What is an IPv6 Global Unicast Address?
Global Unicast Addresses are globally routable IPv6 addresses.
They are generally associated with:
2000::/3
They are used for normal globally routable IPv6 communication.
32. What is an IPv6 link-local address?
IPv6 link-local addresses use:
FE80::/10
They are used for communication on the local link.
Every IPv6-enabled interface is expected to have a link-local address.
Link-local addresses are important for functions such as:
- Neighbor Discovery
- Router Discovery
- First-hop communication
- IPv6 routing protocols
They are not intended to be routed across IPv6 routers.
33. What is an IPv6 loopback address?
The IPv6 loopback address is:
::1
It is equivalent conceptually to IPv4:
127.0.0.1
It refers to the local system.
34. What is the IPv6 unspecified address?
The IPv6 unspecified address is:
::
It represents an unspecified address.
It is conceptually similar to IPv4:
0.0.0.0
but the exact usage rules are protocol-specific.
35. Does IPv6 use broadcast?
No.
IPv6 does not use broadcast.
Instead, IPv6 uses multicast for functions that require communication with multiple receivers.
This is an important difference between IPv4 and IPv6.
36. What is IPv6 multicast?
IPv6 multicast addresses begin with:
FF00::/8
Multicast is used for one-to-many communication.
IPv6 uses multicast extensively for functions such as:
- Neighbor Discovery
- Router Discovery
- Service communication
37. What is an IPv6 Unique Local Address?
Unique Local Addresses (ULA) are designed for private/internal IPv6 communication.
They use:
FC00::/7
The currently defined ULA format uses the FD00::/8 portion for locally assigned prefixes.
They are not intended to be globally routed on the public Internet.
38. What is the difference between IPv6 Global Unicast and ULA?
Global Unicast
Designed for globally routable IPv6 communication.
Example:
2001:db8::10
ULA
Designed for internal/private IPv6 communication.
Example:
fd12:3456:789a::10
IPv6 Address Assignment
39. How can an IPv6 host obtain an address?
IPv6 supports several mechanisms.
Static configuration
An administrator manually configures the address.
SLAAC
Stateless Address Autoconfiguration allows a host to configure an IPv6 address using information advertised by an IPv6 router.
DHCPv6
DHCPv6 can provide IPv6 configuration information.
The exact combination depends on the network design.
40. What is SLAAC?
SLAAC stands for Stateless Address Autoconfiguration.
A host can use information from Router Advertisements to automatically configure an IPv6 address.
SLAAC is one of the major IPv6 address-assignment mechanisms.
41. What is DHCPv6?
DHCPv6 is the IPv6 version of DHCP.
It can provide configuration information such as:
- IPv6 addresses in stateful configurations
- DNS-related information
- Other configuration parameters
DHCPv6 can also operate in conjunction with SLAAC depending on the deployment.
42. Does IPv6 always require DHCPv6?
No.
IPv6 can use:
- Static configuration
- SLAAC
- DHCPv6
- Combinations of these mechanisms
A common misconception is that IPv6 requires DHCPv6 in the same way IPv4 networks commonly use DHCP.
IPv4 vs IPv6
43. What are the major differences between IPv4 and IPv6?
| IPv4 | IPv6 |
|---|---|
| 32-bit | 128-bit |
| Decimal notation | Hexadecimal notation |
| Uses broadcast | No broadcast |
| Uses ARP | Uses NDP/ICMPv6 |
| Smaller address space | Extremely large address space |
| NAT widely used | NAT is not fundamental to IPv6 |
| DHCP common | SLAAC and/or DHCPv6 |
44. Does IPv6 eliminate the need for NAT?
IPv6 was designed with a sufficiently large address space to support globally unique addressing without requiring NAT as a fundamental address-conservation mechanism.
However, NAT-like mechanisms can still exist in IPv6 deployments for specific purposes.
Therefore, avoid saying:
“NAT does not exist in IPv6.”
A more accurate statement is:
IPv6 does not require NAT for address conservation in the way IPv4 commonly does.
Addressing Scenarios
45. A PC has 192.168.1.50/24 and the server has 192.168.1.100/24. Are they in the same subnet?
Yes.
Both belong to:
192.168.1.0/24
Therefore, they are in the same IPv4 subnet.
46. A PC has 192.168.1.50/24 and the server has 192.168.2.100/24. Are they in the same subnet?
No.
The PC belongs to:
192.168.1.0/24
The server belongs to:
192.168.2.0/24
Traffic between them requires Layer 3 routing.
47. Can two devices communicate if they have different IP networks?
Yes, provided that:
- A valid routing path exists
- Correct addressing is configured
- The devices have appropriate gateways/routes
- Security policies permit the traffic
Different IP networks are not inherently a problem; routing exists specifically to connect different networks.
48. Can two devices with IP addresses in the same subnet communicate without a router?
Yes.
If they are on the same Layer 2 network/VLAN and other configuration is correct, they can communicate directly without a router.
They resolve each other’s MAC addresses and send Ethernet frames locally.
49. What happens if two hosts have duplicate IPv4 addresses?
Duplicate IP addressing can cause unpredictable connectivity.
Symptoms can include:
- Intermittent connectivity
- ARP instability
- Traffic reaching the wrong device
- Duplicate-address warnings
- Applications randomly failing
Duplicate IP addresses should be corrected rather than treated as a normal configuration.
50. What is an IP address conflict?
An IP address conflict occurs when two or more devices use the same IP address within a network where that address is expected to be unique.
For example:
PC-A → 192.168.10.50
PC-B → 192.168.10.50
This can cause ARP and connectivity problems.
Addressing Troubleshooting
51. A Windows PC receives 169.254.20.10. What should you investigate?
Start with DHCP and local connectivity.
Check:
ipconfig /all
Then investigate:
- NIC status
- Switch port
- VLAN
- DHCP server availability
- DHCP scope
- DHCP relay/helper configuration if applicable
- Firewall/security controls
- DHCP client logs
Do not automatically assume the DHCP server itself is the problem.
52. A server has an IP address but cannot reach another subnet. What should you check?
Check:
- Subnet mask/prefix
- Default gateway
- Local routing table
- Remote routing
- Firewall/ACL
- Return path
- VLAN configuration
On Windows:
ipconfig /all
route print
On Linux:
ip addr
ip route
53. A host can reach devices in its subnet but not remote networks. What is a likely area of investigation?
Check the host’s:
- Default gateway
- Subnet mask
- Routing table
Then check:
- Gateway availability
- Router routes
- Firewall policies
- Return routing
If local communication works but remote communication fails, the Layer 3 boundary becomes a major area of investigation.
54. A host has the correct IP address and gateway but cannot communicate with another host in the same subnet. What should you investigate?
Because both hosts should communicate locally, investigate:
- VLAN
- Switch port
- ARP
- Duplicate IP
- Host firewall
- NIC
- Physical connectivity
- Incorrect subnet mask
- Port security
- Layer 2 isolation
A default gateway is normally not required for communication between hosts in the same subnet.
Common Addressing Mistakes
55. Is 192.168.0.0/16 the entire private 192.168 address range?
Yes.
RFC 1918 defines:
192.168.0.0/16
which includes:
192.168.0.0
through
192.168.255.255
56. Is 172.0.0.0/8 private?
No.
The RFC 1918 private range is:
172.16.0.0/12
which covers:
172.16.0.0
through
172.31.255.255
57. Is 10.0.0.0/8 public?
No.
It is an RFC 1918 private IPv4 range.
58. Is 169.254.0.0/16 RFC 1918 private addressing?
No.
It is IPv4 link-local address space.
It is commonly encountered with APIPA on Windows.
Quick Revision
IPv4
32 bits
4 octets
Decimal notation
Example:
192.168.10.25
IPv4 private ranges
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
Common special IPv4 ranges
127.0.0.0/8 → Loopback
169.254.0.0/16 → Link-local
0.0.0.0/0 → Default route
IPv6
128 bits
8 hexadecimal groups
Example:
2001:db8:10::25
Common IPv6 ranges
2000::/3 → Global Unicast
FE80::/10 → Link-local
FC00::/7 → Unique Local
FF00::/8 → Multicast
::1 → Loopback
:: → Unspecified
Exam Answer Summary
What is CIDR?
CIDR, or Classless Inter-Domain Routing, represents an IP network using a prefix length such as
/24rather than relying on traditional classful network boundaries. It allows flexible subnetting and efficient route aggregation.
What are RFC 1918 private IPv4 ranges?
10.0.0.0/8,172.16.0.0/12, and192.168.0.0/16.
What is APIPA?
APIPA is Automatic Private IP Addressing. On Windows, a host may automatically configure an IPv4 link-local address from
169.254.0.0/16when it cannot obtain an address through DHCP.
What is the IPv6 link-local range?
FE80::/10.
Does IPv6 use broadcast?
No. IPv6 does not use broadcast; multicast is used for one-to-many communication.
What is the IPv6 loopback address?
::1.
What is the difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses and IPv6 uses 128-bit addresses. IPv4 supports broadcast and commonly uses ARP for address resolution, while IPv6 does not use broadcast and uses Neighbor Discovery through ICMPv6.
Senior Interview Tip
When troubleshooting an IP addressing problem, don’t immediately start changing the IP address.
First establish:
1. What is the host IP?
2. What is the subnet mask/prefix?
3. What is the destination IP?
4. Is the destination local or remote?
5. What is the default gateway?
6. What does the routing table say?
7. Is ARP/NDP working?
8. Is Layer 2 connectivity working?
9. Is routing working?
10. Is a firewall blocking the traffic?
The key concept is:
An IP address by itself tells you very little. You need the address together with its prefix/subnet information and the routing context.
What Comes Next?
Part 5 — Networking Fundamentals: Network Protocols, Ports, TCP vs UDP, DNS, DHCP, HTTP/HTTPS, SSH, SMTP, SNMP & NTP
We will now cover the major network protocols and services that a System Administrator or Network Engineer encounters every day, including how to identify whether a problem is related to DNS, DHCP, TCP, UDP, a specific port, or the application itself.