Jump to content

Orange Pi PC - mainline - networking


rufik

Recommended Posts

I've experienced some issue on my OPI PC running 4.14 kernel - it disconnects eth after some hours of running. It's very annoying for me because I'm running Home Assistant automations on it and it's located in remote location (not in my home), so I have to drive 50 km to reset/reconnect it  manually :(

First I thought OPI just froze somehow (kernel panic or so). But later I've set up heartbeat trigger on red led and it's blinking, so OPI just disconnects from eth. When I unplugged cable for a minute and plugged it in back, networking was restored and I could reach via ssh. I'd like to make some workaround for now and the simplest thing seems to be write a script and put into crontab every minute - check/ping network and make a networking restart if failed.

But the question is - how is managed eth0 for OPI PC in mainline ubuntu server? Just ifdown/ifup eth0 or via nmcli? I ask because I can see that mncli shows eth0 unmanaged...what is the proper way?

 

rufik@opi:~$ uname -a
Linux opi 4.14.18-sunxi #24 SMP Fri Feb 9 16:24:32 CET 2018 armv7l armv7l armv7l GNU/Linux

rufik@opi:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 02:81:fd:fc:ae:65
          inet addr:192.168.9.2  Bcast:192.168.9.255  Mask:255.255.255.0
          inet6 addr: fe80::81:fdff:fefc:ae65/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5809 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5305 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:552340 (552.3 KB)  TX bytes:980090 (980.0 KB)
          Interrupt:38


rufik@opi:~$ cat /etc/network/interfaces
source /etc/network/interfaces.d/*
# Wired adapter #1
allow-hotplug eth0
no-auto-down eth0
iface eth0 inet dhcp
# Local loopback
auto lo
iface lo inet loopback

rufik@opi:~$ sudo nmcli g
STATE      CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN
connected  none          enabled  enabled  enabled  enabled

rufik@opi:~$ sudo nmcli c
NAME  UUID  TYPE  DEVICE

rufik@opi:~$ sudo nmcli n
enabled

rufik@opi:~$ sudo nmcli d
DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  unmanaged  --
lo      loopback  unmanaged  --

 

Link to comment
Share on other sites

1 hour ago, rufik said:

I ask because I can see that mncli shows eth0 unmanaged...what is the proper way?


In current images, eth0 is still managed with ifupdown but for the future, we are moving to Network Manager. Old way of networking will remain supported but it will not be used by default anymore. 


Remove eth0 config from /etc/network/interfaces, restart and Network manager will take control over eth0 as well.

Link to comment
Share on other sites

Thanks a lot. Just did it and network manager have took control. Now I can just perform nmcli d disconnect/connect easily :)

By the way, I wonder why I'm getting disconnected...it didn't happened for weeks until I've install mosquitto and home assistant...

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