0

I’m trying to create a secondary router with a Raspberry Pi 3B but somehow keep making the same error and missing some instruction. Maybe I’m using the wrong term which is why it’s not working – I’m not sure. What I want to do is create a second network which is totally independent of the one I have now, and computers on one network cannot see much less ‘talk’ to he ones on the second network:

ISP --- Router (192.168.4.1) --- Ethernet Switch --- > to computers and devices on 192.168.4.x | RPi eth0= 192.168.4.80 eth1= 192.168.1.x (via USB to Ethernet adapter) → computers and devices on isolated subnet

How the above is supposed to look

eth0 was assigned IP 192.168.4.80 – can be almost anything on the 4 subnet eth1 can be anything except the 4 subnet

Right now the RPi Router works on the eth0 side – I can go to websites via Chromium. Move the Ethernet cable to eth1, becomes 192.168.4.81, and it communicates to the outside world.

The ‘output’ of RPi (supposed to be the 1 subnet) never displays an IP address per ifconfig. It is doing something as the indicator LEDs are on and occasionally flicker to indicate some activity. A ‘Test RPi’ on the 1 subnet shows 169.254.21.46 per ifconfig on it. That IP seems to indicate ‘close but no cee-gar’.

Something else which is probably significant is on the RPi Router (with eth0 and eth1) the Ethernet Icon has the up and down arrows with x’s through and hover over “Connection to dhcpcd lost”. ...The instructions I’ve been following indicate there should be one at /etc/dhcp/dhcpd.conf but yet also seemed to have said to remove because of conflicting (see what I’m following below). The Test RPi (‘load’ computer on the 1 subnet) has /etc/dhcpd.conf so tried it there. Didn’t seem to fix anything so removed.

OK, now for the instructions I’ve been following. To save space I’ll list his (?) section headings with my comments.

Use systemd-networkd for general networking ♦ Abstract Apparently he prefers systemd-networkd over dhcpcd and later there are instruct ructions to remove the latter. Probably explains why I don’t have dhcpcd.conf.

♦ Quick Step No issues noted here. I copy and paste so no typos on my part.
He has the comment “But don't forget to configure the network interfaces with files in /etc/systemd/network/.” I’ve got three files: 04-eth1.network 04-wired.network 99-default.link.
The ‘99’ one doesn’t display anything with cat’ also bright white on black. The ‘04’ files were written from a command sequence later in the instructions.

♦ Create interface file for a wired connection OK, the two ‘04’ files wre created here. I used his default/preferred DHCP option. (Waitaminute: one of the instructions told me to remove dhcp. ‘Muzbe’ something different.)

At this point I made a backup of the microSD card

♦ Create interface file for a WiFi connection I skipped this section as I don’t want/need WiFi on the 1 subnet. I had gone though the instructions again to check for errors and doesn’t look like anything in this section is needed a wired connection (eth1).

♦ Details to enable systemd-networkd Everything seemed to go as it should.

♦ Details to enable systemd-resolved Check D-Bus software interface → returned active/running Configure NSS software interface For troubleshooting you may have a look at /etc/nsswitch.conf. It should contain a line like this: hosts: files resolve [!UNAVAIL=return] dns ← I’ve got that Configure DNS stub listener interface And no, I did not reboot. And shouldn’t be any problem with power glitches as plugged into a UPS.

Check name resolution Well here I start having some differences…. I’ll quote his/the instructions and add my comments (BJM: blah-blah)

resolvectl status Global LLMNR setting: yes MulticastDNS setting: yes DNSOverTLS setting: no DNSSEC setting: allow-downgrade DNSSEC supported: yes --- snip ---

BJM: so far, so good, and that’s his ‘snip’ up there.

Link 3 (wlan0) BJM: I don’t have and didn’t do the wireless section so I don’t have this section.

Link 2 (eth0) Current Scopes: none DefaultRoute setting: no LLMNR setting: yes MulticastDNS setting: no DNSOverTLS setting: no DNSSEC setting: allow-downgrade DNSSEC supported: yes BJM: So what I have is:

Link 4 (eth1) Current Scopes: LLMNR/IPv6 mDNS/IPv6 DefaultRoute setting: no LLMNR setting: yes MulticastDNS setting: yes DNSOverTLS setting: no DNSSEC setting: allow-downgrade DNSSEC supported: yes

Link 3 (wlan0) Current Scopes: none DefaultRoute setting: no LLMNR setting: yes MulticastDNS setting: no DNSOverTLS setting: no DNSSEC setting: allow-downgrade DNSSEC supported: yes

Link 2 (eth0) Current Scopes: DNS mDNS/IPv4 DefaultRoute setting: yes LLMNR setting: no MulticastDNS setting: yes DNSOverTLS setting: no DNSSEC setting: allow-downgrade DNSSEC supported: yes Current DNS Server: 206.225.75.225 DNS Servers: 206.225.75.225 206.225.75.226 184.170.172.131

Obviously different from his. And I just noticed the DNS Servers aren’t what I use. No idea where they came from; not found in my work document. (Nothing against those servers, just I use others because they tested as faster responding.)

♦ Quirks and troubleshooting Comes next in the original instructions but I had (initially) found the instructions for what I think I want to do, by the same author as the above instructions, so skipped to here:

Configuring Raspberry pi as Router, Wifi and Ethernet Bridge ♦ Configure routing between up-link eth1 and the bridge br0 Nobody whining as go through the instruction, but somewhere along the line I lost the br0 part. ifconfig told me I had a bridge at one time – I remember because I thought it odd br0 and eth0 had the same IP address as it seems the instructions implied eth0 should list nothing.

I apologize for the admittedly extreme length – trying to give information but I don’t know where things went wrong

TIA Barry

  • Hi Folks! Update. Did find an error in /etc/systemd/network/16-br0_up.network : I had [Network] Address=192.168.1.1/24 which journalctl -b -u systemd-networkd said was an invalid address. When I changed to “Address=192.168.4.1/24” no errors listed but my RPi Test ‘load computer’ still isn’t getting a working IP: still gets 168.254.21.46; I unplug Ethernet to reset. Not sure 192.168.4.1 address is right: is my current LAN network and in the instructions I’ve been trying to follow appears that’s his private/new network (which is why I originally selected 192.168.1.1). Barry – Barry Martin Aug 16 '21 at 16:25

1 Answers1

0

Looks like I figured out something to make my Raspberry Pi 3B Router give me a somewhat private second network.

Created a file at /etc/network/interfaces containing:

auto br0 iface br0 inet manual bridge_ports eth1 br0 bridge_stp on

The ‘auto br0’ starts the bridge at boot. The iface parts: ‘manual’ ==> bridge not meant to have an IP address ‘bridge_ports’ ==> which ports to bridge together. The site I obtained this from originally had ‘eth0 eth1’, which ‘moved’ eth0 to a 10.0.0.x address – forgot which but darn hard to connect to my 192.168.4.x network! WAG’d my options and ta-dahh! worked!! ‘bridge_stp on’ ==> Spanning Tree Protocol. Not really sure what it does other than if the bridge can create a loop in the network should be set to ‘on’, but ‘off’ will decrease the time it takes to add in a new link. Was set to ‘on’ in the example; I wait longer for the 3B Pi’s to do their normal boot process and don’t notice any additional wait time, so probably safer to leave it on.

The file was found at either http://www.microhowto.info/troubleshooting/troubleshooting_ethernet_bridging_on_linux.html or http://www.microhowto.info/howto/persistently_bridge_traffic_between_two_or_more_ethernet_interfaces_on_debian.html

Same site, two different troubleshooting pages which helped me figure out my mess.

Now to try to isolate the 10.0.x.x network: I can’t ping into it but I can ping from it to my main network. That’s a different thread.

Barry