Oct 24 2013

Run DHCP Relay on a Cisco Catalyst 2960

Published by at 10:54 pm under Cisco




Having a DHCP relay on a layer 2 switch is usually a nonsense. I happened to get a crash on a DHCP server and had no hands on the ISP router at a remote site.
This was my only option to avoid a massive change for static IP.
Some say layer 2 devices cannot deal with DHCP but hey, this is on the Cisco catalyst 2960 feature list… I even got this to work on a LAN base image

First I create a new scope on my main site Windows DHCP server whose IP is 192.168.15.240.
 

 
Here’s how I configured my Cisco 2960: Small site, one vlan (VLAN 50), all ports in same vlan

interface Vlan50
 ip address 192.168.50.11 255.255.255.0
 no ip route-cache
!
ip default-gateway 192.168.50.254

service dhcp

ip dhcp pool My_Dhcp_Pool
   relay source 192.168.50.0 255.255.255.0
   relay destination 192.168.15.240
!

 
Make sure you have the connectivity to the DHCP server

my_switch#ping 192.168.15.240

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.15.240, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 33/42/59 ms

 
The switch vlan interface must be configured with an appropriate IP address and netmask, and it must be activated using the no shutdown command
Since the switch has only one interface, it can provide IPs on a single range. I don’t think a DHCP request received on a port assigned to a different vlan would get a response, haven’t tested it though
 
Disable the DHCP relay if you need it no more

no service dhcp

No responses yet

Trackback URI | Comments RSS

Leave a Reply