2

I want to setup my work's network so that all wireless clients get assigned a certain IP range but are on the same subnet as the other network devices. Currently I'm running dnsmasq for DHCP and DNS on a server that is NOT the wireless AP, but is in fact two switches away.

So let's say the entire network is on 10.0.0.0/16 but I wan't to assign the wireless clients the 10.0.10.10 - 10.0.10.200 specifically.

What's the best way to accomplish this? VLANs all the way to the dnsmasq server, then routing between the same subnet? Buy a more featureful wireless bridge with more dhcp options?

Thanks.

Cyclone
  • 557
  • 4
  • 15
  • Why can't you use a different subnet for wireless? – Shane Madden Jul 29 '12 at 19:36
  • 2
    You are making so much trouble for yourself this way. I'd strongly suggest changing the design. You'll need to bridge to the wireless clients anyway, so why use two different VLANs just to have to bridge them? – David Schwartz Jul 29 '12 at 20:20
  • @DavidSchwartz this is partly for educational purposes, but what design change would you suggest? if I don't use VLANs then what other option do I have for getting the dhcp server to recognize requests as coming from different clients? – Cyclone Jul 29 '12 at 20:37
  • @ShaneMadden Would it work for me to have the overall network as a 10.0.0.0/16 subnet, but put the wireless clients on a sub-subnet like 10.0.1.0/24? then I would just setup two virtual interfaces on the dnsmasq server, too listen for dhcp broadcasts on each? – Cyclone Jul 29 '12 at 20:41
  • 1
    @Obtuse: Either use distinct subnets and route between them or don't bother giving wireless clients special IP addresses. – David Schwartz Jul 29 '12 at 20:41
  • @Obtuse No, it would not work to do that, for the same reason that splitting the subnet into multiple vlans would not work. Nodes should always be in the same broadcast domain as everything else in the subnet. – Shane Madden Jul 29 '12 at 20:42
  • I'm inclined to agree with the advice already given, but what is the problem you think you'll be solving by doing this? – Rob Moir Jul 29 '12 at 21:29
  • @DJPon3 I have a DHCP/DNS server running on a specific server. The wireless AP is connected with two switches between it and the DHCP server. I would like to assign the wireless clients a specific IP range. I would like to avoid having to do so via different subnets or routing. That would introduce single fail points (whatever device is doing the routing), and probably will break auto-discovery stuff that works by broadcasting? – Cyclone Jul 29 '12 at 22:22
  • possible duplicate of [Can I have multiple DHCP servers on one network?](http://serverfault.com/questions/368512/can-i-have-multiple-dhcp-servers-on-one-network) - top answer covers exactly this as well as other scenarios. – dunxd Jul 30 '12 at 16:18

1 Answers1

3

My suggestion - turn your question around and ask how it is that your DHCP server can differentiate a request from a wireless vs a wired client? Your server needs some kind of cue to do its job correctly.

The usual (and easiest) mechanism is to set the DHCP server to allocate addresses based on where the request was either sourced- or sent (i.e. the separate subnet you don't want to use). In some cases if there's an active DHCP relay then something like a subscriber-id field can be included in the request. You can always set up static reservations for all of your wireless clients (yuck) or you might be able to key off of a common set of vendor prefixes in the MAC address.

The bottom line, however, is that these are all hacks (at best) and that the right answer is to deploy your DHCP based on best practice (...which is using different subnets).

rnxrx
  • 8,103
  • 3
  • 20
  • 30
  • ok, do I still have the downside that the dhcp server then has to also do all the routing between the subnets? or if the wireless clients are on a sub-subnet will everything just work based on the different broadcast addresses? – Cyclone Jul 29 '12 at 20:43
  • Actually, the idea of having the AP include an extra id in the request is, IMO, the least hacky of all the options. Unfortunately my current wireless AP does not offer such an option. – Cyclone Jul 29 '12 at 20:45
  • If I use different subnets, will zero-conf stuff still work? IE will broadcast packets get forwarded as well by default, or will that require yet more configuration? – Cyclone Jul 29 '12 at 22:24