0

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 => 192.168.1.50 - 192.168.1.75
switch b => 192.168.1.76 - 192.168.1.100

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??)?

Roger
  • 800
  • 1
  • 6
  • 17
  • 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

2 Answers2

1

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?

Chopper3
  • 101,299
  • 9
  • 108
  • 239
  • You mean reserve ip based on MAC? Yes, but that can't work. Since all devices are new (and therefor new MAC addresses). – Roger Jan 23 '13 at 14:53
1

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.

HostBits
  • 11,796
  • 1
  • 25
  • 39