Monday, 26/6/2017 | 7:05 UTC+0
Industrial Training in Chandigarh

Cisco Router as DHCP Relay Agent

DHCP (Dynamic host configuration protocol) helps us to provide IP addresses to the client machine automatically. In this process there are only two nodes in network but if we have different scenario to get IP Addresses from Server automatically in that case how it works and how we configure our router as DHCP Relay Agent. Lets check it out…

Here you will find one scenario in which server router is not in a same broadcast domain but still is able to provide IP Addresses to client machine automatically. See the scenario given below.

 

 

 

 

 

 

Now here you can see that very first router is DHCP Server router and second router is inter-mediator between server router to client router. Now the question is that if first router is server and third one is client then how DHCP server will provide IP Addresses to client router’s network. So here is the configuration of the Relay Agent router which is second number router.

RelayAgent(config)#int f0/0
RelayAgent(config-if)#ip address 192.168.1.1 255.255.255.0
RelayAgent(config-if)#no shutdown
RelayAgent(config)#int f0/1
RelayAgent(config-if)#ip address 192.168.2.1 255.255.255.0
RelayAgent(config-if)#no shutdown

Now do configuration on Client router

DHCP_CLIENT(config)#int f0/0
DHCP_CLIENT(config-if)#no shutdown

Now do configuration on server router

DHCP_SERVER(config)#int f0/0
DHCP_SERVER(config-if)#ip address 192.168.2.2 255.255.255.0
DHCP_SERVER(config-if)#no shutdown
DHCP_SERVER(config)#ip dhcp pool NET1
DHCP_SERVER(dhcp-config)#network 192.168.1.0 255.255.255.0
DHCP_SERVER(dhcp-config)#default-router 192.168.1.1
DHCP_SERVER(dhcp-config)#exit

These all are very basic commands of every router which we made. Now the main command will come which will make relay agent link between these two routers. You have to run this command on second router which is Relay Agent router.

RelayAgent(config)#int f0/0
RelayAgent(config-if)#ip helper-address 192.168.2.2
RelayAgent(config-if)#exit

This DHCP Relay Agent command will take IP Addresses from server router and will provide them to the network where these IP Addresses are actually required.

RelayAgent#show ip int fa0/0
FastEthernet0/0 is up, line protocol is up (connected)
Internet address is 192.168.1.1/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
  Helper address is 192.168.2.2

Make sure that for this Relay Agent practical you need to do routing first. And you practical will be done on Cisco Packet tracer or at GNS3…

Save

Save

About

POST YOUR COMMENTS

Your email address will not be published. Required fields are marked *