Jump to content

ethernet connection keeps dropping out.


Gord_W

Recommended Posts

Using Nanopi neo.  Linux Lap 3.4.113-sun8i #4 SMP PREEMPT Wed Nov 22 13:45:28 CET 2017 armv7l GNU/Linux

I've tried both the Jessie and Ubuntu versions on the site and tried changing the the kernels to 4.x with the next and dev versions.  I get similar results in each.

 

Tried to upload diagnostics but got server error

 

I have an IP camera connected directly to the ethernet port with static IP on both the camera and the port.  I ssh to the nanopi via wifi.  The wifi port is forwarded to the ethernet connection so I can get images from the camera.

 

The ethernet connection seems to drop at random intervals but the time that it down/up are exactly 1 second multiples.

 

I've got a couple of nanopi and a couple of the same cameras and tried them in different combos with the same results.  Tried different power supplies.

 

I haven't found a similar problem on the internet.  Must be something that I'm doing ....

 

This is a section of the dmesg log

 

[Jan16 16:06] PHY: gmac0-0:00 - Link is Down
[  +2.000012] PHY: gmac0-0:00 - Link is Up - 100/Full
[ +19.999982] PHY: gmac0-0:00 - Link is Down
[  +1.999998] PHY: gmac0-0:00 - Link is Up - 100/Full
[  +5.999988] PHY: gmac0-0:00 - Link is Down
[  +1.000022] PHY: gmac0-0:00 - Link is Up - 100/Full
[Jan16 16:33] PHY: gmac0-0:00 - Link is Down
[  +1.999999] PHY: gmac0-0:00 - Link is Up - 100/Full
[  +2.000010] PHY: gmac0-0:00 - Link is Down
[  +2.999958] PHY: gmac0-0:00 - Link is Up - 100/Full
[ +14.000039] PHY: gmac0-0:00 - Link is Down
[  +1.000001] PHY: gmac0-0:00 - Link is Up - 100/Full
[Jan16 17:00] PHY: gmac0-0:00 - Link is Down
[  +0.999890] PHY: gmac0-0:00 - Link is Up - 100/Full
[ +12.000095] PHY: gmac0-0:00 - Link is Down
[  +1.000006] PHY: gmac0-0:00 - Link is Up - 100/Full
[ +23.999968] PHY: gmac0-0:00 - Link is Down
[  +1.000033] PHY: gmac0-0:00 - Link is Up - 100/Full
[Jan16 17:03] PHY: gmac0-0:00 - Link is Down
[  +2.000002] PHY: gmac0-0:00 - Link is Up - 100/Full
[Jan16 17:05] PHY: gmac0-0:00 - Link is Down
[  +0.999836] PHY: gmac0-0:00 - Link is Up - 100/Full
[Jan16 17:10] PHY: gmac0-0:00 - Link is Down
[  +0.999994] PHY: gmac0-0:00 - Link is Up - 100/Full
[ +28.000053] PHY: gmac0-0:00 - Link is Down
[  +1.999997] PHY: gmac0-0:00 - Link is Up - 100/Full

 

 

There are some dropped wifi packets but no ethernet.

 

root@Lap:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 46:bf:e5:d8:89:bf  
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::44bf:e5ff:fed8:89bf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4482690 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3301078 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2301875353 (2.1 GiB)  TX bytes:193423473 (184.4 MiB)
          Interrupt:114

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:16656 (16.2 KiB)  TX bytes:16656 (16.2 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0b:81:81:58:42  
          inet addr:192.168.1.11  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20b:81ff:fe81:5842/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3315272 errors:0 dropped:11889 overruns:0 frame:0
          TX packets:4502840 errors:0 dropped:3 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:335517701 (319.9 MiB)  TX bytes:2434428264 (2.2 GiB)

 

Could it be that I messed up iptables?  The images are coming through.

 

root@Lap:~# iptables -L -vt nat
Chain PREROUTING (policy ACCEPT 241 packets, 11574 bytes)
 pkts bytes target     prot opt in     out     source               destination         
37210 2233K DNAT       tcp  --  wlan0  any     anywhere             anywhere             tcp dpt:5006 to:10.0.0.100:80

Chain INPUT (policy ACCEPT 15 packets, 3372 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 114 packets, 8444 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 114 packets, 8444 bytes)
 pkts bytes target     prot opt in     out     source               destination         
37210 2233K SNAT       tcp  --  any    eth0    anywhere             anywhere             to:10.0.0.1

 

I can't see anything which is causing it.  Suggestions?

Regards,

Gord_W

 

 

 

 

 

Link to comment
Share on other sites

My experience with network-manager is it causes networks to shutdown and restart periodically.  This was quite a while ago, so the bug may have been fixed.  I don't let it on any of my computers.  You may want to see if you can get network manager to leave your ethernet alone.  ("apt-get remove --purge" is one way.)

 

Note that the armbian developers seem to be network manager fans.

Link to comment
Share on other sites

Blars,

I had killed and removed the networkmanager earlier and it did have any effect.  Still having the interface go down and up.

 

I wonder why 1 second increments are happening between the ups and downs.

 

Gord_W

Link to comment
Share on other sites

9 hours ago, Blars said:

You may want to see if you can get network manager to leave your ethernet alone

 

What a 'valuable' suggestion for physical problems happening on the link layer. Good luck to all blaming software when dealing with hardware issues.

 

@Gord_W: A link is something that is established between two ends. What about the other end? Obviously the problem does not live inside your SBC if you already exchanged them and the problem persists with identical symptoms (hint: look at the other end of the link and what connects both ends: switch/hub port, Auto negotiation/MDI-X settings there, Ethernet cable)

Link to comment
Share on other sites

7 hours ago, tkaiser said:

 

What a 'valuable' suggestion for physical problems happening on the link layer. Good luck to all blaming software when dealing with hardware issues.

 

 

I don't know why you are jumping to the conclusion that it is a hardware problem.  I'm not blaming anything so cool your jets.  You will note that I said that the camera was directly connected to the camera so there is no switch or anything else in between.  The cameras, cables, etc. have all been swapped out.

 

It could be a hardware problem with the Nanopi or camera.  I've used the cameras in the past with rPi2 and 3 and not had this problem.  It could be a software problem in the way that I'm setting the iptables up.  I don't know so was asking for suggestions.

 

@arox I'll look at disabling link negotiation.  Thanks.

 

Gord_W

 

 

Link to comment
Share on other sites

4 hours ago, Gord_W said:

I'm not blaming anything so cool your jets

 

I was answering not to you but to one of those stupid 'network manager bashing' posts. But thanks for reminding me to stay away from H3 forum (or this forum at all).

Link to comment
Share on other sites

1)  One thing that I have found that is interesting is that whenever I start a program (python script, stress) on the NanoPi while the ethernet link was working, the ethernet link would go down and then come back up.  This seems to indicate that it is NanoPi problem (software/hardware) and not a camera/wiring/power problem.

I boosted the min clock speed to 816MHz (max at default 912MHz) to see if that might help, but no effect.  Governor is interactive.

 

2) @arox I tried disabling link negotiation and it had no effect.

 

Gord_W

Link to comment
Share on other sites

I've got 4 boards and all of them have 'flipping' network interfaces. 
 

❯ ansible all -b -m shell -a 'journalctl | grep -Ec "Link is (Down|Up)"'
dns01 | SUCCESS | rc=0 >>
1544

nanotor | SUCCESS | rc=0 >>
61

monitor | SUCCESS | rc=0 >>
2

dns02 | SUCCESS | rc=0 >>
136

Three of them are Armbian and 4-th has  FriendlyElec's Ubuntu 16.04 
Kernels are `4.14.18-sunxi`  and `4.14.0` respectively. 

 

I doubt it can be a hardware issue, all boards a connected to the one hub, no issue on other boards (RPI and Odroid) from this hub.  Also, I do not use network-manager 

 

Link to comment
Share on other sites

Thanks for the feedback Igor.

I was going to give these boards another try with the current version hoping that it has been fixed, but it looks like it is not the case.

I don't have any problem with the rPi so have been using that for my application, but I bought the NanoPi Neos for it.

 

Any suggestion on what can be done?

 

Gord_W

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