Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
DHCP Friendly Name (without static IP)
« previous
next »
Print
Pages: [
1
]
Author
Topic: DHCP Friendly Name (without static IP) (Read 2983 times)
shanelord
Newbie
Posts: 17
Karma: 0
DHCP Friendly Name (without static IP)
«
on:
August 02, 2023, 04:19:10 am »
This may have been asked before, but it would be great to have the ability to map friendly names to MAC addresses in the system for help in identifying devices.
This is a feature that is present in many if not all consumer routers, Unifi management, Firewalla etc etc
Ideally an ability to do one, some or all of the following based on MAC address:
1. Replace or provide the hostname of a device.
2. Provide a Friendly Name in the "Description" field of a device.
3. "Tag" or "Categorise" the device i.e. as a "Known" device (could be useful for alerts on new devices connecting).
I don't want to have to use static addresses to achieve this.
Thanks,
Shane.
Logged
slackadelic
Full Member
Posts: 145
Karma: 9
Re: DHCP Friendly Name (without static IP)
«
Reply #1 on:
August 02, 2023, 06:24:31 am »
You can configure dhcp reservations in unbound... I do it all the time.
Logged
shanelord
Newbie
Posts: 17
Karma: 0
Re: DHCP Friendly Name (without static IP)
«
Reply #2 on:
August 02, 2023, 08:50:06 am »
As in a static reservation (sorry if that's not what you mean)? I want the IP address to remain dynamic, but have the manually set Hostname or Friendly Name show up in DHCPv4 leases list.
Edit
:
I setup a hostname and description for a device in DHCPv4 Leases and left the IP address field blank.
Now I have two entries showing for the device in the leases list.
- One has no hostname or description but has a dynamic IP.
- The other has a hostname and description, but shows static and displays no IP address.
Ideally for this to be beneficial for my needs it would show as one combined device.
«
Last Edit: August 02, 2023, 09:06:08 am by shanelord
»
Logged
slackadelic
Full Member
Posts: 145
Karma: 9
Re: DHCP Friendly Name (without static IP)
«
Reply #3 on:
August 02, 2023, 02:54:39 pm »
Services -> DHCPv4 -> [LAN]
Scroll down to DHCP Static Mappings...
https://prnt.sc/rhlfn5yjks9o
Logged
shanelord
Newbie
Posts: 17
Karma: 0
Re: DHCP Friendly Name (without static IP)
«
Reply #4 on:
August 02, 2023, 03:07:13 pm »
Quote from: slackadelic on August 02, 2023, 02:54:39 pm
Services -> DHCPv4 -> [LAN]
Scroll down to DHCP Static Mappings...
https://prnt.sc/rhlfn5yjks9o
Thanks - but they are
static mappings
and I'd like them to be dynamic IP assignments just with friendly names.
Logged
CJ
Hero Member
Posts: 832
Karma: 30
Re: DHCP Friendly Name (without static IP)
«
Reply #5 on:
August 02, 2023, 04:31:46 pm »
Is there a particular reason you need dynamic mappings? Are you expecting a couple hundred different devices to be using the network at various times?
Logged
Have Answer, Will Blog
shanelord
Newbie
Posts: 17
Karma: 0
Re: DHCP Friendly Name (without static IP)
«
Reply #6 on:
August 02, 2023, 10:55:07 pm »
I just prefer it. If I knew how to code this I would and I’d put in a pull request. This would be an option for people to manage their own environment the way they want rather than being forced to move to static addressing. The D in DHCP is there for a reason
Logged
heypppoe
Newbie
Posts: 25
Karma: 0
Re: DHCP Friendly Name (without static IP)
«
Reply #7 on:
August 03, 2023, 04:40:52 am »
I think want you mean is replace the MAC address in the log with some host name.
would be great to tell which device is getting which address.
Logged
shanelord
Newbie
Posts: 17
Karma: 0
Re: DHCP Friendly Name (without static IP)
«
Reply #8 on:
August 03, 2023, 06:23:35 am »
See the attached images (dark background) as an example from how Unifi Networks does it. The "Friendly Name" is at the top : "myQ Bridge" which I can set to whatever I want (as per image 2).
I can leave them as dynamic (ie Fixed IP Address is disabled) and they show up everywhere in the interface with their friendly name.
Also see the attached image from Firewalla (a firewall vendor using ubuntu base) where once given a name, it is very easy to apply groups, policies, restrictions, routes etc to this specific device even without a static IP address.
This is what I'm looking for.
«
Last Edit: August 03, 2023, 06:33:09 am by shanelord
»
Logged
slackadelic
Full Member
Posts: 145
Karma: 9
Re: DHCP Friendly Name (without static IP)
«
Reply #9 on:
August 03, 2023, 06:58:50 am »
You can still do this in the area I spoke of... just don't fill out an IP address to tie the MAC to. All those products are doing are mapping mac to name via DHCP, that's it. That's all the section I showed you does. I just happen to tie static DHCP addressing to a few devices. You don't have to fill out the IP.
The 'help' hint on the IPv4 entry:
If an IPv4 address is entered, the address must be within the interface subnet.
If no IPv4 address is given, one will be dynamically allocated from the pool.
Logged
shanelord
Newbie
Posts: 17
Karma: 0
Re: DHCP Friendly Name (without static IP)
«
Reply #10 on:
August 03, 2023, 08:14:43 am »
Yes I tried this. As per above:
Now I have two entries showing for the device in the leases list.
- One has no hostname or description but has a dynamic IP.
- The other has a hostname and description, but shows static and displays no IP address.
Ideally for this to be beneficial for my needs it would show as one combined device.
Logged
abulafia
Full Member
Posts: 156
Karma: 8
Re: DHCP Friendly Name (without static IP)
«
Reply #11 on:
August 03, 2023, 10:10:01 am »
That is probably because the device got a DHCP dynamic address while being unnamed and you subsequently "named" it. It should fall into one item on next DHCP release or at least next reboot.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
DHCP Friendly Name (without static IP)