Bpi and gateway with wire

First, I have test with a bridge without ap, after I have a bridge with ap0 I have the same problem. I can make a test without bridge…

My /etc/network/interfaces for the bridge :

auto br0
iface br0 inet static
#auto wan
#auto lan3
#iface lan3 inet static
#iface wan inet static
  bridge_ports lan1 lan2 lan3 lan0 ap0
#  bridge_ports lan0 ap0 wan lan2 lan3
  bridge_fd 5
  bridge_stp no
  pre-up /home/root/wifi/wifi.sh
  up /etc/init.d/firewall start

And this is the end of your wifi.sh

if [[ $? != "0" ]]
	echo "Error, device no available, ap0"
	echo "Done, all good, ready to lauch hostapd"
	sleep 2
        hostapd -dd /etc/hostapd/hostapd.conf &
	    sleep 20
	    #ip addr add dev ap0
	    #sleep 20
 	    #systemctl restart  isc-dhcp-server
        #sleep 20
        #hostapd -dd /etc/hostapd/hostapd.conf

When I see this file, I remenber I have do test without bridge…

The problem is only between my computer and the bridge of the bpi-r2… With a other computer : no problem.

Now, I test this network :

Internet <=>Modem<=> BPPI-R2 <=> Switch <=> 2 computer (my computer and a other)

For this test, I don’t use the wifi. If I ping the other computer with my computer :

--- ping statistics ---
158 packets transmitted, 158 received, 0% packet loss, time 160779ms
rtt min/avg/max/mdev = 0.163/0.213/0.509/0.067 ms

If I ping the bpi-R2 with my computer :

 --- ping statistics ---
112 packets transmitted, 103 received, 8% packet loss, time 113651ms
rtt min/avg/max/mdev = 0.349/0.466/0.559/0.054 ms

If I ping the bpi-r2 with the other computer :

 --- ping statistics ---
435 packets transmitted, 429 received, 1% packet loss, time 444429ms
rtt min/avg/max/mdev = 0.269/0.334/0.490/0.038 ms

If I ping the modem with my computer :

 --- ping statistics ---
115 packets transmitted, 113 received, 1% packet loss, time 115951ms
rtt min/avg/max/mdev = 0.540/0.894/1.055/0.078 ms

If I use the wire with my computer, the network is not good. If I use the bpi-r2’s WiFi the network is good.

please test without bridge…

why a modem between r2 and your Computers?

Oups… A switch ( D-LINK DGS-108 ).

you have connected only 1 port of bpi’s lan-ports to the switch? have you tested with another port? and without the switch?

I have tested without the switch and the same lan-port of the bpi-r2 with the same wire was not good with my computer and good with a other computer.

Since my PC had no problem communicating with ssh with the wan port of bpi-r2 via a swith, I tried to put the swith between my PC and the lan port.

Have you tried without bridge and different port?

Without bridge and lan3

--- ping statistics ---
268 packets transmitted, 262 received, 2% packet loss, time 273411ms
rtt min/avg/max/mdev = 0.244/0.394/0.496/0.053 ms

Without bridge, without wire (wire in lan3 and in lan2 : a error), via the wifi (wifi in 192.168.3.XXX)

--- ping statistics ---
203 packets transmitted, 203 received, 0% packet loss, time 202315ms
rtt min/avg/max/mdev = 1.575/2.021/4.997/0.513 ms

Without bridge and lan2

--- ping statistics ---
204 packets transmitted, 195 received, 4% packet loss, time 207905ms
rtt min/avg/max/mdev = 0.295/0.407/0.485/0.046 ms

Without bridge and lan1

--- ping statistics ---
132 packets transmitted, 124 received, 6% packet loss, time 134126ms
rtt min/avg/max/mdev = 0.293/0.421/0.525/0.046 ms

Without bridge and lan0 :

 --- ping statistics ---
169 packets transmitted, 166 received, 1% packet loss, time 172051ms
rtt min/avg/max/mdev = 0.268/0.406/0.516/0.053 ms

Without bridge, without bind9 and lan0 :

--- ping statistics ---
123 packets transmitted, 121 received, 1% packet loss, time 124909ms
rtt min/avg/max/mdev = 0.298/0.393/0.474/0.039 ms

I think that’s it’s good with this config lan0 for internet ans the other for the bridge :

[email protected]:~# grep -v \# /etc/network/interfaces
source-directory /etc/network/interfaces.d
auto eth1
iface eth1 inet manual
  pre-up ip link set $IFACE up
  post-down ip link set $IFACE down

auto eth0
iface eth0 inet manual
  pre-up ip link set $IFACE up
  post-down ip link set $IFACE down

auto lan0
allow-hotplug lan0	
allow-hotplug wan
  iface lan0 inet dhcp
  pre-up ip link set $IFACE address 32:D1:55:7D:03:39 up
  up /etc/init.d/firewall start

auto br0
iface br0 inet static
  bridge_ports wan lan1 lan2 lan3
  up /etc/init.d/firewall start

Why ???

I don’t know if you can bridge wan to lan…but at least this line should be dropped from your config

allow-hotplug wan

I have try the port wan and now, I try the port lan2. The netwotk work with all.

Now, I try with ap0 in the bridge… Why not. I think that’s it’s good. I did not understand why it should not work.

You have see a error :

allow-hotplug wan

I will try without this error.

With or without the wifi in the bridge, it works better when the network does not go through the bpi-r2

do you still have Packetdrops?

can you test with latest 4.19 (main/gmac-tree)?

have you take a look on cpu-load, memory consumption and ethernet-interrupts (cat /proc/interrupts) while doing your speedtest?

I have less Packetdrops. But I have.

--- www.google.fr ping statistics ---
431 packets transmitted, 424 received, 1% packet loss, time 430631ms
rtt min/avg/max/mdev = 23.661/24.219/26.133/0.346 ms

I can test your kernel, but where is it ? I don’t have many time before the 6/1/19…

I don’t do test with speedtest. I go to internet and when the bpi-r2 is between my computer and internet, I have to many problem, it’s slow.

it is slow because of packet-drops…every dropped packet have to requested and sent again


compiled Package:

backup your old uImage before overwriting. you have to change kernel-var in uEnv.txt if using another name than “uImage” for kernel

but something is strange in your system/with your r2

made test from my client over r2 (forwarding+nat/pat) to internet

--- www.google.com ping statistics ---
533 packets transmitted, 533 received, 0% packet loss, time 532747ms
rtt min/avg/max/mdev = 14.064/28.386/1037.457/90.110 ms, pipe 2

have you looked on soldering-points of ethernet-ports? there were some bad ones on sata of some people here…maybe your ethernet-ports are affected with same issue

The welds seem normal, How did you see the welding problems? My BPI-R2 is in a box : https://e.banana-pi.fr/2165-thickbox_default/boitier-acrylique-pour-le-routeur-banana-pi-bpi-r2.jpg

Why backup my kernel ? If it’s don’t run I make a new sd-card. With a new config, first only for forwarding+nat/pat to internet. Start from nothing… And try now…

Now, I run with the new kernel…

The bpi-r2 is in the network (wan with lan0) and I can not communicate with the bridge.

No time now…

Error… I can’t remove this.

You have a usb2serial-cable?

You have copied uImage to first partition in bananapi/bpi-r2/linux and modules to second partition (/lib/modules)?

Basicly folder-structure inside the archive

I don’t have some time… But I have do test.

I think that’s bridge do not run. hdmi do not run. I have a usb2serial-cable, but I don’t remember who :disappointed_relieved:

--- www.google.fr ping statistics ---
137 packets transmitted, 116 received, 15% packet loss, time 136595ms
rtt min/avg/max/mdev = 23.458/24.050/24.996/0.266 ms

if you use lan0 as wan and bridging lan1-3 why not using wan as management-interface with fixed address?