OpenWrt Forum Archive

Topic: Change IP address programmatically

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.


I need to add/change IP addresses of an interface programmatically, at the moment I do it with the ip command. Unfortunately the address is not shown in Luci.

For example, ifconfig wwan0:

inet6 addr: xxxx:59e:b800:xxxx:e5b:8fff:xxxx:xxxx/128 Scope:Global
inet6 addr: fe80::e5b:8fff:xxxx:xxxx/64 Scope:Link

However the Global IPV6 address ist not shown at the Interface Overview in Luci.

Is there a command which updates Luci?


Also write your changes to /etc/config/network. Then LuCI will pick them up.

(Last edited by 600cc on 7 Apr 2018, 16:11)

Alternately use uci to write/save your changes. Either approach will allow them to show up in LuCI.

Thank you.

Writing them to /etc/config/network is permanent, that's not what I'm looking for.

Maybe "ubus call network add_dynamic" is the right way, but I don't know the syntax.

Is it possible to add/update an IPv6 to an existing interface with this command?

Thank you.

The discussion might have continued from here.