network [ip] [mask]
Defines the subnet or network number for the DHCP pool, specifying which IP addresses the DHCP server can assign to clients.
network [ip] [mask]When to Use This Command
- Configuring a DHCP pool for a /24 subnet on a LAN segment, e.g., 192.168.1.0/24.
- Setting up DHCP for multiple VLANs by creating separate pools with different network statements.
- Assigning IP addresses to a guest wireless network with a specific subnet.
- Configuring DHCP for a remote branch office subnet via a DHCP relay.
Command Examples
Basic DHCP Pool Configuration
network 192.168.1.0 255.255.255.0This command defines the network 192.168.1.0 with a 24-bit mask (255.255.255.0). The DHCP server will allocate addresses from 192.168.1.1 to 192.168.1.254 (excluding the network and broadcast addresses).
Using a Different Subnet Mask
network 10.0.0.0 255.255.255.128This defines a /25 subnet (mask 255.255.255.128). The DHCP server will assign addresses from 10.0.0.1 to 10.0.0.126. The network address is 10.0.0.0 and broadcast is 10.0.0.127.
Understanding the Output
The network command does not produce output when entered; it simply configures the DHCP pool. To verify, use 'show ip dhcp pool [pool-name]' which displays the network, lease time, and utilization. The output shows the subnet and mask, the number of addresses, and how many are currently allocated. A healthy pool has low utilization; high utilization (e.g., >90%) may indicate exhaustion. Watch for overlapping subnets across pools.
CCNA Exam Tips
The network command must match the subnet of the client's interface; otherwise, clients won't get an IP.
The mask can be in dotted decimal or CIDR format (e.g., /24), but IOS expects dotted decimal in the command.
You can configure multiple pools for different subnets; the router selects the pool based on the interface receiving the DHCP request.
Remember that the network command excludes the network and broadcast addresses automatically.
Common Mistakes
Using the wrong subnet mask, causing the pool to cover a different range than intended.
Forgetting to configure a default-router or DNS server, leaving clients without gateway or name resolution.
Creating overlapping pools for different subnets, leading to IP address conflicts.
Related Commands
ip dhcp pool [name]
Creates a DHCP pool and enters DHCP pool configuration mode, where you define the subnet, default gateway, DNS servers, and other DHCP options for assigning IP addresses to clients.
show ip dhcp pool
Displays the configuration and utilization statistics of a DHCP pool, used to verify pool settings and address allocation status.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions