You are not logged in.
When I add a netdev and networking configuration for networkd to my archlinux box, in about ~5 hours, my network starts struggling and devices begin reporting offline
Linux Fractal.server.com 6.6.65-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 11 Dec 2024 15:35:54 +0000 x86_64 GNU/Linux
Situation:
My network: 192.168.2.0 / 255.255.255.0
The server is at 192.168.2.24
Router is a Deco XE5300 mesh system (gateway at 192.168.2.1). DHCP hands out addresses at 192.168.2.100 and beyond (so .0-.99 reserved)
I run ~20 docker containers, one of which has been assigned an ip address of 192.168.2.80. I do this so that I can expose ports already used on the main server IP 192.168.2.24
However, the situation I described below happens even when this network container has not been run - so the docker container is likely not relevant
When the networkd config files for the macvlan are present (below) on my server, and I reboot it, after about 4-5 hours, other IoT devices on my network start dropping out and reporting offline (e.g., ring devices, MyQ garage door opener, etc), and then get their connetion back, but then drop again. Everything becomes unreliable. I have not located any specific error messages. My server continues to function, and when the docker .80 container is run, everything works as expected and it is accessible network-wide.
Most likely, i am not doing something right in one of these two files below. Can you check them out for me? the other option is that I've just blown the mind of my poor deco router with this macvlan.
FILE: /etc/systemd/networkd/00-mynet-shim.netdev
[NetDev]
Name=mynet-shim
Kind=macvlan
[MACVLAN]
Mode=bridge
FILE: /etc/systemd/networkd/00-mynet-shim.network
[Match]
Name=mynet-shim
[Network]
Address=192.168.2.86/32
Gateway=192.168.2.1
DNS=8.8.8.8
[Route]
Destination=192.168.2.80/29
<edited for typo>
Last edited by gregbert (2025-01-02 00:50:22)
Offline
Sorry gregbert, but did you actually take a look at the Wiki, as I suggested in your other thread?
Your configuration looks like you took a nail gun and tacked a MACVLAN bridge on top of the Ethernet (192.168.2.24) configuration. Your configuration is wrong on multiple levels and I honestly don't know where to begin.
Offline
No, i did not. These looked far more complicated than the instructions I found elsewhere. But given those other instructions have not led me to a good place, I will return to these.
edit: working through macvlan.
Last edited by gregbert (2025-01-01 20:17:43)
Offline
The part i get confused about is at the very beginning of section 3.3, where i am meant to "attach the underlying Ethernet network interface to MACVLAN and make sure it does not get assigned IP addresses."
But my enp8s0 ethernet device, which is I presume what i should be attaching it to, already has an IP address and is configured by 20-wired.network. What am I missing?
/etc/systemd/network/30-enp1s0.network
[Match]
Name=enp1s0
[Link]
RequiredForOnline=carrier
[Network]
MACVLAN=mv-0
DHCP=no
IPv6AcceptRA=false
LinkLocalAddressing=no
MulticastDNS=false
LLMNR=false
Offline
You make the ethernet device "enp1s0" a slave to the bridge "mv-0". It looses it's own ip address and network functionality. That's intended. Delete (or move) "20-wired.network".
The next step is to create the bridge device ("25-mv-0.netdev") and finally give the bridge the ip address that "enp1s0" had before:
/etc/systemd/network/35-mv-0.network
[Match]
Name=mv-0
[Link]
RequiredForOnline=routable
[Network]
BindCarrier=enp1s0
DNS=192.168.2.1
Address=192.168.2.24/24
Gateway=192.168.2.1
You "move" the network functionality from the Ethernet device to the bridge.
Offline
That explanation helped tremendously. So enp8s0 is a multi-purpose device without an IP address, and mv-0 links to it - as well as my docker container.
I followed that logic through and everything is up and running. the only difference was that i did not have any '/etc/nspawn' directory. But here is my docker-compose.yaml file, which seems to have everything it needs in the network designation.I probably do not need to give it the /26 subnet below. i will tighten that up. not sure its even needed.
services:
node-red:
container_name: node-red
restart: unless-stopped
image: nodered/node-red:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/remote_fs_user/conf/node_red/data:/data
environment:
TZ: "America/New_York"
user: 1000:977
group_add:
- 1000
networks:
dockervlan:
ipv4_address: 192.168.2.60
networks:
dockervlan:
name: dockervlan
driver: macvlan
driver_opts:
parent: enp8s0
ipam:
config:
- subnet: "192.168.2.0/24"
ip_range: "192.168.2.64/26"
gateway: "192.168.2.1"
Thank you very much for your help. It is greatly appreciated.
Hopefully i will not see any network anomalies like i did with my previous configuration, which came off of a blog I found.
Offline
Nice.
Your docker composer file looks O.K. to me - hopefully that solved the network hiccups.
Offline