0

I'm building networks with 256 devices that can't be pre configured (they all must start from the same configuration, it's not possible to give them static ip beforehand). Is there anyway from a managed switch or router (and if so what router type do i need to buy) to say something akin to "use DHCP, but once a device got an address once through DHCP, use that as a static ip for it's mac address every time it requests from dhpc again"?

Edit : it seems DHCP permanent allocation would work for my need, are all mid range routers (1/10GBs Netgear) expected to support this or do i need to look for it specifically?

  • What is the problem you are trying to solve such ha you think you need static addresses ? You should also read up on DHCP, you may find that once you understand how it works you don't need this http://www.tcpipguide.com/free/t_DHCPOverviewMotivationHistoryandStandards.htm – user9517 Oct 04 '14 at 06:35
  • I want static ip addresses as i they will be my pivot point to uniquely reference each device later (with nothing else than the IP difering between each, and no possibility of setting it up pre install). I know very well how DHCP works – Ronan Thibaudau Oct 04 '14 at 06:47
  • A static IP address can only be assigned to an adapter on the host. If it's assigned in any other way outside of the host, it's not static. You can use DHCP reservations or set leases to never expire. – Wesley Oct 04 '14 at 06:58
  • You're correct i'm misswording, permanent DHCP allocation would work too i guess. – Ronan Thibaudau Oct 04 '14 at 06:59
  • Regarding your edit ("*do i need to look for [that feature] specifically*"): Yes, you should verify whatever you're going to purchase has the feature you desire. – Gene Oct 04 '14 at 07:07
  • DHCP reservations are so basic, even my home routers can do it. – Michael Hampton Oct 05 '14 at 13:53
  • @MichaelHampton My home router allows reservations too (i can go in there and say "keep using this ip for this device) but that's not my need, i need permanent allocations (i don't want to add a reservation myself on a per device basis, it's not feasible with a few thouthand devices/year) – Ronan Thibaudau Oct 05 '14 at 14:13

1 Answers1

2

If your DHCP server (which in some cases is the router) supports static assignments via DHCP you can assign an IP address to a specific MAC Address. There are many ways you can get the MAC address:

  • Retrieve it from the DHCP server log
  • Ping the IP address it was assigned and check your arp table for the corresponding MAC address (e.g. run arp -a during or immediately after the ping)
  • If the device is remotely manageable you can probably pull it directly off of it
  • There might be a label on the device with the MAC address.

As for setting up static DHCP leases, it varies greatly between different products/servers/routers. If you need help determining if your DHCP server supports static leases you'll need to provide more information about it, specifically the name, make, and/or model.

Gene
  • 3,633
  • 19
  • 39
  • I'm looking for a 0 manual work solution, i know i can assign static ip addresses to devices who got a DHCP provided lease already, but what i want to be able to do is to say "dear router, everytime someone gets attributed a DHCP address, remove that address from the dhpc pool and assign it permanently to this device so that if it were to reboot it would get assigned this address" – Ronan Thibaudau Oct 04 '14 at 06:48
  • We don't have a make/model set in stone yet, i'm asking to make sure that, if this is possible, i purchase something viable – Ronan Thibaudau Oct 04 '14 at 06:49
  • You can easily do that by setting DHCP lease expiration to a ridiculously high number, or to never expire at all. – Gene Oct 04 '14 at 07:00