Jump to content

Network is not restored on ifconfig wlan0 up


gailu

Recommended Posts

Hi Experts,

 

I am using opi zero with Armbian Ubuntu Xenial image. Wireless is working fine with DHCP but I am facing following issue.

 

If I run ifconfig wlan0 down followed by ifconfig wlan0 up, my network connectivity is not restored. 

 

Can anyone please let me know why it is happening?

Link to comment
Share on other sites

Thanks Igor.

 

But I am not able to restart wlan0 even from network manager without reboot. Tried following


 

 #nmcli networking off
 #nmcli networking on

#service networking restart

#systemctl restart NetworkManager

Is there some simple way to restart wlan0 so that it tries to reconnect with router with new DHCP request. Looks like there are multiple ways to switch-off wlan0 but not a single method that manage to restore it back without reboot.

Link to comment
Share on other sites

1 hour ago, gailu said:

Is there some simple way to restart wlan0 so that it tries to reconnect with router with new DHCP request.

 

Most probably hit 1 when doing a web search for 'nmcli refresh dhcp lease' (if you replace 'nmcli' with 'linux' you get all possible methods). Disclaimer: this will do what you want but not what you tried all the time instead.

Link to comment
Share on other sites

5 minutes ago, gailu said:

I am trying to temporarily disable the network for 5 minutes and enable it again

 

Ok, something completely different than before (renewing a DHCP lease). NetworkManager isn't that primitive as the old ifconfig stuff. You're dealing here with devices vs. connections. I still have no idea what you want to do for whatever reasons but just play around with 'nmcli dev status', 'nmcli con show' and 'nmcli con down|up $profile'.

 

This might give the idea:

root@orangepizeroplus2:~# nmcli dev status
DEVICE  TYPE      STATE      CONNECTION         
eth1    ethernet  connected  Wired connection 1 
eth0    ethernet  unmanaged  --                 
lo      loopback  unmanaged  --                 
root@orangepizeroplus2:~# nmcli con show
NAME                UUID                                  TYPE            DEVICE 
Wired connection 1  de15ed07-c4dc-48fd-abb9-49fedf7e0004  802-3-ethernet  eth1   
root@orangepizeroplus2:~# nmcli con down 'Wired connection 1' ; sleep 5 ; nmcli con up 'Wired connection 1'
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)

I still think it would be the best idea if you would start to describe what's really happening and what you're trying to solve since maybe it's just the usual 'LAN and WAN pointing to same subnet' stuff so many OPi Zero users already ran into?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines