How to disable an interface with a comand

Hello everyone, I have 2 interfaces in my NSM2 and I would like to disable one (in this case radio0.network2) what command should I write in the SSH console?
I was trying uci
uci set radio0: network2.disabled = 1
but it did not work

# Disable WiFi-device
uci set wireless.radio0.disabled="1"

# Disable WiFi-interface
uci set wireless.default_radio0.disabled="1"

# Disable network interface
uci set network.wan6.disabled="1"

# Apply changes
wifi reload
service network reload

# Save changes
uci commit wireless
uci commit network
5 Likes

Isn't it necessary to commit the changes before you reload the service?

1 Like

No need.
UCI applies the changes to the runtime configuration.
And you can revert it if you don't want to save it.

4 Likes

Sorry for answering so late, I did not have time to review, I write because I have done some tests with your indications but I can not solve my problem:

uci set wireless.X.disabled = "1" - it works but if I put "0" it does not enable it.

And in my case I would like to disable / enable the wifi of my repeater, thanks in advance.
-attached image-

yes, you're right with "wifi reload" is enough

1 Like

Hi, in the case of the cited example, what command would be used to enable or disable the second or third connection? when executing "uci set wireless .." disables all

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.