The pfSense Store

Author Topic: how make static all dhcp clients?  (Read 234 times)

0 Members and 1 Guest are viewing this topic.

Offline reza.mnp

  • Newbie
  • *
  • Posts: 20
  • Karma: +1/-0
    • View Profile
how make static all dhcp clients?
« on: January 13, 2018, 12:50:05 am »
Hi
How i can make static all clients at dhcp lease(2k client).
like script.

Offline JKnott

  • Hero Member
  • *****
  • Posts: 1091
  • Karma: +43/-8
    • View Profile
Re: how make static all dhcp clients?
« Reply #1 on: January 13, 2018, 06:11:07 am »
I think you mean you want a device to always get the same IP address.  If so, you'd configure static mappings on the DHCP server page.

Offline reza.mnp

  • Newbie
  • *
  • Posts: 20
  • Karma: +1/-0
    • View Profile
Re: how make static all dhcp clients?
« Reply #2 on: January 13, 2018, 08:00:34 am »
Thank a lot.
How manually static mapping 2k client?

Offline Gertjan

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +174/-9
    • View Profile
Re: how make static all dhcp clients?
« Reply #3 on: January 13, 2018, 12:30:50 pm »
What do you mean by a "2k" client ?

Offline Grimson

  • Full Member
  • ***
  • Posts: 260
  • Karma: +36/-2
    • View Profile
Re: how make static all dhcp clients?
« Reply #4 on: January 13, 2018, 01:44:32 pm »
What do you mean by a "2k" client ?

I guess he wants to add static leases for 2k (2000) clients, that will be quite some work.

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9601
  • Karma: +1090/-309
    • View Profile
Re: how make static all dhcp clients?
« Reply #5 on: January 13, 2018, 04:28:33 pm »
pfSense might not be the right DHCP server for your use case.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14821
  • Karma: +1375/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: how make static all dhcp clients?
« Reply #6 on: January 13, 2018, 05:19:36 pm »
For starters your going to have 2,000 devices on the same network?  Or you have 2,000 some devices across a few networks and you want them all to have reservations for their IP?

So you have a list of their mac and the IPs you want them to have in a csv file already?  With Derelict pfsense dhcp prob not the best idea if you have that many clients you want to manage with dhcp reservations..

https://blogs.technet.microsoft.com/teamdhcp/2012/11/20/bulk-load-dhcp-reservations-using-dhcp-powershell/

Simple how to do it with powershell and windows dhcp server..

But if you really want to do feed it into pfsense - set a few of them up by hand in pfsense.. Then export the xml file dhcp and put in all your info via what your seeing in the

Code: [Select]
<staticmap></staticmap>

Sections for all your other 2,000 clients and then load that xml back in...

- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline reza.mnp

  • Newbie
  • *
  • Posts: 20
  • Karma: +1/-0
    • View Profile
Re: how make static all dhcp clients?
« Reply #7 on: January 13, 2018, 10:32:29 pm »
I have 2000 client in several VLANs.

Offline JKnott

  • Hero Member
  • *****
  • Posts: 1091
  • Karma: +43/-8
    • View Profile
Re: how make static all dhcp clients?
« Reply #8 on: January 14, 2018, 06:02:28 am »
Regardless of there they are, you will have to configure each and every one for MAC address and IP address.  Since you have multiple networks, you'll have to do it for each network.  What happens if you move a device from one network to another?  If you want it to have a mapped address there, then you'll need another entry for that MAC, but I have no idea how the DHCP server will handle having the same MAC on different networks.
« Last Edit: January 14, 2018, 11:42:26 am by JKnott »

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9601
  • Karma: +1090/-309
    • View Profile
Re: how make static all dhcp clients?
« Reply #9 on: January 14, 2018, 11:05:36 am »
I would want something directory- or database-backed for something like that.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM