Netgate SG-1000 microFirewall

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

0 Members and 1 Guest are viewing this topic.

Offline reza.mnp

  • Newbie
  • *
  • Posts: 23
  • 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: 1375
  • Karma: +60/-13
    • 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.
This page unintentionally left blank.

Offline reza.mnp

  • Newbie
  • *
  • Posts: 23
  • 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: 2587
  • Karma: +208/-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

  • Sr. Member
  • ****
  • Posts: 430
  • Karma: +63/-7
    • 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: 10260
  • Karma: +1177/-313
    • 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: 15753
  • Karma: +1472/-210
  • 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.3-RELEASE (work)
1x SG-3100 2.4.3-RELEASE (work)
1x SG-4860 2.4.3-RELEASE (home)

Offline reza.mnp

  • Newbie
  • *
  • Posts: 23
  • 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: 1375
  • Karma: +60/-13
    • 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 »
This page unintentionally left blank.

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10260
  • Karma: +1177/-313
    • 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

Offline curtisgrice

  • Jr. Member
  • **
  • Posts: 84
  • Karma: +5/-1
    • View Profile
Re: how make static all dhcp clients?
« Reply #10 on: February 11, 2018, 08:45:16 am »
I'm with Derelict on this. While I would love to seem better/more options for managing DHCP in pfSense, if your managing 2000+ clients, you should be running redundant DHCP servers dedicated for the task.

You would need to setup your DHCP servers and configure the DHCP Relay/helper on your pfSense router/switch gear. On that note, I did just check and I see you cant configure the pfSense DHCP Relay agent when DHCP is enabled on ANY interface... Odd. So if you wanted to use pfSense DHCP anywhere, you would need to configure the DHCP relay/helper on the switches.
Slow code? Sounds like a good reason to buy more hardware!