IMRAN KHAN

IMRAN KHAN
IT CS

Wednesday 8 February 2017

How to Configure DHCP on Cisco Router?

How to Configure DHCP on Cisco Router?

Configure DHCP on Cisco Router. The last week we had send a topic about installation and configuration of DHCP Server in Windows Server 2012 R2. We have introduced the DHCP Server “Install and Configure DHCP Server on Windows Server 2012 R2” and told the necessary services and network protocols requirement, if you don’t know the basic of DHCP Server? you must read the article first.

Create and Configure a CCNA Lab within Cisco Packet Tracer.

Create the network diagram with tow routers and there LAN networks and then configure it with the following step by step guides. Name the routers, R1 and R2.
Configure DHCP Server Using Cisco Router - Technig
Configure DHCP on Cisco Router
Configure the Router 1 with below IP address and initial configuration. I assume you know and understand  the basic router and Switch configuration clearly. So no need to explain the functions of basic router and switch commands line.
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface serial 0/0/0
R1(config-if)#ip address 10.10.10.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#clock rate 64000
R1(config-if)#
For Router 2, configure the same interface serial 0/0/0 and fastEthernet 0/0 with the following commands.
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface serial 0/0/0
R2(config-if)#ip address 10.10.10.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.10.1 255.255.255.0
R2(config-if)#no shutdown

Configure DHCP on Cisco Router configure dhcp on cisco router Using Packet Tracer

Lets config Router 2 as DHCP Server and set the clients to get there IP addresses from DHCP Server.
In the R2 while you are in the config mode, type the command ‘ip dhcp excluded-address 192.168.10.1 192.168.10.20‘ and then press enter. This command ‘ip dhcp excluded-address’ will create an exclusive range of IP addresses which reserved for Network Servers and DHCP Server will not assign theme to clients.
The ‘ip dhcp pool‘ command create a pool for a network. You can create many pools on a router for all Local area network that connected to the router.
How to Configure DHCP on Cisco Router - Technig
How to Configure DHCP on Cisco Router – Technig
R2>enable
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.20
R2(config)#ip dhcp pool Technig_Clients
R2(dhcp-config)#
R2(dhcp-config)#network 192.168.10.0 255.255.255.0
R2(dhcp-config)#default-router 192.168.10.1
R2(dhcp-config)#dns-server 192.168.10.100
R2(dhcp-config)#
Now go to client setting and set the IP Configuration to DHCP and see the client get new IP address from DHCP Server.
Get IP From DHCP Server
Get IP From DHCP Server
So that’s it, configure DHCP on Cisco router within a minute! Simple and easy.

DHCP Options on Cisco Router

Remember some DHCP options when you need to provide IP addresses from a DCHP server to clients that are outside of your network or are not in the same Local Area Network. You must use the ‘ip helper-address‘ to forward the DHCP client requests to remote host.
DHCP Options - IP Helper-address
DHCP Options – IP Helper-address
Configure the R1 to relay the DHCP client request. It is not work without routing. So configure Routers with static or dynamic routing. Here I’m testing with RIP.
R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip helper-address 10.10.10.2
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 10.10.10.0
R1(config-router)#network 192.168.30.0
R1(config-router)#exit
Go to the client IP configuration setting and see the forwarded request by DHCP Server.
Forward DHCP client request on Cisco Router
Forward DHCP client request on Cisco Router
Hope you learn the configuration of DHCP Server on Cisco Routers and Download the CCNA Lab – DHCP Configuration on Cisco Router.

No comments:

Post a Comment