1 1
gailu

Network is not restored on ifconfig wlan0 up

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?

Share this post


Link to post
Share on other sites

I tried to run dhclient -r but it didn't help either. Once nework is down by 

ifconfig wlan0 down

Its not getting restored.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1