TRB140 uci set/get LAN interface on/off

Hi,

please can you help me navigate to correct string when i want to get/set via uci API this:

Network/LAN/Lan interface - switch on/off

I tried “network.lan.device” but i received “br-lan” and i dont know how to get/set on/off via uci.

Thanks for advice

Vladimír

Hi,

ifconfig <Lanportname> down #disable the interface
ifconfig <Lanportname> up #enable the interface

These commands will only apply until the device is rebooted. If you’d like them to apply even after the reboot, you can use

uci set network.lan.enable='0' #disable the interface
uci commit network #commit the changes
/etc/init.d/network restart #restart the network service

And these for enabling the interface:

uci set network.lan.enable='1' #enable the interface
uci commit network #commit the changes
/etc/init.d/network restart #restart the network service

Your lan port name is going to be br-lan most likely.

Regards,
M.

1 Like

This topic was automatically closed after 60 days. New replies are no longer allowed.