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
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: 18.104.22.168 DNS Servers: 22.214.171.124 126.96.36.199 188.8.131.52
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