Pre-Created Practice Lab For The Practice of DHCP Server
Pre-Created Practice Lab For The Practice of DHCP Server
To configure and enable these interfaces, access the command prompt of the router,
and execute the following commands.
Router>enable
Router# configure terminal
Router(config)# interface FastEthernet 0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)#exit
Router(config)# interface FastEthernet 0/1
Router(config-if)# ip address 192.168.2.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)#exit
The following image shows the above commands on the packet tracer.
For each network that will obtain IP configuration from the DHCP server, we have to
create and configure a DHCP pool on the router. In our example, we have two networks,
so we have to create two DHCP pools, one for each network.
Use the following commands to create and configure a DHCP pool for
the Left_Network.
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip dhcp excluded-address 192.168.1.0 192.168.1.10
Router(config)#ip dhcp pool Left_Network
Router(dhcp-config)#default-router 192.168.1.1
Router(dhcp-config)#dns-server 192.168.1.2
Router(dhcp-config)#option 150 ip 192.168.1.3
Router(dhcp-config)#network 192.168.1.0 255.255.255.0
Router(dhcp-config)#exit
The following table describes the above commands.
Command Description
ip dhcp excluded-address 192.168.1.0 This command tells the DHCP server not to assign the addresses
192.168.1.10 clients.
ip dhcp pool Left_Network This command creates a DHCP pool named, Left_Network and
configuration mode.
default-router 192.168.1.1 This command assigns the default gateway to clients of this DHC
dns-server 192.168.1.2 This command sets a primary DNS server for the clients.
option 150 ip 192.168.1.3 This command provides the IP address of the TFTP server to the
network 192.168.1.0 255.255.255.0 This command specifies the range of IP addresses for the pool.
exit This command exits DHCP pool configuration mode.
Create and configure a DHCP pool for the Right_Network using the same commands
as shown below.