08-05-2013 08:07 AM - edited 03-07-2019 02:45 PM
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.
08-05-2013 08:16 AM
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.
08-05-2013 08:18 AM
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 ***
08-05-2013 10:15 AM
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?
08-05-2013 10:35 AM
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.
08-05-2013 11:28 AM
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.
08-05-2013 12:57 PM
Scott,
Do you currently have subinterfaces configured on the router now to support your vlans?
HTH,
John
*** Please rate all useful posts ***
08-05-2013 02:07 PM
Hello JOhn,
I do curently have sub-interfaces. I configured a new one for this "Internet-Only" VLAN
08-05-2013 02:11 PM
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 ***
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide