gailu Posted May 25, 2017 Posted May 25, 2017 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?
gailu Posted May 25, 2017 Author Posted May 25, 2017 I tried to run dhclient -r but it didn't help either. Once nework is down by ifconfig wlan0 down Its not getting restored.
Igor Posted May 25, 2017 Posted May 25, 2017 Wireless is not handled by ifconfig but NetworkManager ... in latest images. https://askubuntu.com/questions/1786/what-is-the-difference-between-network-manager-and-ifconfig-ifup-etc
gailu Posted May 26, 2017 Author Posted May 26, 2017 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.
tkaiser Posted May 26, 2017 Posted May 26, 2017 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.
gailu Posted May 26, 2017 Author Posted May 26, 2017 I am trying to temporarily disable the network for 5 minutes and enable it again. I am able to disable it but not able to enabled it again once disabled
tkaiser Posted May 26, 2017 Posted May 26, 2017 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?
Recommended Posts