In this post you will learn how to configure single router as DHCP server . In static routing we manually provide ip address to every device . But in dhcp server configuration One router will provide ip address to all device .
DHCP stands for Dynamic Host Configuration Protocol , that automatically provides an internet protocol(IP) and other information like subnet mask and default gateway .
- First take one router, switch and three end-devices like laptops or pcs
- Now go to connection section and select copper straight wire
- We use copper straight wire to connect
router and switches
- We use copper cross wire to connect
router and router
pc and laptop
router and pc
- Now take copper straight cable and go to first laptop and select Fast Ethernet 0 port
- And take that wire and connect to switch’s Fast Ethernet0/1 port.
- Now connect the second device with switch’s Fast Ethernet0/2 port
- Again take copper straight cable, connect switch’s Fast Ethernet 0/0 port to router’s Fast Ethernet 0/0 port
- You will find your router connection is red . Don’t worry , coding shown below will make it green .
- Run this command in router
Enter configuration commands, one per line. End with CNTL/Z.
Router(config-if)#ip address 188.8.131.52 255.0.0.0
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Connection port will be green now .
Now for dhcp configuration on that router
Router(config-if)#ip dhcp pool one
Router(dhcp-config)#network 184.108.40.206 255.0.0.0
- Now click on First laptop and go to its Desktop option
- Select Ip configuration.
- Click on DHCP in ip configuration it will request router for ip address.
- Automatically your ip address , subnet mask and default gateway will be filled .
- Now go to second laptop and click on dhcp for ip . It will ask dhcp router , ip address for this device .
- Do the same with third device .
- And If it’s showing Dhcp request unsuccessful , That means you have done something wrong in the coding . Check your coding in Router .
This is how Single router work as dhcp server .
Don’t hesitate to comment , if you got any problem .