summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/80-6rd-tunnel.link19
-rw-r--r--network/80-6rd-tunnel.network9
-rw-r--r--network/80-container-host0-tun.network22
-rw-r--r--network/80-container-host0.network7
-rw-r--r--network/80-container-vb.link19
-rw-r--r--network/80-container-vb.network13
-rw-r--r--network/80-container-ve.link19
-rw-r--r--network/80-container-ve.network9
-rw-r--r--network/80-container-vz.link18
-rw-r--r--network/80-container-vz.network7
-rw-r--r--network/80-namespace-ns.link19
-rw-r--r--network/80-namespace-ns.network26
-rw-r--r--network/80-vm-vt.link18
-rw-r--r--network/80-vm-vt.network7
-rw-r--r--network/80-wifi-adhoc.network7
-rw-r--r--network/99-default.link7
-rw-r--r--network/meson.build8
17 files changed, 181 insertions, 53 deletions
diff --git a/network/80-6rd-tunnel.link b/network/80-6rd-tunnel.link
new file mode 100644
index 0000000..a557540
--- /dev/null
+++ b/network/80-6rd-tunnel.link
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# This .link file matches 6rd-* SIT devices and marks them as managed by
+# systemd-networkd.
+
+[Match]
+Kind=sit
+OriginalName=6rd-*
+
+[Link]
+NamePolicy=keep
+MACAddressPolicy=persistent
+Property=ID_NET_MANAGED_BY=io.systemd.Network
diff --git a/network/80-6rd-tunnel.network b/network/80-6rd-tunnel.network
index 5374ec5..dd89e4d 100644
--- a/network/80-6rd-tunnel.network
+++ b/network/80-6rd-tunnel.network
@@ -3,15 +3,10 @@
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
-# To make local modifications, one of the following methods may be used:
-# 1. add a drop-in file that extends this file by creating the
-# /etc/systemd/network/80-6rd-tunnel.network.d/ directory and creating a
-# new .conf file there.
-# 2. copy this file into /etc/systemd/network or one of the other paths checked
-# by systemd-networkd and edit it there.
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
# This file should not be edited in place, because it'll be overwritten on upgrades.
-# This network file matches 6rd-* SIT devices which is automatically created by
+# This .network file matches 6rd-* SIT devices which is automatically created by
# systemd-networkd when DHCPv4 6RD option is received.
[Match]
diff --git a/network/80-container-host0-tun.network b/network/80-container-host0-tun.network
new file mode 100644
index 0000000..1a50512
--- /dev/null
+++ b/network/80-container-host0-tun.network
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# This network file is inside unprivileged containers that rely on network being
+# provided as a tun link via slirp4netns(1) or pasta(1).
+
+[Match]
+Kind=tun
+Name=host0
+Virtualization=container
+
+[Network]
+DHCP=yes
+LinkLocalAddressing=yes
+
+[DHCP]
+UseTimezone=yes
diff --git a/network/80-container-host0.network b/network/80-container-host0.network
index b79e701..ecf6420 100644
--- a/network/80-container-host0.network
+++ b/network/80-container-host0.network
@@ -3,12 +3,7 @@
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
-# To make local modifications, one of the following methods may be used:
-# 1. add a drop-in file that extends this file by creating the
-# /etc/systemd/network/80-container-host0.network.d/ directory and creating a
-# new .conf file there.
-# 2. copy this file into /etc/systemd/network or one of the other paths checked
-# by systemd-networkd and edit it there.
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
# This file should not be edited in place, because it'll be overwritten on upgrades.
# This network file matches the container-side of the virtual Ethernet link
diff --git a/network/80-container-vb.link b/network/80-container-vb.link
new file mode 100644
index 0000000..607ba02
--- /dev/null
+++ b/network/80-container-vb.link
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# This .link file matches the host-side of the virtual Ethernet link created
+# by systemd-nspawn's --network-veth switch with --network-bridge= or
+# --network-zone= switch. See systemd-nspawn(1) for details.
+
+[Match]
+Kind=veth
+OriginalName=vb-*
+
+[Link]
+NamePolicy=keep
+Property=ID_NET_MANAGED_BY=io.systemd.Network
diff --git a/network/80-container-vb.network b/network/80-container-vb.network
index 806f834..07a4072 100644
--- a/network/80-container-vb.network
+++ b/network/80-container-vb.network
@@ -3,17 +3,12 @@
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
-# To make local modifications, one of the following methods may be used:
-# 1. add a drop-in file that extends this file by creating the
-# /etc/systemd/network/80-container-vb.network.d/ directory and creating a
-# new .conf file there.
-# 2. copy this file into /etc/systemd/network or one of the other paths checked
-# by systemd-networkd and edit it there.
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
# This file should not be edited in place, because it'll be overwritten on upgrades.
-# This network file matches the host-side of the virtual Ethernet link
-# created by systemd-nspawn's --network-veth switch with --network-bridge or
-# --network-zone switch. See systemd-nspawn(1) for details.
+# This .network file matches the host-side of the virtual Ethernet link created
+# by systemd-nspawn's --network-veth switch with --network-bridge= or
+# --network-zone= switch. See systemd-nspawn(1) for details.
[Match]
Kind=veth
diff --git a/network/80-container-ve.link b/network/80-container-ve.link
new file mode 100644
index 0000000..6ed818b
--- /dev/null
+++ b/network/80-container-ve.link
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# This .link file matches the host-side of the virtual Ethernet link
+# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for
+# details.
+
+[Match]
+Kind=veth
+OriginalName=ve-*
+
+[Link]
+NamePolicy=keep
+Property=ID_NET_MANAGED_BY=io.systemd.Network
diff --git a/network/80-container-ve.network b/network/80-container-ve.network
index 076213a..4cb15ca 100644
--- a/network/80-container-ve.network
+++ b/network/80-container-ve.network
@@ -3,15 +3,10 @@
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
-# To make local modifications, one of the following methods may be used:
-# 1. add a drop-in file that extends this file by creating the
-# /etc/systemd/network/80-container-ve.network.d/ directory and creating a
-# new .conf file there.
-# 2. copy this file into /etc/systemd/network or one of the other paths checked
-# by systemd-networkd and edit it there.
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
# This file should not be edited in place, because it'll be overwritten on upgrades.
-# This network file matches the host-side of the virtual Ethernet link
+# This .network file matches the host-side of the virtual Ethernet link
# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for
# details.
diff --git a/network/80-container-vz.link b/network/80-container-vz.link
new file mode 100644
index 0000000..45b7632
--- /dev/null
+++ b/network/80-container-vz.link
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# This .link file matches the bridge interface created by systemd-nspawn's
+# --network-zone= switch. See systemd-nspawn(1) for details.
+
+[Match]
+Kind=bridge
+OriginalName=vz-*
+
+[Link]
+NamePolicy=keep
+Property=ID_NET_MANAGED_BY=io.systemd.Network
diff --git a/network/80-container-vz.network b/network/80-container-vz.network
index 7d570b2..fd7cc1a 100644
--- a/network/80-container-vz.network
+++ b/network/80-container-vz.network
@@ -3,12 +3,7 @@
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
-# To make local modifications, one of the following methods may be used:
-# 1. add a drop-in file that extends this file by creating the
-# /etc/systemd/network/80-container-vz.network.d/ directory and creating a
-# new .conf file there.
-# 2. copy this file into /etc/systemd/network or one of the other paths checked
-# by systemd-networkd and edit it there.
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
# This file should not be edited in place, because it'll be overwritten on upgrades.
# This network file matches the bridge interface created by systemd-nspawn's
diff --git a/network/80-namespace-ns.link b/network/80-namespace-ns.link
new file mode 100644
index 0000000..90b50cf
--- /dev/null
+++ b/network/80-namespace-ns.link
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# This network file matches the host-side of the virtual Ethernet link
+# created by systemd-nsresourced's network support. See systemd-nsresourced(1) for
+# details.
+
+[Match]
+Kind=veth
+OriginalName=ns-*
+
+[Link]
+NamePolicy=keep
+Property=ID_NET_MANAGED_BY=io.systemd.Network
diff --git a/network/80-namespace-ns.network b/network/80-namespace-ns.network
new file mode 100644
index 0000000..9c945d4
--- /dev/null
+++ b/network/80-namespace-ns.network
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# This network file matches the host-side of the virtual Ethernet link
+# created by systemd-nsresourced's network support. See systemd-nsresourced(1) for
+# details.
+
+[Match]
+Kind=veth
+Name=ns-*
+
+[Network]
+# Default to using a /28 prefix, giving up to 13 addresses per namespace
+Address=0.0.0.0/28
+LinkLocalAddressing=yes
+DHCPServer=yes
+IPMasquerade=both
+LLDP=yes
+EmitLLDP=customer-bridge
+IPv6AcceptRA=no
+IPv6SendRA=yes
diff --git a/network/80-vm-vt.link b/network/80-vm-vt.link
new file mode 100644
index 0000000..f9ba7a5
--- /dev/null
+++ b/network/80-vm-vt.link
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# This .link file matches vt-* TUN/TAP devices on the host and marks them as
+# managed by systemd-networkd.
+
+[Match]
+Kind=tun
+OriginalName=vt-*
+
+[Link]
+NamePolicy=keep
+Property=ID_NET_MANAGED_BY=io.systemd.Network
diff --git a/network/80-vm-vt.network b/network/80-vm-vt.network
index bb7942a..3bd36a6 100644
--- a/network/80-vm-vt.network
+++ b/network/80-vm-vt.network
@@ -3,12 +3,7 @@
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
-# To make local modifications, one of the following methods may be used:
-# 1. add a drop-in file that extends this file by creating the
-# /etc/systemd/network/80-vm-vt.network.d/ directory and creating a
-# new .conf file there.
-# 2. copy this file into /etc/systemd/network or one of the other paths checked
-# by systemd-networkd and edit it there.
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
# This file should not be edited in place, because it'll be overwritten on upgrades.
# This network file matches vt-* TUN/TAP devices and applies a similar
diff --git a/network/80-wifi-adhoc.network b/network/80-wifi-adhoc.network
index fd3faca..804d8d9 100644
--- a/network/80-wifi-adhoc.network
+++ b/network/80-wifi-adhoc.network
@@ -3,12 +3,7 @@
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
-# To make local modifications, one of the following methods may be used:
-# 1. add a drop-in file that extends this file by creating the
-# /etc/systemd/network/80-wifi-adhoc.network.d/ directory and creating a
-# new .conf file there.
-# 2. copy this file into /etc/systemd/network or one of the other paths checked
-# by systemd-networkd and edit it there.
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
# This file should not be edited in place, because it'll be overwritten on upgrades.
[Match]
diff --git a/network/99-default.link b/network/99-default.link
index 429ac31..56030b6 100644
--- a/network/99-default.link
+++ b/network/99-default.link
@@ -3,12 +3,7 @@
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
-# To make local modifications, one of the following methods may be used:
-# 1. add a drop-in file that extends this file by creating the
-# /etc/systemd/network/99-default.link.d/ directory and creating a
-# new .conf file there.
-# 2. copy this file into /etc/systemd/network or one of the other paths checked
-# by systemd-udevd and edit it there.
+# To make local modifications, use "networkctl edit". See networkctl(1) for details.
# This file should not be edited in place, because it'll be overwritten on upgrades.
[Match]
diff --git a/network/meson.build b/network/meson.build
index 2a472f4..6231d55 100644
--- a/network/meson.build
+++ b/network/meson.build
@@ -3,11 +3,19 @@
if conf.get('ENABLE_NETWORKD') == 1
install_data(
'80-6rd-tunnel.network',
+ '80-6rd-tunnel.link',
'80-container-host0.network',
+ '80-container-host0-tun.network',
'80-container-vb.network',
+ '80-container-vb.link',
'80-container-ve.network',
+ '80-container-ve.link',
'80-container-vz.network',
+ '80-container-vz.link',
+ '80-namespace-ns.network',
+ '80-namespace-ns.link',
'80-vm-vt.network',
+ '80-vm-vt.link',
'80-wifi-adhoc.network',
install_dir : networkdir)