Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHCP Problems on a VLAN with multiple IP Addresses

Status
Not open for further replies.

tbbay

Technical User
Apr 21, 2008
3
US
I have several VLANS on a ProCurve Switch 6200yl-24G that I'm trying to configure for a new network, and each VLAN need 4 ip addresses in them, but only ONE ip address is to be used for DHCP, the rest are static.

Here's an example of my config.

vlan 21
name "Bldg2"
untagged 1
ip helper-address 150.160.153.89
ip address 10.220.11.1 255.255.255.128
ip address 10.220.1.33 255.255.255.224
ip address 10.220.20.33 255.255.255.224
ip address 10.220.2.18 255.255.255.240
tagged 24
exit

When I plug a switch into the port assigned to vlan 21, and then try and pull dhcp, my switch contacts my dhcp server and tries to request an ip address on the 10.220.1.x range, but I would like it to only request it on the 10.220.11.x range (all other ranges are for static devices).

I've programmed other switch's such as Enterasys, and when I specified additonal "ip address" ranges, I would put the "secondary" command after each, so only the first "ip address" would be used for my dhcp range from my dhcp server.

Is there any way to specify on the VLAN which ip address range should be used for dhcp? It seems to be trying all of my ranges in numeric order.

What I would ultimately like is for the vlan to only request DHCP on my 10.141.11.x ip address range, and ignore the others as far as dhcp is concerned.

Any help or suggestions would be greatly appreciated.

Thanks,

Ted Walker
 
Are you purposely assigning 4 different IP addresses to the same VLAN interface?
 
I think you'll need to do a route add on the DHCP server to the different networks.

so let say;
route add xxx.xxx.xxx.0 mask 255.255.255.0 yyy.yyy.yyy.yyy -p

the -p is used with the ADD command, makes a route persistent across boots of the system.


Greetzzz...Bas


y1pzZTEUdok1vrI5cLb3FdPX4PgTPlSONkb5WPjz0x50etSujaMSmhdRCbOx9vASnrRNzzXv0IxNQA

___________________________________________
It works! Now if only I could remember what I did...
___________________________________________
 
Yes,

We break down our network into building locations by seperate vlans, then within the vlan we seperate equipment with different ip address ranges:

ip address 10.220.11.1 255.255.255.128 (range we would like to have DHCP on)
ip address 10.220.1.33 255.255.255.224 (Static range reserved for static network printers)
ip address 10.220.20.33 255.255.255.224 (Static range reserved for other static equipment)
ip address 10.220.2.18 255.255.255.240 (Static range reserved for HP switch IP addresses)

With other equipment, like DELL switch's , we've been able to add multiple IP ADDRESSES as SECONDARY ip addresses, and this would allow the DHCP Helper to only refer to the primary IP address for DHCP range.

The HP doesn't let me set a secondary IP address, and when I add a helper, the HP Switch makes a call to my DHCP server with an IP address based on the lowest number (which happens to be my 10.220.1.x range)

I would like to force my DHCP helper to only associate and help with the ip range of 10.220.11.x

... im starting to get the feeling that our vlan's complexity is to great for the HP Switchs....
 
Digging through the manual, it appears that HP uses a 'Primary' tag on the VLANs to specify which VLAN the helper services.
The switch reads DHCP responses on the Primary VLAN instead of on the default VLAN. (This includes such DHCP-resolved parameters as the TimeP server address, Default TTL, and IP addressing—including the Gateway IP address—when the switch configuration specifies DHCP as the source for these values.)
Try setting your .11 VLAN as the primary and see if that solves the problem. Sounds like the .1 VLAN is currently primary.

hth.

--
The stagehand's axiom: "Never lift what you can drag, never drag what you can roll, never roll what you can leave.
 
Hey Lawnboy,

Thanks for the advice, but I don’t think it will work in my situation.

All four IP ADDRESS ranges are in the same VLAN, not in individual VLANS. We have 6 separate VLANS throughout our school campus (VLAN 20 - 26), one for each building, and in each vlan is FOUR IP ADDRESS RANGES.

I broke down and contacted HP, and their answer was to put each IP ADDRESS range in it's own vlan, which would take me from 7 VLANS to 28 VLANS (More than I care to manage).

I've finally decided that it's impossible to resolve this issue easily with my current IP scheme, so I've decided to renumber my IP scheme for each VLAN to make the DHCP range the lowest IP address range for each VLAN. This has completely resolved my problem, since the HP Procurve VLAN's want to use the ip helper-address with the lowest numeric range of IP ADDRESSES in your VLAN's ip scheme.

For each of the VLANS, I've decided to make my DHCP Range in the single digits: (i.e. - 10.220.x.0) and my additional STATIC ranges (on the same VLAN) double digits (i.e. - 10.220.xx.0)

Here's a sample of my VLAN Config for my HP Procurve:

vlan 20
name "Building-1"
untagged 1
ip helper-address 150.160.153.89
ip address 10.220.1.1 255.255.255.128
ip address 10.220.40.1 255.255.255.224
ip address 10.220.50.1 255.255.255.224
ip address 10.220.60.1 255.255.255.240
tagged 24
exit

With this config, any DHCP request made over this VLAN to my DHCP server use the 10.220.1.1 range to make the request....


...I guess if you can't make the system do what you want, you have to just surrender to the systems rules to accomplish your goal.


Thanks for everyones help! It was greatly appreciated.


Ted Walker
 
That's what I was kind of thinking when I asked the question about all the secondary addresses on the same vlan interface. The "ip helper-address" forwards DHCP across different interfaces and since the addresses in your scenario were on the same interface, I didn't think you would get far.
 
Personal view here -

I prefer to steer clear of ip helper - don't forget they forward quite a bit of UDP (on some switched a LOT of UDP) traffic to the helpers which can be a security and DOS risk. It also means having to diagnose routers and helpers which often means server and network teams need to co-operate.

Using proper DHCP relay is better if the devices support it but I prefer using a HDCP server which is configured on a VLAN trunk so it has a virtual NIC in each VLAN. That way DHCP is completely independant of helpers and easier to diagnose. The only drawbacks are the setup of the NIC in the DHCP is a bit more complicated (DHCP is just the same) and the risk of the DHCP server being sat physically in each VLAN.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top