How many dhcp server networks can I have?

Hello friends,

I´m trying to use several vlans, and everything in the vlan side is working ok, the only problem that i am having is that the dhcp is not serving for all networks.
So if i configure a fixed ip, I can navigate.
But if I wait for dhcp lease, it does not work.

How many dhcp servers can i have?

Usually there is only 1 DHCP Server active. This server needs either an interface in every vlan, or you have a dhcp relay in every vlan and they send/relay the request to the server.
In larger networks you would have multiple DHCP server but only one of them is active. They then need a common database to use for the issued/assigned addresses...

This should work, but let’s review your configs to understand the root cause.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

At least in main code dnsmasq now have support for multi instances.

It works, but it seems that Luci have a bit of catching up to do so leases etc aren’t really shown as expected (or at all) in luci

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

So I'm counting 12 diferent dhcp networks on the same server.

What triggers my attention in dnsmaq is that there are some list interface that already have been deleted, and it is missing the new interface that has already been created

those does not exist anymore,

and there is that is not on this list.
I´m doing everything on luci...

Humm.. now it seems obvious..
The dnsmasq is not bound to every interface.
But that would no be done automatically?
Bc i create a interface in interfaces, also setup dhcp server.
Somehow it is not deleting nor adding interfaces to this list

I would recommend removing all of these:

If left unspecified, dnsmasq will listen on and serve to all interfaces (except for those set with ignore, of course).

That said, if that doesn't fix the issue, you may have problems with your ethernet/bridge assignments. Typically, only a single bridge is recommended for DSA, and bridge-VLANs are used to setup the correct port assignments.

You must have a bridge if any of the networks will be assigned to more than one physical interfaces (i.e. ethernet + wifi, 2 or more wifi radios, multiple ethernet ports). So for example, the following networks can only be accessed on their respective ethernet ports. Wifi will not work unless there is a bridge.

So with that in mind, I see only three networks associated with bridges -- VLAN 1 (lan) and VLAN 10 (lan_leo) and VLAN 99 (lan_visit).

Do any of your other networks require wifi?

Thanks @psherman You are like an oracle that appears with the solution at the most opportune moments.

This is a x86 machine without wifi, this is just the gateway in the border, there are several Access Points over the network to end up in this x86 (proxmox with opewnrt as router internally, with wan connected directly to x86 ports connected to openwrt.

For now there are a few vlan´s bc proxmox can offer ethX with a vlan

so as i was not being able to configure vlan´s in openwrt (yesterday you teached me, so there is vlan 10 and 99 configured properly. )

Thank you man, can I buy you a coffee for the teachings?

With this in mind, if this specific OpenWrt device/VM is not handling the wifi, you don't need a bridge for the general functionality.

That said, there are quirks related to using proxmox and other virtualized environments. I don't use proxmox myself, so I cannot comment about the nuances on that system.

Does your x86 box really have 8+ ethernet interfaces that are all physically mapped through the proxmox environment to your OpenWrt VM?

No,
there is this group of NICS that i call it virtually switch that has one cable for the whole network. I grouped several ports together

Inside the proxmox, i create each interface with a vlan (so i dont need to deal with vlans inside openwrt. )
the openwrt just see and ethernet device, it does not know anything about vlan.
You can see that all of them are in the bridge named switch, and there is a tag with the proper VLAN on each one.

I cannot speak to Proxmox, but generally speaking, it is really easy to setup VLANs within OpenWrt (in fact, you don't even need bridge VLANs, simple dotted notation works here). That could greatly simplify your configuration, assuming that the Proxmox side of things can properly accommodate the VLANs (it should, but I cannot advise about how to do this).

Thank you man, you are the best, you solved all my problems. And helped me learn more.

Awesome! Glad I could help!

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

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