[Solved] Help for basic DHCP and DNS configuration

Hi there,

I'm here to ask some help for a basic configuration because I'm new to this kind of things indeed.
I flashed my TP-Link TL901ND successfully, and then run the following commands:
root@LEDE:~# uci set wireless.default_radio0.encryption=psk
root@LEDE:~# uci set wireless.default_radio0.key=********
root@LEDE:~# uci set wireless.radio0.channel='4'
root@LEDE:~# uci set wireless.radio0.disabled=0
root@LEDE:~# uci set network.lan.ipaddr=
root@LEDE:~# uci set dhcp.lan.start='75'
root@LEDE:~# uci set dhcp.lan.limit='10'

Now I notice that both default gateway and DNS server ip addresses transferred to the DHCP clients are the same ip address I set up for the lan ethernet interface of the router (, but I wish they were both

I can't find or figure out the correct command for my purpose.
Thanks in advance.


P.s. I'm not so expert in english language so I'm sorry for some imprecisions.

Why do you need to run a DHCP server on, don't you run a DHCP server on (Maybe you need to disable the DHCP server on It's usually done on access points which don't acts as routers.)

It's possible to set the DNS server as dhcp_option 6 in dhcp.lan, The default gateway is dhcp_option 3, which you can try.

uci add_list dhcp.lan.dhcp_option	'1,'
uci add_list dhcp.lan.dhcp_option	'6,'

But make sure you have only one DHCP server in the network unless you have a very good reason to use multiple.

From the help on interface->advanced settings in luci

Define additional DHCP options, for example "6,," which advertises different DNS servers to clients.

1 Like


Hello mikma, you are correct indeed, but actually I don't know how to disable DHCP and DNS server in LEDE and, at the same time, point the clients to for DNS, DHCP and default gateway.
As I said, I'm a newbie and I can do just a bit.
By the way, your commands work great.
The LEDE router actually has as its own ip address.


Add Gateway's IP at the Use custom DNS servers and untick This is the only DHCP in the local network. This helped me, but I am a newbie too, good luck!

1 Like

Hi vasilis74 and thanks for your answer, but I did not have the LUCI interface so I should have done by the prompt.
Anyway I reinstalled the stock firmware.