The PCs on LAN 192.168.1.0/24 are set to get their IP through DHCP, but nobody answers. R1 will be the server.
Reserve addresses 192.168.1.1 to 192.168.1.10 for statically addressed devices and create a pool named LAN that hands out the rest, with 192.168.1.1 as the default gateway and 8.8.8.8 as DNS.
Watch out: if a PC gets its IP before you finish the pool, it'll lack a gateway or DNS. On its console, ipconfig /renew asks again.
Topology
Devices and cabling
R1·2911
SW1·2960-24TT
PC1, PC2·PC-PT
From
To
Cable
R1Gi0/0
SW1Gi0/1
Straight-through
PC1Fa0
SW1Fa0/1
Straight-through
PC2Fa0
SW1Fa0/2
Straight-through
If in doubt, the automatic connection cable (the lightning bolt) picks the right one. Rule: straight-through between different devices (PC or router to switch) and crossover between alike ones.
Addressing
Device
Interface
Address
Mask
Default gateway
R1
G0/0
192.168.1.1
255.255.255.0
—
PC1
NIC
DHCP
DHCP
DHCP
PC2
NIC
DHCP
DHCP
DHCP
Starting configuration
In the app this is already done. In Packet Tracer, before you start, enter each device with enable and configure terminal and type (or paste) these lines.
R1hostname R1
no ip domain-lookup
interface g0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
SW1hostname SW1
no ip domain-lookup
PCs and servers (Desktop › IP Configuration)
PC1: DHCP
PC2: DHCP
Tasks
What must end up working. In the app, each one ticks itself off as soon as you get it.
192.168.1.1 to 192.168.1.10 excluded
Pool LAN with network 192.168.1.0/24
The pool hands out 192.168.1.1 as gateway
The pool hands out 8.8.8.8 as DNS
PC1 and PC2 get an IP, gateway and DNS
Checked with show ip dhcp binding
In Packet Tracer
On each PC, go to Desktop › IP Configuration and choose DHCP. You can also use ipconfig /renew in Command Prompt.
Hints
192.168.1.1 to 192.168.1.10 excluded: ip dhcp excluded-address 192.168.1.1 192.168.1.10 (in global config, not inside the pool)
Pool LAN with network 192.168.1.0/24: ip dhcp pool LAN → network 192.168.1.0 255.255.255.0
The pool hands out 192.168.1.1 as gateway: Inside the pool: default-router 192.168.1.1
The pool hands out 8.8.8.8 as DNS: Inside the pool: dns-server 8.8.8.8
PC1 and PC2 get an IP, gateway and DNS: Check their settings with ipconfig /all. If something's missing, ipconfig /renew.
Checked with show ip dhcp binding: show ip dhcp binding on R1
Step-by-step solution
Try it on your own first: you learn much more by typing the commands yourself.
Show the solution
1Reserve the static addresses R1
Excluded addresses are configured outside the pool, in global mode. Here they're kept for the router and other statically addressed devices.
R1enable
configure terminal
ip dhcp excluded-address 192.168.1.1 192.168.1.10
2Create the pool R1
network defines what is handed out; default-router and dns-server, what each PC gets besides the IP.
R1ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8
end
3Request the IP on the PCs PC1
If a PC requested its IP before the pool was finished, it will lack a gateway or DNS until it asks again.
PC1ipconfig /renew
4And on PC2 PC2
PC2ipconfig /renew
Verification
Each lease binds an IP (from .11 onward) to the PC's MAC.
R1R1#show ip dhcp binding
IP address Client-ID/ Lease expiration Type
Hardware address
192.168.1.11 00D0.AF38.7A1A -- Automatic
192.168.1.12 0001.30DB.97A9 -- Automatic
The PC shows its IP, the default gateway, the DHCP server and the DNS the router gave it.
Putting excluded-address inside the pool: it doesn't exist there, it goes in global configuration.
Forgetting default-router: PCs get an IP but can't leave their network.
Practice this lab on your phone
RoutingLab has this lab with a simulated IOS terminal: abbreviations, ? help, the same error messages and objectives that check themselves. The first two labs are free.