It’s strange that after booting the 5.3-rc kernel I have a very limited set of modules loaded. I cannot even run iptables or perform masquerading. I have tried manually to load the module “ modprobe ipt_MASQUERADE ” and the serial console freezes.
Yes a did a new rebuild yesterday late night with rc6 and that crash does not appear anymore after connecting a cable to one of the LAN ports (br0).
I saw DHCP is working fine and I received IP address on PC behind BPI-R2 but I stiil need to setup NAT.
I’m using firewalld and later today I’ll try to setup masquerading and do some speed tests.
What is the default wan interface for 5.3-rc image ? I thought it was eth1 but I cannot see any eth1 interface available. I see the wan interface is bound to eth0.
Right now i’m using DHCP on wan interface
I’m trying to setup pppoe on wan but it seems it does not work when using pppoeconf tool on Debian.
Below is the list of the interfaces
ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defau0
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 g0
link/ether e6:75:09:46:d5:d9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::e475:9ff:fe46:d5d9/64 scope link
valid_lft forever preferred_lft forever
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
4: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 0
link/ether e6:75:09:46:d5:d9 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.146/24 brd 192.168.1.255 scope global dynamic wan
valid_lft 82744sec preferred_lft 82744sec
inet6 fe80::e475:9ff:fe46:d5d9/64 scope link
valid_lft forever preferred_lft forever
5: lan0@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master0
link/ether e6:75:09:46:d5:d9 brd ff:ff:ff:ff:ff:ff
6: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master0
link/ether e6:75:09:46:d5:d9 brd ff:ff:ff:ff:ff:ff
7: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master0
link/ether e6:75:09:46:d5:d9 brd ff:ff:ff:ff:ff:ff
8: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master0
link/ether e6:75:09:46:d5:d9 brd ff:ff:ff:ff:ff:ff
9: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 s0
link/ether f8:62:aa:50:16:10 brd ff:ff:ff:ff:ff:ff
10: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP grou0
link/ether e6:75:09:46:d5:d9 brd ff:ff:ff:ff:ff:ff
inet 192.168.40.1/24 brd 192.168.40.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::e475:9ff:fe46:d5d9/64 scope link
valid_lft forever preferred_lft forever
20: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast s0
link/none
inet 172.31.31.1/24 brd 172.31.31.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::1d25:8055:949:edd5/64 scope link stable-privacy
valid_lft forever preferred_lft forever
eth1 is second gmac, which is only available if patches for second gmac are applied (4.19). i have not ported them because phylink-patches also using second gmac (renaming eth1 to wan) but with right setup.
so wan is connected to first gmac as it is displayed in “ip a” (wan@eth0)
have you set eth0 to up before configure wan to dhcp? you can try it manually by ip-tool and running “dhclient wan”
Right now my BPI-R2 wan port is connected behind other TP-link gigabit router and it receives DHCP on wan port from TP-link.
I want to get rid of the TP-link router and connect the PPPoE line directly into the BPI-R2 wan port.
This is the config I have in the interfaces file on Debian. Right now the PPP options are commented
auto eth0
iface eth0 inet manual
pre-up ip link set $IFACE up
post-down ip link set $IFACE down
auto eth1
iface eth1 inet manual
#auto dsl-provider
#iface dsl-provider inet ppp
#pre-up ip link set eth1 up
#provider dsl-provider
auto br0
iface br0 inet static
address 192.168.40.1
netmask 255.255.255.0
bridge_ports lan0 lan1 lan2 lan3 wlan0
bridge_fd 5
bridge_stp no
so your dhcp works (currently with your old router),right?
I have also pppoe running on wan,but with 2 vlan (but before i had 1 directly on wan). I suggest using a lts-kernel and setup well configured (whitelisting) iptables before using r2 directly on public internet!
if you have no second gmac you need to drop eth1 block (it will cause a hang on “raise network interfaces”) and change dsl-provider interface (also in /etc/ppp/peers) to wan instead of ethx
I have managed to setup the PPPoE connection on BPI-R2 router and it connected successfully (kernel 5.3-rc)
After running some speedtests I saw the maximum I can get on the BPI-R2 box is around 170Mbps download compared with the old TP-link router which can reach around 450Mbps (using DD-WRT).
I think the BPI-R2 limitations comes from missing HNAT support. The TPlink device has some hardware NAT implemented using SFE (shortcut forwarding engine)
I have an 500Mbps (download) / 250Mbps (upload) connection.
For current hnat implementation there are some limitations…it does only work for traffic between wan+lan (nat on wan,lan on lan-ports). Most use-cases like nat on pppx or briged lan-ports are skipping hnat.
HNAT support for anything else except standard IPoE might be tricky/unsupported as it requires HW switching/forwarding engine to be either flexible enough so it is possible to configure it to deal with encapsulating protocol implementation (i.e. how to extract IP frames from PPP encapsulated into ethernet frames, how to create encapsulated PPPoE frames for outgres, e.t.c.) or HW engine should have support built in for some specific protocols. I’m not so sure about R2’s HW NAT actual capabilities but implementation code I’ve seen for it (both older one for 4.14 and recent one that was backported to 4.14 by OpenWRT team) are not “smart” enough to support PPPoE. Thus do not expect your internet throughput with R2 to match one you get with other device which has properly working vendor-shipped HW NAT driver with PPPoE support - like one you’ve get in your TP-link device.
you mean 4.14 is faster than 5.3-phylink also without hnat? 4.14 contains some network-tweaks from openwrt/lede, maybe these improve network-speed…
the main problem i saw in my network-tests: i can only transmit ~1Gbit/s (940Mbit/s) summarized when multiple clients connected, also with second gmac, maybe traffic also causes collisions (have not much clients for testing this)…tested with 2 simultanous iperf3-sessions on r2 going to 2 different clients. phylink has better performance than mainline-driver, but also only reaches ~1Gbit/s where at least using second gmac (lan+wan) or trgmii-mode (lan+lan) should bring additional speed
here are the Patches for 4.14 i had also applied to 4.14-branch (but imho squashed together while merging second gmac):