How can I share MAC&Hostname list among routers?

I have 4 OpenWRT routers and I have a list of MAC&Hostname.
Routers have different IP subnets.
For now I'm using Network -> DHCP and DNS -> Static leases
But keeping Static leases list updated in all routers is cumbersome.
I need DHCP server to extend Static leases list from external source. Is there an easy way to do that?

If the routers are on different subnets, then what benefit does duplicating the static leases on all of them offer you? What is the real problem you're trying to solve, for which you see static leases as the answer?

Do you want, for example, for Device X to pick up consistent (but different) IP addresses depending on which router it connects to?

My clients don't have assigned IP addresses. I just want to manage the list easily across all routers. Adding/removing/updating a client on each router one by one is not practical.

Then what are you using the static leases function for? Assigning IP addresses is the purpose of the static leases feature,

Why do you think 'static leases' sole purpose is assigning IP address?

Again, what is the real problem you are trying to solve, for which you think making use of the static leases function in that manner is the solution? What benefit does recording every device's name and MAC address on every router confer?


I think my question was quite clear in the first message. If you don't understand what I am saying, please don't bother

We understand what you're saying. We just don't understand why you're using static leases to do something which it isn't really meant for. And if you want people to take the time and effort to assist you then it helps to be a little humble and answer questions.


Hostnames, I need hostnames. Hostnames make it easy to recognize a device on the network.

1 Like

Indeed, hostnames do make it easier to work with devices on a network. And there's a feature called "DNS" which performs this very function.

OpenWRT ships with a built-in combined DNS and DHCP server called dnsmasq which both issues IP addresses and records the resulting IP address and hostname assignments in its internal DNS database.

No additional configuration is required for this basic functionality; it works out of the box. Static leases are not required for this aspect of its operation.

I do understand what you're saying, but I suspect that you might not.

From the nature of your questions and responses, it appears that you might be enjoying what's called the "XY Problem", where you are focused on the step rather than the goal. See here for more information which may help you get to the best solution for your needs:

You missed this part:

I understand that the OP used the Static Leases to make a list - but this is a common inquiry nonetheless.

1 Like

Thanks. So far I tried rsyncing to DHCP server's /etc/ethers from a samba share. It works but I feel like I'm shooting a fly with bazooka. Should be there an easy way... Or there isn't?

Ah. You're correct. I did miss that part.

In which case I can see some possible approaches which might suit the OP's needs:

  • Run a separate DHCP and/or DNS server centrally, for which every router acts as a relay
  • Nominate one router as the "master" DHCP and/or DNS server, and point the other routers at it
  • Continue with the current approach, but treat one router as the "master" and use a script to copy the relevant file(s) on a schedule to the other routers.
1 Like

That woulda been fair to note at first.

  • Are you successfully hitting the fly each time? :smiley:
  • To be serious - though, the threads link use built-in functionality of scp - as I'm not sure if you're only installing samba for this - TBH I'm confused as to how one would easilly configure that on the remote end

thanks for the heading Associated stations - making hostnames visible across multiple APs
This one looks the same thing but with a lot less requirements :+1:

1 Like

Yep - it seems you responded as I posted - and already begun to review the relevant thread. :+1:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.