Jump to content

[Invalid] - Network ports inconsistent behavior with 21.02.1 on a NanoPi R4S 4GB


hive

Recommended Posts

I'd like some help please.

 

The ethernet device naming seems inconsistent.  

 

Sometimes one interface comes up as eth0 and sometimes as eth1, and sometimes not at all.  The enp1s0 interface seems to reliably come up, but not with the right config (sometimes it uses the config for enp1s0 and sometimes for eth0).

I am trying to assign status IP addresses (on different networks) to each interface, but because of the unreliable bringup of the network interfaces, I can't get a config that starts up correctly and consistency on reboots or cold boots.

 

As a test I ran the friendly-core-lite-focal from FriendlyCore and it does not have this issue.

 

Is there something I need to do on Arabian to get the network interface bringup to work?

I have static IP configs in /etc/network/interfaces.d called eth0, eth1 (these are the same, call it network A, because the 2nd network seems to sometimes come up as eth0) , and enp1s0 (configured for my second network, call it network B)

 

I'd greatly appreciate any help in making the network bring up consistent.

Link to comment
Share on other sites

Your issue report is invalid for one or multiple reasons (non-exhaustive enumeration):

 

  • it has been stated at the wrong place
  • it lacks fundamental requested data
  • it could have been easily solved by a quick search and/or reading documentation
  • unsupported userspace/image/SBC

 

Since you refused to use the bug reporting form carefully and follow the information there as you have been asked for we have no intention to further investigate.

Please add missing information if applicable.

 

https://www.armbian.com/bugs

Link to comment
Share on other sites

I'm observing the same problem described by @hive, the 2 eth adapters are named as:

  1. enp1s0
  2. eth0 or eth1, meaning that the second adapter switch the name between eth0 and eth1 every time the nanopi-R4s reboot for instance after a kernel upgrade, creating a bunch of issues with the nat rules, vnstat and other tools that are configured with the name of that adapter.

 

The second problem is that the ethx (0 or 1) very often is losing its ip address and I must run the dhclient manually to get an ip address again, this adapter is connected directly to the Comcast modem.

 

Here the armbianmonitor -u link https://paste.armbian.com/ugewezical

 

Thank you for any help on this regarding.

Link to comment
Share on other sites

I just solved persistent network name for my Armbian 23.02.2 Focal with Linux 5.15.93-rockchip64 on NanoPi R4S with a systemd .link file.

 

I came up with this generic .link file for NanoPi R4S based on  https://wiki.debian.org/NetworkInterfaceNames and the man page for systemd.link(5).

 

user@nanopir4s:/etc/systemd/network$ cat 10-persistent-net.link
#/etc/systemd/network/10-persistent-net.link

[Match]
#MACAddress=04:91:62:11:22:33
Path=platform-fe300000.ethernet

[Link]
Name=enx0

 

 

The naming of the CPU-based ethernet device (fe300000.ethernet RTL8211E) was subject to a race at boot with the PCIe ethernet device (r8169 RTL8168h/8111h).

 

user@nanopir4s:~$ sudo dmesg | grep -E 'eth|rtl|816|fe300'
[    2.335890] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    3.118663] rk_gmac-dwmac fe300000.ethernet: IRQ eth_wake_irq not found
[    3.118683] rk_gmac-dwmac fe300000.ethernet: IRQ eth_lpi not found
[    3.118810] rk_gmac-dwmac fe300000.ethernet: PTP uses main clock
[    3.119098] rk_gmac-dwmac fe300000.ethernet: clock input or output? (input).
[    3.119112] rk_gmac-dwmac fe300000.ethernet: TX delay(0x28).
[    3.119123] rk_gmac-dwmac fe300000.ethernet: RX delay(0x11).
[    3.119140] rk_gmac-dwmac fe300000.ethernet: integrated PHY? (no).
[    3.119213] rk_gmac-dwmac fe300000.ethernet: cannot get clock clk_mac_speed
[    3.119222] rk_gmac-dwmac fe300000.ethernet: clock input from PHY
[    3.125215] rk_gmac-dwmac fe300000.ethernet: init for RGMII
[    3.126451] rk_gmac-dwmac fe300000.ethernet: User ID: 0x10, Synopsys ID: 0x35
[    3.126474] rk_gmac-dwmac fe300000.ethernet:         DWMAC1000
[    3.126484] rk_gmac-dwmac fe300000.ethernet: DMA HW capability register supported
[    3.126494] rk_gmac-dwmac fe300000.ethernet: RX Checksum Offload Engine supported
[    3.126502] rk_gmac-dwmac fe300000.ethernet: COE Type 2
[    3.126510] rk_gmac-dwmac fe300000.ethernet: TX Checksum insertion supported
[    3.126519] rk_gmac-dwmac fe300000.ethernet: Wake-Up On Lan supported
[    3.126630] rk_gmac-dwmac fe300000.ethernet: Normal descriptors
[    3.126640] rk_gmac-dwmac fe300000.ethernet: Ring mode enabled
[    3.126648] rk_gmac-dwmac fe300000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    3.161734] r8169 0000:01:00.0 eth0: RTL8168h/8111h, f2:ca:e6:11:22:33, XID 541, IRQ 91
[    3.161771] r8169 0000:01:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    3.442048] r8169 0000:01:00.0 enp1s0: renamed from eth0
[    8.069286] rk_gmac-dwmac fe300000.ethernet enx0: renamed from eth1
[   17.312235] Generic FE-GE Realtek PHY r8169-0-100:00: attached PHY driver (mii_bus:phy_addr=r8169-0-100:00, irq=MAC)
[   17.517652] r8169 0000:01:00.0 enp1s0: Link is Down
[   17.569528] rk_gmac-dwmac fe300000.ethernet enx0: PHY [stmmac-0:01] driver [RTL8211E Gigabit Ethernet] (irq=90)
[   17.573204] rk_gmac-dwmac fe300000.ethernet enx0: Register MEM_TYPE_PAGE_POOL RxQ-0
[   17.574462] rk_gmac-dwmac fe300000.ethernet enx0: No Safety Features support found
[   17.574550] rk_gmac-dwmac fe300000.ethernet enx0: PTP not supported by HW
[   17.575063] rk_gmac-dwmac fe300000.ethernet enx0: configuring for phy/rgmii link mode
[   21.020601] r8169 0000:01:00.0 enp1s0: Link is Up - 1Gbps/Full - flow control rx/tx
[   21.270522] rk_gmac-dwmac fe300000.ethernet enx0: Link is Up - 1Gbps/Full - flow control rx/tx

 

First I tried by MAC address then tried the more generic path_id

 

user@nanopir4s:~$ sudo udevadm test-builtin net_id /sys/class/net/enx0
Load module index
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Parsed configuration file /etc/systemd/network/10-persistent-net.link
Created link configuration context.
Using default interface naming scheme 'v245'.
ID_NET_NAMING_SCHEME=v245
ID_NET_NAME_MAC=enx049162112233
ID_OUI_FROM_DATABASE=Microchip Technology Inc.
Unload module index
Unloaded link configuration context.
user@nanopir4s:~$ sudo udevadm test-builtin path_id /sys/class/net/enx0
Load module index
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Parsed configuration file /etc/systemd/network/10-persistent-net.link
Created link configuration context.
ID_PATH=platform-fe300000.ethernet
ID_PATH_TAG=platform-fe300000_ethernet
Unload module index
Unloaded link configuration context.

 

Link to comment
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...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines