DHCP on 3825 for Specific VLAN

Unanswered Question
Aug 5th, 2013
User Badges:

Hello all,



I am trying to configure a 3825 as a DHCP server but I only want it to hand out IP addresses to clients on a specific VLAN.  Is that possible and if so can someone send me a link?       


Thanks in advance!  Replies rated.          

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.8 (4 ratings)
Loading.
cadet alain Mon, 08/05/2013 - 08:16
User Badges:
  • Purple, 4500 points or more

Hi,

just create a scope for the specific subnet of that VLAN and also if other subnets(VLANs), don't forget to add a route for the IP address of the DHCP relay interface on that VLAN because the router will send a unicast offer  to the Relay agent which then will unicast or broadcast the offer.


Regards


Alain



Don't forget to rate helpful posts.

John Blakley Mon, 08/05/2013 - 08:18
User Badges:
  • Purple, 4500 points or more

Are the vlans on a l3 switch that you're routing for, or is this router configured as router on a stick?


If you have a l3 switch, you'd create your dhcp server on the router and then point the svi to the router to pull addresses from:


On the router:


ip dhcp excluded-address 192.168.10.1-192.168.10.99


ip dhcp pool ForVLAN10

network 192.168.10.0

default-router 192.168.10.5

dns-server 4.2.2.1


On L3 Switch:


int vlan 10

ip address 192.168.10.5 255.255.255.0

ip helper-address 192.168.1.1 <---router address



The request will match the 192.168.10.0/24 subnet.


If you have it configured on the router with subinterfaces for router-on-a-stick:


ip dhcp excluded-address 192.168.10.1-192.168.10.99


ip dhcp pool ForVLAN10

network 192.168.10.0

default-router 192.168.10.5

dns-server 4.2.2.1


int fa0/0

ip address 192.168.1.1 255.255.255.0


int fa0/0.10

encapsulation dot1q 10

ip addres 192.168.10.1 255.255.255.0


You won't have to do anything more other than add the dhcp pool at the top.....



HTH,
John

*** Please rate all useful posts ***

Scott Hanson Mon, 08/05/2013 - 10:15
User Badges:

Hello,


the switches are Layer 2.  Are you both saying I need to configured the DHCP on the router?  I can do that no problem.  How do I restrict it into only handing out IP addresses for that 1 particular VLAN?

cadet alain Mon, 08/05/2013 - 10:35
User Badges:
  • Purple, 4500 points or more

Hi,

how is your dhcp server configured and what device is this ? what is your topology ?


Regards


Alain




Don't forget to rate helpful posts.

Scott Hanson Mon, 08/05/2013 - 11:28
User Badges:

Hello,


per the problem description I would like to make a 3825 router the DHCP server.  That router is plugged into a 2960 switch that is part of a stack.  I have LWAPs hanging off trunk ports on the switches.  My goal is to make 1 particular SSID an "Internet Only" SSID so that it gets an IP address from the router instead of the internal DHCP server.  I also want to segment the traffic as "Internet Only" so that they don't touch the Internals network.

John Blakley Mon, 08/05/2013 - 12:57
User Badges:
  • Purple, 4500 points or more

Scott,


Do you currently have subinterfaces configured on the router now to support your vlans?



HTH,
John

*** Please rate all useful posts ***

Scott Hanson Mon, 08/05/2013 - 14:07
User Badges:

Hello JOhn,



I do curently have sub-interfaces.  I configured a new one for this "Internet-Only" VLAN

John Blakley Mon, 08/05/2013 - 14:11
User Badges:
  • Purple, 4500 points or more

Okay. All you need to do then is create a pool that corresponds to your subinterface that you want users to be able to get the address from like in my first post.


ip dhcp excluded-address 192.168.10.1-192.168.10.99


ip dhcp pool ForVLAN10

network 192.168.10.0

default-router 192.168.10.5

dns-server 4.2.2.1


int fa0/0

ip address 192.168.1.1 255.255.255.0


int fa0/0.10

encapsulation dot1q 10

ip addres 192.168.10.1 255.255.255.0


Your other users will land on an interface that probably has a helper configured on the interface for the other vlans minus the one that your dhcp server is actually on.


HTH,
John

*** Please rate all useful posts ***

Actions

This Discussion