Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
Static DHCP
« previous
next »
Print
Pages: [
1
]
Author
Topic: Static DHCP (Read 8171 times)
jmcgee
Jr. Member
Posts: 50
Karma: 1
Static DHCP
«
on:
November 16, 2020, 10:55:42 pm »
I recently installed Opnsense on a Qotom machine. It installed fine and is working. I want to assign MAC addresses of devices to static DHCP. I have google, read docs, searched forum Where do I do this;
I am running:
OPNsense 20.7.4-amd64
FreeBSD 12.1-RELEASE-p10-HBSD
OpenSSL 1.1.1h 22 Sep 2020
It's a fairly standard install, 1 WAN port, 2 LAN ports, no vlan.
«
Last Edit: November 16, 2020, 11:48:38 pm by jmcgee
»
Logged
muchacha_grande
Full Member
Posts: 219
Karma: 19
Re: Static DHCP
«
Reply #1 on:
November 17, 2020, 12:39:29 am »
Hi, you will find this on Services > DHCPv4 or 6 > [INTERFACE NAME]
You have to turn on DHCP service and fill the automatic address assignment range.
Then, at the bottom, you'll find a list to add MAC-IP mappings.
Logged
jmcgee
Jr. Member
Posts: 50
Karma: 1
Re: Static DHCP
«
Reply #2 on:
November 17, 2020, 01:56:44 am »
Perfect. Found it. Question.
I assumed DHCP static mapping would map MAC addresses to IP number within the DHCP range.
I have told DHCP to use range 192.168.1.5 to 192.168.1.100.
If I try to use address 192.168.1.16 it says
The following input errors were detected:
The IP address must not be within the DHCP range for this interface.
I can give it 192.168.1.108 and it works.
Logged
TomK
Newbie
Posts: 7
Karma: 0
Re: Static DHCP
«
Reply #3 on:
November 17, 2020, 02:23:57 am »
Your static mappings need to be outside of the range chosen for auto mapping.
Logged
Ricardo
Full Member
Posts: 233
Karma: 12
Re: Static DHCP
«
Reply #4 on:
November 17, 2020, 05:04:46 pm »
Quote from: TomK on November 17, 2020, 02:23:57 am
Your static mappings need to be outside of the range chosen for auto mapping.
Yeah, I would say there are at least 2 approaches:
1 is that I got used to in the past 10+ years is that you have a DHCP range. If you want, you can enable some DHCP clients to be "reserved". What that means, you make the IP address assignment bound to the MAC address. Now thats what opnsense NOT does.
The other option, what Opnsense does, that you create a generic DHCP range, anything that gets served from that range will be dynamic. If you want a DHCP client to be static, you have to create a MAC address-IP address mapping outside of that range.
Logged
Gauss23
Hero Member
Posts: 766
Karma: 39
Re: Static DHCP
«
Reply #5 on:
November 17, 2020, 05:45:19 pm »
I have an open PR:
https://github.com/opnsense/core/pull/4447
This limitation is from the past. It's not needed anymore. I hope in one of the next releases my PR will be merged.
Logged
„The S in IoT stands for Security!“
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
Static DHCP