DHCP on 3560 switch with multiple VLANs

Unanswered Question
Mar 24th, 2010
User Badges:

Customer has a 3560 with approximately 6 different VLANs setup.  Each with different subnets:


172.16.1.0/24

10.70.0.0/16

10.40.0.0/16

10.30.0.0/16

10.20.0.0/16

10.10.0.0/16


There are no DHCP servers in any of the existing subnets.  Everything has been statically assigned by the previous consulting firm.  We just installed a new 1131AG access point yesterday on the 10.30.0.0 subnet.  What I would like to do (if possible) is setup DHCP server on the switch and assign DHCP addresses to just the 10.30.0.0 subnet.  I could leave the existing clients static and setup a small scope for the wireless clients.


Could someone explain if this is possible, and if so how I would go about it.


Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Giuseppe Larosa Wed, 03/24/2010 - 06:00
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Sonitadmin,


here it an example of a pool configured on a cisco router


/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabella normale"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

ip dhcp pool DATA

   network 10.110.224.128 255.255.255.240

   default-router 10.110.224.129

   dns-server 10.98.112.32 10.55.0.32

   netbios-name-server 10.52.64.37 10.24.128.151

   lease 0 1

!


you can adapt this to your needs.

you need to exclude ip addresses that are statically assigned including C3560 SVI interface IP address


with commands like the following:


/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabella normale"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

ip dhcp excluded-address 10.110.224.129 10.110.224.132

ip dhcp excluded-address 10.110.224.145


Hope to help

Giuseppe

sonitadmin Wed, 03/24/2010 - 12:15
User Badges:

Giuseppe,


Thanks for the reply.  Is there anything I need to do in order to enable DHCP server on the 3560 itself?


Thanks!

Giuseppe Larosa Wed, 03/24/2010 - 12:25
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Sonitadmin,

there is no explicit ip dhcp server command.

My understanding is that after having configured the DHCP pool the system starts to act as DHCP server for the defined pools.


see

http://www.cisco.com/en/US/docs/switches/lan/catalyst3560/software/release/12.2_44_se/configuration/guide/swdhcp82.html#wp1098426


that sends to

http://www.cisco.com/en/US/docs/ios/ipaddr/configuration/guide/iad_dhcp_svr_cfg_ps6441_TSD_Products_Configuration_Guide_Chapter.html#wp1048245


Hope to help

Giuseppe

sonitadmin Wed, 03/24/2010 - 12:43
User Badges:

So tell me if this looks correct then.  I plan to set this up for VLAN4 on the switch.


switch>en
switch#conf t
switch(config)#no ip dhcp conflict logging
switch(config)#ip dhcp excluded-address 10.30.0.14 10.30.0.100
switch(config)#ip dhcp excluded-address 10.30.0.253
switch(config)#ip dhcp excluded-address 10.30.0.254
switch(config)#ip dhcp pool VLAN4
switch(dhcp-config)#network 10.30.0.0 /16
switch(dhcp-config)#domain-name (if applicable)
switch(dhcp-config#)dns-server 209.143.0.10 (or internal)
switch(dhcp-config)#default-router 10.30.0.254
switch(dhcp-config)#lease 7
switch(dhcp-config)#end

switch(config)#copy run start


Anythign I'm missing?


Thanks again for the help.

Giuseppe Larosa Wed, 03/24/2010 - 12:58
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Sonitadmin,

you should be fine with your proposed configuration


note: I would keep enabled dhcp conflict logging


Hope to help

Giuseppe

sonitadmin Wed, 03/24/2010 - 13:00
User Badges:

I was just going off of the Cisco document where it says


If you choose not to configure a DHCP database  agent, disable the recording of DHCP address conflicts on the DHCP  server. To disable DHCP address conflict logging, use the following  command in global configuration mode:


Do I need to configure a DHCP database agent?

Giuseppe Larosa Wed, 03/24/2010 - 13:24
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Sonitadmin,

unless you want to deploy DHCP snooping you don't need the DHCP database agent.


but DHCP snooping should not be an option in your scenario


Hope to help

Giuseppe

droeun141 Thu, 03/25/2010 - 05:05
User Badges:

No need to exclude the gateway - it's automatically excluded.

Actions

This Discussion