Hello everyone,
I'm having trouble when using uci commands to config networks on OpenWrt.
uci set network.lan.ipaddr='192.168.19.191'
uci set network.lan.gateway='192.168.19.1'
uci set network.lan.netmask='255.255.255.0'
uci set network.lan.proto='static'
uci add_list network.lan.dns='8.8.8.8'
uci add_list network.lan.dns='8.8.8.4'
uci commit
/etc/init.d/network restart
I set the network with the above commands, it succeeds and I can ping to 8.8.8.8
but when I check file /etc/config/network. It still not update new configurations.
config interface 'lan'
option ifname 'eth0'
option force_link '1'
option macaddr '9c:65:f9:4b:8c:f9'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '0'
And when I use curl to download files. It appeared error
curl: (6) Couldn't resolve host
Does anyone know how to fix this?
Thanks