You are on page 1of 2

Configuring a router as DHCP server.

Aim:
To Configuring a router as DHCP server.

Procedure:
Step 1: configure the Router
Router >enable
Step 2: enable the privilege mode
Router # config terminal
Step 3:​ c​ hange the hostname
Router(config)#hostname S1
Step 4: set the privilege mode security
R1 (config)#enable secret ​cisco​ ​(you can give any password)
Step 5: create console mode
R1 (config)#line console 0
R1(config-line)#password ​cisco​ ​(you can give any password)
R1(config-line)#login
Step 6: create telnet and ssh
R1(config)#line vty 0 15
R1(config-line)#password ​cisco​ ​(you can give any password)
R1(config-line)#transport input ssh
R1(config-line)#login local
Step 7:create domain name and username and password for ssh and telnet
R1(config)#ip domain-name ​cisco.com
R1(config)#username CISCO password cisco
Step 8:Assign IP address in router interface g0/0
R1(config)#interface g0/0
R1(config-if)ip address 192.168.1.1 255.255.255.0
Step 9:after assigning ip address to give no shutdown
R1(config-if)#no shutdown
Step 10:configure the DHCP server in Router.
R1(config)#service dhcp
R1(config)#ip dhcp pool ​cisco(you can give any name)
Step 11: after assign dhcp pool and then to give network address in dhcp server.
R1(dhcp-config)#network 192.168.1.0 255.255.255.0
Step 12:after assign the network address in dhcp server and then to give default gateway for dhcp
server.
R1(dhcp-config)#default-router 192.168.1.1
Step 13:after assign the default gateway address in dhcp server and then to assign dns-server
address and dns-server name.
R1(dhcp-config)#dns-server 192.168.1.100
​ ww.cisco.com (you can give any name)
R1(dhcp-config)#domain-name w
R1(dhcp-config)#exit
Step 14:after assign domain name and then to set limited IP address in dhcp server
R1(config)#ip dhcp excluded-address 192.168.1.4 192.168.1.7
R1#show ip dhcp binding
Step 15:after completed dhcp server configuration in router and then in your PC you select the
DHCP in IP address.
Step 16:automatically it can be generates IP address in your PC. If it’s any problem will be occurs
means in your PC cmd prompt to give this commands.
>ipconfig /renew
>ipconfig/all
Step 17:end.

Result:

You might also like