[R2] Need help creating a working router configuration

I bought a BPi R2 with the intention of replacing my Netgear router. No, there’s nothing wrong with my Netgear router, aside from the factory firmware sucks. While using alternative firmware is better, the wifi hardware just doesn’t work due to lack of drivers. My wife is getting irritated with the amount of time it is taking me to get my new “custom” router up and running.

I have Frank’s Debian 10 upgraded to kernel 5.9.3. I saw this post and tried to follow the conversation, but am completely lost because no dhcp addresses seem to get assigned when I try the configuration (or variations thereof). I plainly don’t know enough to get it running correctly, but am willing to learn! Been using Ubuntu for a few years, so I have some experience with Linux…

Can someone help me create a working network configuration like an out-of-box retail router would come? I have a MT7615 that I need to create internet-accessible access points for (a 2.4GHz AP, 5 GHz AP and maybe some guest APs?), and an IoT access point using the onboard wifi working that should not connect to the internet. I’d appreciate the assistance!

A DIY router takes time and is no Ootb :slight_smile:

For network config you find nearly all in my wiki

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

I guess you want to bridge lan-ports. Remember bring eth0 up only and configure the bridge. For dhcp you need a server application like dnsmasq

Yeah, I know that a DIY router isn’t a OOBT experience. My wife doesn’t seem to get that… But anyways… I had quite a few problems trying to find an OS that works without issues. Your Debian 10 is that OS, so thank you very much!

dnsmasq is already installed. Then again, maybe it got installed from one of the other packages I’ve installed onto my OS… I dunno…

Thank you for the link! I’ve got what looks to be a working configuration. This is what I’ve cobbled together for /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
    hwaddress ether 08:00:00:00:00:01 # if you want to set MAC manually
    pre-up ip link set $IFACE up
    post-down ip link set $IFACE down

auto lan0
iface lan0 inet manual
    hwaddress ether 08:00:00:00:00:01 # if you want to set MAC manually
    pre-up ip link set $IFACE up
    post-down ip link set $IFACE down

auto lan1
iface lan1 inet manual
    hwaddress ether 08:00:00:00:00:01 # if you want to set MAC manually
    pre-up ip link set $IFACE up
    post-down ip link set $IFACE down

auto lan2
iface lan2 inet manual
    hwaddress ether 08:00:00:00:00:01 # if you want to set MAC manually
    pre-up ip link set $IFACE up
    post-down ip link set $IFACE down

auto lan3
iface lan3 inet manual
    hwaddress ether 08:00:00:00:00:01 # if you want to set MAC manually
    pre-up ip link set $IFACE up
    post-down ip link set $IFACE down

auto br0
iface br0 inet static
    hwaddress ether 08:00:00:00:00:01 # if you want to set MAC manually
    address 192.168.40.1
    netmask 255.255.255.0
    bridge_ports lan0 lan1 lan2 lan3 enxa0cec8c8862d
    bridge_fd 5
    bridge_stp no

auto wan
iface wan inet dhcp
    hwaddress ether 08:00:00:00:00:01 # if you want to set MAC manually
    pre-up ip link set $IFACE up
    post-down ip link set $IFACE down

# My RealTeak 8153 USB ethernet adapter:
auto enxa0cec8c8862d
allow-hotplug enxa0cec8c8862d
iface enxa0cec8c8862d inet static
    pre-up ip link set $IFACE up
    post-down ip link set $IFACE down

source-directory /etc/network/interfaces.d

Does this look right? It seems to work…

You can drop the 3 indented lines from lan ports,but except this it should be right

And you don’t need preup/postdown for your realtek card. This is only needed for eth0 to force it up before configuring the other interfaces. But you miss ip config for the realtek card

Configuration information withdrawn.

1 Like

2 notes:

Adding rc.local is not enough in debian 10,it needs a systemd service file to get called (afair already done in my image)

Debian 10 has moved to nftables so iptables is callable with iptables-legacy

Armbian also has Ubuntu Focal and Debian Buster for the BPi R2