How to configure DHCP to provide ip's from the router?

To connect to the router I had to set a fix ip address (192.168.1.10) to my network card.

I had tried to activate DHCP as an authoritative server but is not working. When active as default config the server get the ip's from the Internet provider router. So I can't connect to the router.

I can't find a tutorial to use the Luci or SSH to configure the DHCP.

Please help.

In a default configuration, the DHCP server is enabled on the lan. It will only be disabled if you manually change the config, or if it detects a DHCP server on the lan segment already (from another DHCP server, possibly from a router).

What is the physical topology of the network? Can you show us a diagram including the port labels?

O.k., shouldn't be necessary, but that should work nevertheless.

It is by default (unless there already is another dhcpd active on your physical network).

That suggests a misconfiguration, in the sense of your OpenWrt-router's lan overlapping with the ISP-router's lan. Not surprising based on the first sentence.

All in all, we have way too little information to answer. We don't know the network topology (how is the OpenWrt router connected to the ISP router, how is the 'server' connected, what IP addresses are all three devices using), nor what the (OpenWrt-) config config is, nor what functionality you actually intend your setup to serve.

The ISP router has an authoritative DHCP. The openwrt is connected directly to the ISP through the WAN port.

The openwrt by default provides DHCP from the ISP router. But I want to make the openwrt as authoritative to provide the Lan ip's instead of from ISP router.

The ISP provides 10.35.126.x/24 ip's. The openwrt router is set to 192.168.1.1 so I need the Lan to be 192.168.1.x/24 to be able to reach it.

I need to change it because the ISP has limited capacity, it can handle less than 10 devices.

The isp router should have zero influence over the lan’s dhcp server if things are properly configured.

Let’s start by looking at the config.

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 (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Remember to redact passwords, VPN keys, 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
ifstatus wan | grep address
ubus call system board
{
        "kernel": "6.6.110",
        "hostname": "OpenWrt",
        "system": "Qualcomm Atheros QCA956X ver 1 rev 0",
        "model": "Netgear WNDR4500 v3",
        "board_name": "netgear,wndr4500-v3",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "24.10.4",
                "revision": "r28959-29397011cc",
                "target": "ath79/nand",
                "description": "OpenWrt 24.10.4 r28959-29397011cc",
                "builddate": "1760891865"
        }
}

firewall

config defaults
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option synflood_protect '1'

config zone
	option name 'lan'
	list network 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'

config zone
	option name wan
	list network 'wan'
	list network 'wan6'
	option input REJECT
	option output ACCEPT
	option forward REJECT
	option masq 1
	option mtu_fix 1

config forwarding
	option src lan
	option dest wan

config zone
	option name wan2
	list network 'wan2'
	option input REJECT
	option output ACCEPT
	option forward REJECT
	option masq 1
	option mtu_fix 1

config forwarding
	option src lan
	option dest wan2

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

network

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

config globals 'globals'
	option ula_prefix 'fd97:7985:3a6a::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'eth0.2'
	option macaddr 'a0:04:60:1a:c1:da'

config interface 'wan'
	option device 'eth0.2'
	option proto 'dhcp'
	option metric '10'

config interface 'wan6'
	option device 'eth0.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0t 1 2 3'
	option vid '1'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '0t 5'
	option vid '2'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option ports '0t 4'
	option vid '3'

config interface 'wan2'
	option proto 'dhcp'
	option device 'eth0.3'
	option metric '20'
cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'
        option piofolder '/tmp/odhcpd-piofolder'

config dhcp 'wan2'
        option interface 'wan2'
        option ignore '1'
 ifstatus wan | grep address
        "ipv4-address": [
                        "address": "10.35.126.187",
        "ipv6-address": [
                "ipv4-address": [
                "ipv6-address": [
root@OpenWrt:~# ifstatus wan2 | grep address
        "ipv4-address": [
                        "address": "10.35.126.186",
        "ipv6-address": [
                "ipv4-address": [
                "ipv6-address": [

Based on the condig, a port plugged into one of the lan ports (excluding the one repurposed for a second wan) should get an address from the openwrt routers dhcp server in the 192.168.1.0/24 network.

Is this assertion different than what you are observing?

Yes. Devices on the Lan should get an address for network 192.168.1.0/24

Is this not the desired behavior?

If in doubt, there's a very simple quick test.

Disconnect the ISP router, reboot the OpenWrt router, reboot (a few of-) your clients - everything should (~=must) be normal then. The OpenWrt router will hand out DHCP leases out of the 192.168.1.x subnet (as confirmed by logread ; lograde -f), it's acting as authoritative DHCPd and DNS server.

After this test, you can plug the ISP router into the WAN port of your OpenWrt router again, there should be no change - just that your clients now have internet access. Rebooting the client(s) should result in the same experience (again).

The current behavior is that the Lan devices get the ISP's ip's. Not desired one.

How does the rest of the network look, are both ISP router and OpenWrt router connected to a switch on their LAN- Ports? Or are they the only devices in the network apart from phones, laptops, etc.?

Are the devices connected via Ethernet or WiFi? You didn’t share your WiFi config. Also, make sure your isp router WiFi is either disabled or using a different ssid than your openwrt device.

The ISP router is the wall and OpenWrt is connected to the ISP router. From the ISP router there are two connections to the OpenWrt to simulate a dual WAN connection but that is another problem/topic.

The devices are connected via Ethernet, I am not using the WIFI and is currently disable..

When you connect a computer to one of the lan ports, what address does it get?

Currently its get ISP router addresses, 10.35.126.x/24. It seems the OpenWrt DHCP is ignored.

Something is seriously wrong - this should not happen based on the config.

Unplug your second wan connection and test again. If it still fails…

Reset your router to defaults and verify that the dhcp server works properly.

Feel free to make a backup first, of course.

Before configuring the mwan3, the dhcp already behave the same way. It does not provide ip's just relays isp's router ip's.

Have you tried resetting your router yet?