]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: mark container/VM/namespace networks as not required for online + disable...
authorLennart Poettering <lennart@poettering.net>
Fri, 7 Feb 2025 17:08:51 +0000 (18:08 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 9 Feb 2025 10:37:38 +0000 (19:37 +0900)
These networks are not connections to upstream routers, but where we are
ourselves are the upstream router, hence it doesn't make too much sense
to require them to be up as default to determine if we are "online",
because they lead "in the wrong direction".

Also, disable DHCP lease persistency for these networks, since
container/VM/namespaces are generally shortlived, and typically have no
persistent identity. Moreover, the IP range we assign each VM/container
connection is just too small to permit persistency, as otherwise we'll
run out of leases way too quickly if VM/containers are restarted a bunch of
times with different MAC addresses (which I ran into).

I think these are better defaults, but of course these are only
defaults.

network/80-container-vb.network
network/80-container-ve.network
network/80-container-vz.network
network/80-namespace-ns.network
network/80-vm-vt.network

index 07a407208bb461f79eb387d1a2b02b14763849f9..162597d781a7ea54525d37a053ed08ed9bfc0250 100644 (file)
@@ -14,6 +14,9 @@
 Kind=veth
 Name=vb-*
 
+[Link]
+RequiredForOnline=no
+
 [Network]
 KeepMaster=yes
 LinkLocalAddressing=no
index 4cb15ca9578c39269731c24445caacc21a976f98..69c534f4e1bc5d864cd403a0719c403b95372e2c 100644 (file)
@@ -14,6 +14,9 @@
 Kind=veth
 Name=ve-*
 
+[Link]
+RequiredForOnline=no
+
 [Network]
 # Default to using a /28 prefix, giving up to 13 addresses per container.
 Address=0.0.0.0/28
@@ -24,3 +27,6 @@ LLDP=yes
 EmitLLDP=customer-bridge
 IPv6AcceptRA=no
 IPv6SendRA=yes
+
+[DHCPServer]
+PersistLeases=no
index fd7cc1a4c9e123b4b6627ca9f961722c3aea806e..2dc5d87e23bca38ac4acec5a842220a56336cf7b 100644 (file)
@@ -13,6 +13,9 @@
 Kind=bridge
 Name=vz-*
 
+[Link]
+RequiredForOnline=no
+
 [Network]
 # Default to using a /24 prefix, giving up to 253 addresses per virtual network.
 Address=0.0.0.0/24
@@ -23,3 +26,6 @@ LLDP=yes
 EmitLLDP=customer-bridge
 IPv6AcceptRA=no
 IPv6SendRA=yes
+
+[DHCPServer]
+PersistLeases=no
index 9c945d47c934142ae07a3b07c3b227da34bf4cb6..cd1a819973e6b34a26cda2ba3b726f290e73faca 100644 (file)
@@ -14,6 +14,9 @@
 Kind=veth
 Name=ns-*
 
+[Link]
+RequiredForOnline=no
+
 [Network]
 # Default to using a /28 prefix, giving up to 13 addresses per namespace
 Address=0.0.0.0/28
@@ -24,3 +27,6 @@ LLDP=yes
 EmitLLDP=customer-bridge
 IPv6AcceptRA=no
 IPv6SendRA=yes
+
+[DHCPServer]
+PersistLeases=no
index 3bd36a6b10ed53bccf6658e5c706455bcc92e95e..a7c0f770893c3fcb1bf7d440be0cff6fba127368 100644 (file)
@@ -13,6 +13,9 @@
 Kind=tun
 Name=vt-*
 
+[Link]
+RequiredForOnline=no
+
 [Network]
 # Default to using a /28 prefix, giving up to 13 addresses per VM.
 Address=0.0.0.0/28
@@ -23,3 +26,6 @@ LLDP=yes
 EmitLLDP=customer-bridge
 IPv6AcceptRA=no
 IPv6SendRA=yes
+
+[DHCPServer]
+PersistLeases=no