Ethernet doesn't work on R2 ubuntu with kernel 4.14

I clone the repository BPI-R2-4.14 in ubuntu16.04 at R2,the image is the one upload at 2018.3, 2018-03-29-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc.img when using the origin kernel4.4, the wan port is working and able to get IP from DHCP but i install the kernel4.14 all ports doesn’t work ,even setting a static IP can’t get it work. I am wandering is there some modify job should be done to ubuntu’s network manager config file /etc/network/interface ? mine is empty . Command “dhclient -i eth1” doesn’t return. Sorry for my poor english. @frank-w

please show output of “uname-r;ip a”

you have to set eth0+eth1 first to up, then your wan/lanX you cannot run dhclient on ethX…it has to be run on wan/lanX

thanks , it worked after I execute “dhclient -i wan” .

"ip a "shows lan0@eth0 …something like that, ubuntu’s network manager seems don’t compatible with the switch driver…

kernel version is 4.14.95 ifconfig shows eth0 and eth1

Imho ifconfig (old tool) shows only interfaces which are up (without -a switch).

Ip a shows also dsa-user-ports (lanx,wan) with cpu-port relationship (@ethx).

I don’t know how to configure network-manager,but you need to set first ethx to up (without ip-config) and then configure user-ports (lanx,wan)

could you please advice how to set ethx and configure user ports. I followed https://help.ubuntu.com/community/NetworkConfigurationCommandLine/Automatic, but it does not work for me.

I have tried to boot from sd card, which I have created with Win32Disklmager and downloaded image ubuntu-18.04-bpi-r2-preview.img. It boots, however no connections work, neither ethernet, neither wifi. I have tried to modify /etc/network/interfaces, but unsuccesfully. Thank for an advice.

How did you tried modify interfaces? Make sure it is used…

https://wiki.fw-web.de/doku.php?id=en:bpi-r2:network:start

For wifi you have to create ap0 and run hostapd+dnsmasq (wifi.sh)

I am totally new to these things. I have tried to follow your instructions now, I have managed first step: via /etc/network/interfaces put eth0 up. However with next step: $ cat /etc/udev/rules.d/00-static-mac-address.rules I failed. No such a file or directory. Shall I create it? And does it matter which ethernet port is pluged to cable? Or it could be anyone? Thank a lot for help.

Also to the first step: ip link set eth0 up - it runs without any message, but for ip link set eth1 up - Cannot find device “eth1”

I have written it to /etc/network/interfaces. “ip a” command shows info for: lo: eth0: wan@eth0: lan0@eth0: lan1@eth0: lan2@eth0: lan3@eth0:

in /sys/devices/platform/1b100000.ethernet/net/ there is only eth0; no eth1.

it depends on kernel-version…second gmac is merged afaik after 4.14.52.

just try manual steps first or bring interfaces up with interfaces file and look at state with ip a

in my wiki you have example for lan0 including ip-adress…you need to change it to your subnet…eth0 is only put up before setting lan0 up…

i do not know your network-topology, but both ports need to be up and lanX needs an ip-configuration matching your subnet

if it still does not work post full “ip a” and your topology+client-config…

normally you don’t need to change mac-adress, so no need for udev-change

on top of network-page you see shematic of ports…first is wan, then lan0,lan1,…if you configure lan0, you need to use the second port from left

I have linux 4.14.48. ip a info is following: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 8e:a2:99:33:0e:cb brd ff:ff:ff:ff:ff:ff inet6 fe80::8ca2:99ff:fe33:ecb/64 scope link valid_lft forever preferred_lft forever

3: wan@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 8e:a2:99:33:0e:cb brd ff:ff:ff:ff:ff:ff

4: lan0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 8e:a2:99:33:0e:cb brd ff:ff:ff:ff:ff:ff inet 192.168.0.11/24 brd 192.168.0.255 scope global lan0 valid_lft forever preferred_lft forever inet6 fe80::8ca2:99ff:fe33:ecb/64 scope link valid_lft forever preferred_lft forever

5: lan1@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 8e:a2:99:33:0e:cb brd ff:ff:ff:ff:ff:ff

6: lan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 8e:a2:99:33:0e:cb brd ff:ff:ff:ff:ff:ff

7: lan3@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 8e:a2:99:33:0e:cb brd ff:ff:ff:ff:ff:ff

Config looks good so far…seems like lan0 is up (connected to switch/client).

Has your client ip 192.168.0.x/24?

If yes you should can ping r2 (192.168.0.11)…

My notebook has 192.168.xx.x . Ping does not work: PING 192.168.0.11 (192.168.0.11) 56(84) bytes of data. ^C — 192.168.0.11 ping statistics — 21 packets transmitted, 0 received, 100% packet loss, time 20024ms

I have also tried the official huge image, connection works there, so HW should be ok.

192.168.x.x? You need to be in 0 subnet or change 0 to yours in interfaces file of r2

well, that works: PING 192.168.0.11 (192.168.0.11) 56(84) bytes of data. 64 bytes from 192.168.0.11: icmp_seq=1 ttl=64 time=2.47 ms

it works both way, pink from r2 to my notebook is also ok.

IP(v4) basics :wink:

that is the problem. I am totally new to this. R2 is my first SBC and before I have never install any OS. But somewhere I need to start. However what would you recommand me with R2? Any idea where I may make a beginer mistake? Or what could be wrong?

I am trying to find something also about the HDMI. I need to connect 800x480 display. But only 720x480 is available. It is readable, but not nice.

you can set resolution in linux cmdline with uboot (add video=xxx to bootargs)

https://wiki.fw-web.de/doku.php?id=en:bpi-r2:hdmi

Thanks a lot. I have already tried to modify uEnv.txt with another image, where this did not work. But with this your Ubuntu image works nicely. Thank you.

Wouldn’t you have any idea what to try with ethernet?

I thought it works now with same subnet? What is the problem now?

Uenv.txt is a textfile with options for uboot…you can set bootargs/bootopts here to define hdmi resolution