This is a brief guide on how to setup DHCP relay / IP Helper on a Cisco switch. In this example we will create 2 VLAN`s and then setup an IP helper address. On a switch that runs VLAN`s, if we did not setup a DHCP relay then then end client on our access switches would not receive DHCP broadcasts from out DHCP server. First we create the VLAN`s, if you already have your VLAN`s then you can skip this step.
Cisco#conf t Cisco(config)#vlan 10,20,30 Cisco(config-vlan)#
Now we need to go into each VLAN and setup and IP helper address. You MUST setup the ip helper address on any VLAN you would like to use DHCP
Cisco(config-vlan)#int vlan 10 Cisco(config-if)#ip helper-address 192.168.1.1 Cisco(config-if)#int vlan 20 Cisco(config-if)#ip helper-address 192.168.1.1 Cisco(config-if)#int vlan 30 Cisco(config-if)#ip helper-address 192.168.1.1 Cisco(config-if)#
The IP helper address is a server or device running DHCP on your network, if you have multiple DHCP servers then you can specify multiple DHCP servers, of different DHCP servers for different VLAN`s.
If you would like to check if the IP helper address is setup for a VLAN on a Cisco switch we run the following. Here we check that if VLAN 10 is running a DHCP relay.
show ip interface vlan 10
This gives the following output, as you can the IP helper is set to 192.168.1.1