Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to handout IP ranges per switch with the use of one DHCP server?

Example, i have 2 Swicthes (A & B). I like to:

switch a => -
switch b => -

My problem is i have a few switches that are hooked up with a 'test bench'. On each bench they connect a dozen of systems. Then they load software on each system. The loaded software sends some data to a server, and the server needs to know form which bench that data came.

By having fixed ip ranges per switch, i could determine it. An other option would be to know which port each system was connected to (based on MAC??)?

share|improve this question
You're life will be easier and happier if you learn to use the switches management functions to show IP->MAC tables, and MAC->Port assignments. – Chris S Jan 23 '13 at 14:55

Switches are L2 devices, as such they don't even know about IP (a L3 protocol), or do you mean a switch-router? Either way DHCP is a one-device-per-request protocol, have you thought about using DHCP device reservations to get what you need?

share|improve this answer
You mean reserve ip based on MAC? Yes, but that can't work. Since all devices are new (and therefor new MAC addresses). – Rogier Jan 23 '13 at 14:53

As Chopper has pointed out, you couldn't do this as you are setup right now. DHCP is a first come first server protocol and the switches couldn't inspect the traffic to filter it as you desire. However, if you separate out the switches into different VLANS/ Subnets, you could utilize the single DHCP server with multiple scopes (one for each bench) and dhcp helper addresses setup in the switch. For this, you would need some sort of routing between the VLANs, which could be something as simple as a Layer 3 switch with an IP on each VLAN interface.

You would then be able to determine which bench the traffic came from, based on it's IP/ subnet.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.