05-09-2007 08:25 PM - edited 03-05-2019 03:58 PM
How can I configure dhcp on a 3560 switch? Can give me an example?
05-09-2007 08:40 PM
Hi Friend,
Switch(config)#service dhcp
Switch(config)#ip dhcp pool
Switch(dhcp-config)#network x.x.x.x
Switch(dhcp-config)#default-router
Switch(config)#ip dhcp excluded-address
You should exclude the address which you want but it is always recommended to exclude atleast the router address which will be assigned to the clients as a gateway address.
You can create multiple pools for different subnets and ip address range.
HTH
Ankur
*Pls rate all helpfull post
05-09-2007 09:26 PM
Hi Dall,
find the working configuration.
3560#config
3560(config)#ip dhcp pool ABCD
3560(config-dhcp)#network 192.168.1.0 3560(config-dhcp)#255.255.255.0
3560(config-dhcp)#dns-server 10.2.1.1
3560(config-dhcp)#domain-name abcd.org
3560(config-dhcp)#default-router 192.168.1.254
3560(config-dhcp)#lease infinite
3560(config-dhcp)#exit
3560(config)#ip dhcp-server 192.168.1.254
3560(config)#interface vlan 2
3560(config-if)#ip address 192.168.1.254 255.255.255.0
additionally if u wanted to exclude certain ip address which should not be assigned to client , issue the following command
3560(config)#ip adhcp excluded-address 192.168.1.100 192.168.1.110
which means between 192.168.1.100 & 192.168.1.110 the ip address will not be allocated.
i hope this helps.
rate this post if clear.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: