1748185 Members
4178 Online
108759 Solutions
New Discussion

Re: VLANS/DHCP

 
SOLVED
Go to solution
colly72
Occasional Advisor

VLANS/DHCP

Im starting out with VLANS, so forgive my naivety.  Ive got an old HP 6108 Procurve L3 switch, that Im using to try setting up VLANS, with a DHCP server providing IP addresses for each VLAN.  The config I've setup on the switch is as follows:

 

Running configuration:

; J4902A Configuration Editor; Created on release #H.07.99

hostname "HP ProCurve Switch 6108"
snmp-server contact "***"
cdp run
ip default-gateway 192.168.1.1
ip routing
snmp-server community "public" Unrestricted
vlan 1
name "DEFAULT_VLAN"
untagged 1,4-8
ip address 192.168.1.2 255.255.255.0
ip helper-address 192.168.1.1
no untagged 2-3
exit
vlan 100
name "VLAN 100"
untagged 2
ip address 192.168.2.1 255.255.255.0
ip helper-address 192.168.1.1
exit
vlan 200
name "VLAN 200"
untagged 3
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.1.1
exit

I've got a Windows 2008 R2 DHCP server currently on port 1 (VLAN 1) of the switch, configured with 3 scopes for the different VLANS but when I connect a PC to port 2 on the switch, it won't obtain an IP address from the DHCP server.

Can anyone tell me where I'm going wrong?

Thanks in advance.

3 REPLIES 3
EricAtHP
Esteemed Contributor
Solution

Re: VLANS/DHCP

Your switch config looks good. You don't need the IP helper command on VLAN 1 since your DHCP server is already in that subnet but it shouldn't hurt either.

I suspect that the issue is that the DHCP server doesn't know how to get back to VLANs 2 & 3. Your DHCP server needs a route back to those VLANs. This can be done either by setting the default gateway on the DHCP server to the switch address in VLAN 1, 192.168.1.2 or by configuring static routes on the DHCP server. 

To add a static route in Windows, open a command prompt window as an Administrator. Then issue this command:

route -p add 192.168.2.0 mask 255.255.255.0 192.168.1.2

route -p add 192.168.3.0 mask 255.255.255.0 192.168.1.2

If that doesn't work, can you share the config of your DHCP server and its IPconfig.

Vince-Whirlwind
Honored Contributor

Re: VLANS/DHCP

Also double-check your scope option 03 - if the router option doesn't match the interface that's relaying the DHCP request, the DHCP server won't know which scope it's for.

 

colly72
Occasional Advisor

Re: VLANS/DHCP

I'd added the default gateway on the dhcp server but this didnt seem to make a difference but when I added the static routes, it all suddenly started to work!

Not sure why that would be but thanks for your advice!