summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/80-6rd-tunnel.network22
-rw-r--r--network/80-container-host0.network29
-rw-r--r--network/80-container-vb.network26
-rw-r--r--network/80-container-ve.network30
-rw-r--r--network/80-container-vz.network29
-rw-r--r--network/80-ethernet.network.example17
-rw-r--r--network/80-vm-vt.network29
-rw-r--r--network/80-wifi-adhoc.network19
-rw-r--r--network/80-wifi-ap.network.example19
-rw-r--r--network/80-wifi-station.network.example17
-rw-r--r--network/99-default.link20
-rw-r--r--network/meson.build23
12 files changed, 280 insertions, 0 deletions
diff --git a/network/80-6rd-tunnel.network b/network/80-6rd-tunnel.network
new file mode 100644
index 0000000..fb163e7
--- /dev/null
+++ b/network/80-6rd-tunnel.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, 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.
+# 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
+# systemd-networkd when DHCPv4 6RD option is received.
+
+[Match]
+Name=6rd-*
+Type=sit
+
+[Network]
+DHCPPrefixDelegation=yes
diff --git a/network/80-container-host0.network b/network/80-container-host0.network
new file mode 100644
index 0000000..3047667
--- /dev/null
+++ b/network/80-container-host0.network
@@ -0,0 +1,29 @@
+# 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, 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.
+# 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
+# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for
+# details.
+
+[Match]
+Virtualization=container
+Name=host0
+
+[Network]
+DHCP=yes
+LinkLocalAddressing=yes
+LLDP=yes
+EmitLLDP=customer-bridge
+
+[DHCP]
+UseTimezone=yes
diff --git a/network/80-container-vb.network b/network/80-container-vb.network
new file mode 100644
index 0000000..3a99ab8
--- /dev/null
+++ b/network/80-container-vb.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, 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.
+# 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.
+
+[Match]
+Name=vb-*
+Driver=veth
+
+[Network]
+KeepMaster=yes
+LinkLocalAddressing=no
+LLDP=yes
+EmitLLDP=nearest-bridge
diff --git a/network/80-container-ve.network b/network/80-container-ve.network
new file mode 100644
index 0000000..d295d13
--- /dev/null
+++ b/network/80-container-ve.network
@@ -0,0 +1,30 @@
+# 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, 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.
+# 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. See systemd-nspawn(1) for
+# details.
+
+[Match]
+Name=ve-*
+Driver=veth
+
+[Network]
+# Default to using a /28 prefix, giving up to 13 addresses per container.
+Address=0.0.0.0/28
+LinkLocalAddressing=yes
+DHCPServer=yes
+IPMasquerade=both
+LLDP=yes
+EmitLLDP=customer-bridge
+IPv6SendRA=yes
diff --git a/network/80-container-vz.network b/network/80-container-vz.network
new file mode 100644
index 0000000..7d902e7
--- /dev/null
+++ b/network/80-container-vz.network
@@ -0,0 +1,29 @@
+# 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, 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.
+# 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
+# --network-zone= switch. See systemd-nspawn(1) for details.
+
+[Match]
+Name=vz-*
+Driver=bridge
+
+[Network]
+# Default to using a /24 prefix, giving up to 253 addresses per virtual network.
+Address=0.0.0.0/24
+LinkLocalAddressing=yes
+DHCPServer=yes
+IPMasquerade=both
+LLDP=yes
+EmitLLDP=customer-bridge
+IPv6SendRA=yes
diff --git a/network/80-ethernet.network.example b/network/80-ethernet.network.example
new file mode 100644
index 0000000..ce82b25
--- /dev/null
+++ b/network/80-ethernet.network.example
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This example config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To use the file, one of the following methods may be used:
+# 1. add a symlink from /etc/systemd/network to the current location of this file,
+# 2. copy the file into /etc/systemd/network or one of the other paths checked
+# by systemd-networkd and edit it there.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+# Enable DHCPv4 and DHCPv6 on all ethernet links
+[Match]
+Type=ether
+
+[Network]
+DHCP=yes
diff --git a/network/80-vm-vt.network b/network/80-vm-vt.network
new file mode 100644
index 0000000..7979871
--- /dev/null
+++ b/network/80-vm-vt.network
@@ -0,0 +1,29 @@
+# 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, 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.
+# 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
+# configuration as ve-* to provide NAT/DHCP to VMs.
+
+[Match]
+Name=vt-*
+Driver=tun
+
+[Network]
+# Default to using a /28 prefix, giving up to 13 addresses per VM.
+Address=0.0.0.0/28
+LinkLocalAddressing=yes
+DHCPServer=yes
+IPMasquerade=both
+LLDP=yes
+EmitLLDP=customer-bridge
+IPv6SendRA=yes
diff --git a/network/80-wifi-adhoc.network b/network/80-wifi-adhoc.network
new file mode 100644
index 0000000..d7a341d
--- /dev/null
+++ b/network/80-wifi-adhoc.network
@@ -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, 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.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+[Match]
+Type=wlan
+WLANInterfaceType=ad-hoc
+
+[Network]
+LinkLocalAddressing=yes
diff --git a/network/80-wifi-ap.network.example b/network/80-wifi-ap.network.example
new file mode 100644
index 0000000..6ea1024
--- /dev/null
+++ b/network/80-wifi-ap.network.example
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This example config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To use the file, one of the following methods may be used:
+# 1. add a symlink from /etc/systemd/network to the current location of this file,
+# 2. copy the file into /etc/systemd/network or one of the other paths checked
+# by systemd-networkd and edit it there.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+[Match]
+Type=wlan
+WLANInterfaceType=ap
+
+[Network]
+Address=0.0.0.0/24
+DHCPServer=yes
+IPMasquerade=both
diff --git a/network/80-wifi-station.network.example b/network/80-wifi-station.network.example
new file mode 100644
index 0000000..160b4eb
--- /dev/null
+++ b/network/80-wifi-station.network.example
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This example config file is installed as part of systemd.
+# It may be freely copied and edited (following the MIT No Attribution license).
+#
+# To use the file, one of the following methods may be used:
+# 1. add a symlink from /etc/systemd/network to the current location of this file,
+# 2. copy the file into /etc/systemd/network or one of the other paths checked
+# by systemd-networkd and edit it there.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+[Match]
+Type=wlan
+WLANInterfaceType=station
+
+[Network]
+DHCP=yes
diff --git a/network/99-default.link b/network/99-default.link
new file mode 100644
index 0000000..429ac31
--- /dev/null
+++ b/network/99-default.link
@@ -0,0 +1,20 @@
+# 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, 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.
+# This file should not be edited in place, because it'll be overwritten on upgrades.
+
+[Match]
+OriginalName=*
+
+[Link]
+NamePolicy=keep kernel database onboard slot path
+AlternativeNamesPolicy=database onboard slot path
+MACAddressPolicy=persistent
diff --git a/network/meson.build b/network/meson.build
new file mode 100644
index 0000000..5e10c86
--- /dev/null
+++ b/network/meson.build
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+if conf.get('ENABLE_NETWORKD') == 1
+ install_data('80-6rd-tunnel.network',
+ '80-container-host0.network',
+ '80-container-vb.network',
+ '80-container-ve.network',
+ '80-container-vz.network',
+ '80-ethernet.network.example',
+ '80-vm-vt.network',
+ '80-wifi-adhoc.network',
+ '80-wifi-ap.network.example',
+ '80-wifi-station.network.example',
+ install_dir : networkdir)
+
+ if install_sysconfdir
+ meson.add_install_script('sh', '-c',
+ mkdir_p.format(sysconfdir / 'systemd/network'))
+ endif
+endif
+
+install_data('99-default.link',
+ install_dir : networkdir)