DHCP Configuration 2
Topology

Tasks:
Configure a Router as DHCP server to assign IP addresses dynamically to clients in different subnets.
- Configure Router as a DHCP server for the networks 192.168.1.0/24 and 192.168.2.0 .24 using pools named OFFICE1 and OFFICE2 respectively.
- Configure Router as the default-gateway and DNS server in each pool.
- Exclude First Address in each network.
- Configure PCs to obtain their IP addresses dynamically via DHCP. PC1 and PC2 must be issued the IP address of 192.168.1.2 and 192.168.2.2 respectively.
Solution:
Task 1 & 2:
1. Configure
Router as a DHCP server for the networks 192.168.1.0/24 and 192.168.2.0 .24
using pools named OFFICE1 and OFFICE2 respectively.
2. Configure
Router as the default-gateway and DNS server in each pool.
Router#configure terminal
Router(config)#ip dhcp pool OFFICE1
Router(dhcp-config)#network 192.168.1.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.1.1
Router(dhcp-config)#dns-server 192.168.1.1
Router(dhcp-config)#exit
Router(config)#ip dhcp pool OFFICE2
Router(dhcp-config)#network 192.168.2.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.2.1
Router(dhcp-config)#dns-server 192.168.2.1
Router(dhcp-config)#exit
ip dhcp pool creates a pool
of IP addresses for devices in the network.
network defines the
subnet to assign IPs from.
default-router sets the router as default gateway in each
network.
dns-server specifies the router as DNS server for the
clients in each network.
Task 3: Exclude
First Address in each network.
Router(config)#ip dhcp
excluded-address 192.168.1.1
Router(config)#ip dhcp excluded-address 192.168.2.1
This command
reserves addresses that won't be assigned by DHCP. This is necessary as these
addresses are assigned to the Router interfaces in each network so they
shouldn't be assigned to other devices.
Task 4:
Configure PCs to obtain their IP addresses dynamically via DHCP. PC1 and PC2
must be issued the IP address of 192.168.1.2 and 192.168.2.2 respectively.
Both PCs should
have a link-local address configured by default. We need to renew the IP
configuration.
PC1:\>ipconfig
/renew
IP
Address.................: 192.168.1.2
Subnet
Mask................: 255.255.255.0
Default
Gateway............: 192.168.1.1
DNS
Server.................: 192.168.1.1
PC2:\>ipconfig
/renew
IP
Address.................: 192.168.2.2
Subnet
Mask................: 255.255.255.0
Default
Gateway............: 192.168.2.1
DNS
Server.................: 192.168.2.1
This command is
used on a PC to request a new IP address from a DHCP server. It forces the
client to release its current IP address (if any) and renew it by communicating
with the DHCP server. The new IP address and related network configuration
details (subnet mask, default gateway, DNS server) are obtained and applied to
the system.
Now exit
configuration mode and save the configuration.
Router(config)#end
Router#write memory
Packet Tracer File
Clicking this button will begin the download of a ZIP file. Inside the ZIP file, you'll find a Packet Tracer Activity (.pka) file, which will automatically track your progress as you configure the network.