How to configure a single router as a DHCP server?

CCNA

In this tutorial, we learn that how to configure a router as a DHCP router and providing IP address on your pc by this DHCP server. After reading this article we don’t need a DHCP server to assign IP address on your computers and now we use a router to provide IP addresses on your pc by configured your router which acts as DHCP server. But it is more beneficiary in a small network instead of a large network because let if your router was damaged by any reason then your all computers will be lost their IP address and you provide IP address again on that computers. It is more difficult on a large network so I will suggest you use this configuration method on a small network only.

Also Read: How to configure  4 and more than 4 DHCP server on a single router?

router as dhcp

Now in this article, we do not assign IP to pc. A router will also provide IP on both the pc automatically because we configured the router as a DHCP server by given below codes. After this process will be completed router act same as a DHCP server and provide IP addresses on both the pc.

— System Configuration Dialog —

Continue with configuration dialog? [yes/no]: n

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#

Router(config)#hostname R1

R1(config)#

R1(config)#interface FastEthernet0/0

R1(config-if)#ip address 1.0.0.1 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R1(config-if)#exit

R1(config)#ip dhcp pool rahul

R1(dhcp-config)#network 1.0.0.0 255.0.0.0

R1(dhcp-config)#default-router 1.0.0.1

R1(dhcp-config)#exit

R1(config)#

After that now your router will be configured as a DHCP server and it able to provide IP address on both the pc.

Now after that, we will assign an IP address to pc directly through the router. To assign IP on both pc you will first go into pc and then choose a desktop option in it, and after that choose Ip configuration option in it.

After that to provide IP address we change IP configuration from static to DHCP and wait for few seconds router will give IP address on your pc. Now, do this same process on other pc and assign an IP address to that pc directly by a router. figure given below from pc0

ip configuration

Now to check given IP address is real or fake open command prompt of your pc0 and ping with second computer code and the result will be given below.

Packet Tracer PC Command Line 1.0

PC>ping 1.0.0.3

Pinging 1.0.0.3 with 32 bytes of data:

Reply from 1.0.0.3: bytes=32 time=1ms TTL=128

Reply from 1.0.0.3: bytes=32 time=0ms TTL=128

Reply from 1.0.0.3: bytes=32 time=0ms TTL=128

Reply from 1.0.0.3: bytes=32 time=0ms TTL=128

Ping statistics for 1.0.0.3:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 1ms, Average = 0ms

THAT’S IT

If you saw this type of result on your screen that’s prove that IP will be correct and both the pc will communicate each other with these IP addresses on it. If you have any type of queries and suggestions solved through a comment on a post.

Leave a Reply