Most devices have multiple MACs i.e. wired and wifi. How do I create static mappings for the _same_ hostname, but a different MAC address. It appears that's currently not possible. Could somebody please explain?
Thanks
good question!
What i had to do in this circumstance for example is to name a laptop as laptop-wireless and laptop-ethernet for the static dhcp leases.
I use static on OPNsense and dhcp at the device for all my lan systems. only guests or temporary systems get dhcp leases.
Not a good solution but workable for the moment.
I'm curious to know what others are doing on this dilemma.
Greg
Quote from: GDixon on November 19, 2018, 09:21:33 PM
good question!
What i had to do in this circumstance for example is to name a laptop as laptop-wireless and laptop-ethernet for the static dhcp leases.
I've considered this. Ok, let's say the hostname of the device is 'laptop'. When you create static DHCP mappings for the _same_devices and specify one mapping as hostname 'laptop-wireless' and hostname 'laptop-ethernet', then but what hostname will the device be known on the network? By 'laptop' (the true hostname of the device) or by 'laptop-ethernet' vs. 'laptop-wireless'? By what hostname would you ssh / ping the device? If the hostname in the static mapping is inconsequential than why the need to specify one? Mmmm... There has to be a better solution I would hope. :o
Thanks, man
I use static assignments so that i can ping ssh or whatever (even to a nas) by ip and not name. For me remembering a name is harder than remembering the ip .
But another good question and I'm curious to know myself if the laptop host name (as laptop on the laptop) will be overridden by the host name on OPNsense.
Looks like something to learn since i hit dead ends trying to get IPv6 working for now.
ok, I added several names to my /etc/hosts with different names and the same ip for the different names.
to be clear the host file i used is on the machine i use to access all others and NOT on the OPNsense box!
what happens is you can use any of the names and they all resolve to that ip.
I use tumbleweed/ linux and have not tried it in windows yet. Have to install a windows 7 and windows 10 VMs but have been too lazy to do so for months now :)
greg
:EDIT nothing bad or funny happens that i can find
Quote from: GDixon on November 20, 2018, 01:38:36 AM
ok, I added several names to my /etc/hosts with different names and the same ip for the different names.
to be clear the host file i used is on the machine i use to access all others and NOT on the OPNsense box!
Well Ok, I would expect that to work; but I don't want to touch every hosts file on all of my clients. This should be handled by DHCP.
Thanks for you help. I hope a developer might have some insight. :P
Cheers
I've found that you can create a static DHCP mapping without specifying a hostname. Not sure how that effect that would have?