Hi.
In my company we use a lot of BPI-R2 as a routers. On some of them we have a problem with packet forwarding - packets lost or the speed is very low. I have check this on two different OS: Raspbian based on Debian Stretch and SlackARM.
So, for example - the desktop connected behind the BPI-R2 router:
Hi @frank-w
Yes, Iām sure that everything what is required is configured correctly and completely
I tested this on the same BPI-R2 board with kernel 4.16 and 4.19 and donāt want to work. When I run the same board with official kernel 4.4.70 NAT start working without any issues.
Interestingly, on some of BPI-R2 boards with kernel 4.16 (the same OS and configuration) NAT works OK. Strange
The topology on my network is very simple: 1st BPI-R2 connected to local network via wan port and on the lan ports is running dhcp server and had setup NAT, 2nd BPI-R2 connected directly via wan port to the 1st BPI-R2 to lan port. Thatās all
4.4 and 4.9+ have completely different network configuration because of dsa driver. In 4.9+ you bring ethx up and configure ip on dsa-ports (wan,lanx). 4.4 only have ethx
I know about this differences and setup NAT as should on each kernel. The problem is that on the same BPI-R2 board NAT works OK with kernel 4.4 but donāt works with kernel 4.16/4.19.
When we try ping from the second BPI-R2 using bigger package than default packages are lost.
ping -s 12500 10.10.0.1
/10.10.0.1 is a GW in my local network/
Yes, default packet size work well. It is the good point to test problems with ethernet port(s). After made a check on official kernel 4.14 https://github.com/BPI-SINOVOIP/BPI-R2-bsp-4.14 I have had the same situation - default packet size with ping is OK but when we try with bigger (>1024) we donāt receive answer from ping (iām pinging my local GW which not drop bigger icmp packages than default - Iām sure them ;)).
@frank-w As I have a few motherboards with this issue (from a lot used) Iām sure this is a problem with hardware (with BPI-R2 board), not with kernel.
Hmm, @frank-w maybe. But, if it would be true ip_forward/NAT shouldnāt work on all used by me BPI-R2, true? Or Iām thinking wrong? But the problem occurs, as I wrote earlier, on few from all which we use.
@frank-w I can make the deep tests again but to have simplest situation I want to have the same name for network interfaces on all kernels. Do you known and could you tell me, if I can setup interface name in u-boot? or maybe in other place (the good way will be do it without kernel recompilation).
except kernel 4.4 the interfaces have the same nameā¦ethx for gmacs, wan+lan0-3 for the physical ports on the board. eth1 (second gmac) only exists in my modified kernels (4.14,4.19,x.xx-gmac) in newer phylink branches second gmac is simply renamed to wan (= same network-config as in mainline-kernel)
in uboot there are imho all interfaces bridged in switch and only one interface is configured, but you cannot set any interface-name in uboot
I have this BPI-R2 connected inside my local network so I use wan port (the separated port) connected to my local network as an outgoing interface an rest of ports (lan0-3) as a port to which I connect other device from with I try download/ping/etc.
Iām thinking that HDMI will work correctly on all kernels with my settings in uEnv file video=HDMI-A-1:1280x1024-32@60D
Iām very tired this not clear situation for me. Why some BPI-R2 with kernel 4.16.18 works well as router (with NAT/ip_forward) but some not? Where is the reason this strange (for me) situation?