Code:
require('uci')
uci.set('network', 'lan', 'ipaddr', '192.168.1.10')
uci.set('network', 'lan', 'netmask', '255.255.255.0')
uci.set('network', 'lan', 'gateway', '192.168.1.1')
uci.set('network', 'lan', 'dns', '8.8.8.8')
uci.commmit('network')