Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

DHCP Switching

How can I configure dhcp on a 3560 switch? Can give me an example?

2 REPLIES
Cisco Employee

Re: DHCP Switching

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

Re: DHCP Switching

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.

140
Views
0
Helpful
2
Replies
CreatePlease to create content