Created
July 2, 2015 10:16
-
-
Save tcatm/c1c750df826b5f0169ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 1ee8a9f4ac5c709b745c81922e27a7997cdacb59 (HEAD -> refs/heads/base) | |
Author: Nils Schneider <[email protected]> | |
Date: Wed Jul 1 21:53:27 2015 +0200 | |
2nd fastd instance using mtu 1280 | |
diff --git a/host_vars/burgtor.yml b/host_vars/burgtor.yml | |
index 302a283..949e137 100644 | |
--- a/host_vars/burgtor.yml | |
+++ b/host_vars/burgtor.yml | |
@@ -2,6 +2,7 @@ ip4: 10.130.0.255 | |
ip6: 2001:67c:2d50::e01 | |
ip6_ula: fdef:ffc0:3dd7::e01 | |
fastd_mac: 52:54:00:f3:62:d9 | |
+fastd_mac_2: ea:af:13:66:6d:71 | |
fastd_gw_mac: 52:54:00:f3:62:da | |
freifunk_mac: 52:54:00:ee:5c:d7 | |
dhcpd_start: 10.130.12.63 | |
diff --git a/host_vars/holstentor.yml b/host_vars/holstentor.yml | |
index b7fc312..669c093 100644 | |
--- a/host_vars/holstentor.yml | |
+++ b/host_vars/holstentor.yml | |
@@ -2,6 +2,7 @@ ip4: 10.130.0.253 | |
ip6: 2001:67c:2d50::c01 | |
ip6_ula: fdef:ffc0:3dd7::c01 | |
fastd_mac: d6:89:49:08:f6:9d | |
+fastd_mac_2: ce:69:95:f0:a9:53 | |
fastd_gw_mac: d6:89:49:08:f6:9e | |
freifunk_mac: 52:54:00:0c:bb:eb | |
dhcpd_start: 10.130.4.191 | |
diff --git a/host_vars/huextertor.yml b/host_vars/huextertor.yml | |
index c17dd10..d975e39 100644 | |
--- a/host_vars/huextertor.yml | |
+++ b/host_vars/huextertor.yml | |
@@ -2,6 +2,7 @@ ip4: 10.130.0.252 | |
ip6: 2001:67c:2d50::801 | |
ip6_ula: fdef:ffc0:3dd7::801 | |
fastd_mac: d2:d0:93:63:f7:da | |
+fastd_mac_2: 66:3a:16:58:af:5c | |
fastd_gw_mac: d2:d0:93:63:f7:db | |
freifunk_mac: 6e:e4:d2:8a:3b:63 | |
dhcpd_start: 10.130.1.0 | |
diff --git a/host_vars/muehlentor.yml b/host_vars/muehlentor.yml | |
index 95aa675..296662c 100644 | |
--- a/host_vars/muehlentor.yml | |
+++ b/host_vars/muehlentor.yml | |
@@ -2,6 +2,7 @@ ip4: 10.130.0.254 | |
ip6: 2001:67c:2d50::a01 | |
ip6_ula: fdef:ffc0:3dd7::a01 | |
fastd_mac: 26:9c:57:9b:5c:b2 | |
+fastd_mac_2: 6a:0a:8d:97:50:69 | |
fastd_gw_mac: 26:9c:57:9b:5c:b3 | |
freifunk_mac: de:ad:ca:fe:46:1d | |
dhcpd_start: 10.130.8.127 | |
diff --git a/roles/base/files/etc/fastd/ffhl-mesh-vpn-2/fastd.conf b/roles/base/files/etc/fastd/ffhl-mesh-vpn-2/fastd.conf | |
new file mode 100644 | |
index 0000000..a40a2f7 | |
--- /dev/null | |
+++ b/roles/base/files/etc/fastd/ffhl-mesh-vpn-2/fastd.conf | |
@@ -0,0 +1,16 @@ | |
+log to syslog level debug; | |
+user "fastd"; | |
+interface "ffhl-mesh-vpn-2"; | |
+method "salsa2012+umac"; | |
+bind any:10002; | |
+include "../ffhl-mesh-vpn/secret.conf"; | |
+mtu 1280; | |
+hide ip addresses yes; | |
+status socket "/run/fastd/mesh-vpn-2.sock"; | |
+ | |
+include peers from "../ffhl-mesh-vpn/peers"; | |
+ | |
+on up " | |
+ ip link set address $(cat mac) dev $INTERFACE | |
+ ip link set up $INTERFACE | |
+"; | |
diff --git a/roles/base/files/etc/systemd/network/25-ffhl-mesh-vpn-2.network b/roles/base/files/etc/systemd/network/25-ffhl-mesh-vpn-2.network | |
new file mode 100644 | |
index 0000000..a72a611 | |
--- /dev/null | |
+++ b/roles/base/files/etc/systemd/network/25-ffhl-mesh-vpn-2.network | |
@@ -0,0 +1,2 @@ | |
+[Match] | |
+Name=ffhl-mesh-vpn-2 | |
diff --git a/roles/base/files/etc/systemd/system/[email protected] b/roles/base/files/etc/systemd/system/[email protected] | |
index 888c2b0..52c66fc 100644 | |
--- a/roles/base/files/etc/systemd/system/[email protected] | |
+++ b/roles/base/files/etc/systemd/system/[email protected] | |
@@ -1,13 +1,14 @@ | |
[Unit] | |
Description=batman setup for freifunk | |
Wants=network.target | |
-BindsTo=sys-subsystem-net-devices-ff%i\x2dmesh\x2dvpn.device sys-subsystem-net-devices-ff%i\x2dgw\x2dvpn.device | |
-After=sys-subsystem-net-devices-ff%i\x2dmesh\x2dvpn.device sys-subsystem-net-devices-ff%i\x2dgw\x2dvpn.device | |
+BindsTo=sys-subsystem-net-devices-ff%i\x2dmesh\x2dvpn.device sys-subsystem-net-devices-ff%i\x2dmesh\x2dvpn\x2d2.device sys-subsystem-net-devices-ff%i\x2dgw\x2dvpn.device | |
+After=sys-subsystem-net-devices-ff%i\x2dmesh\x2dvpn.device sys-subsystem-net-devices-ff%i\x2dmesh\x2dvpn\x2d2.device sys-subsystem-net-devices-ff%i\x2dgw\x2dvpn.device | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/batctl -m mesh-%i if add ff%i-mesh-vpn | |
+ExecStart=/usr/bin/batctl -m mesh-%i if add ff%i-mesh-vpn-2 | |
ExecStart=/usr/bin/batctl -m mesh-%i if add ff%i-gw-vpn | |
ExecStart=/usr/bin/batctl -m mesh-%i gw server | |
ExecStart=-/usr/bin/batctl -m mesh-%i nc disable | |
diff --git a/roles/base/files/post-merge/ffhl-mesh-vpn b/roles/base/files/post-merge/ffhl-mesh-vpn | |
index fd76ee7..1814e2e 100755 | |
--- a/roles/base/files/post-merge/ffhl-mesh-vpn | |
+++ b/roles/base/files/post-merge/ffhl-mesh-vpn | |
@@ -1,5 +1,6 @@ | |
#!/bin/sh | |
systemctl reload 'fastd@ffhl\x2dmesh\x2dvpn.service' | |
+systemctl reload 'fastd@ffhl\x2dmesh\x2dvpn\x2d2.service' | |
exit 0 | |
diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml | |
index 6eae070..8ce4b98 100644 | |
--- a/roles/base/tasks/main.yml | |
+++ b/roles/base/tasks/main.yml | |
@@ -11,6 +11,7 @@ | |
ignore_errors: True | |
- file: state=link src=/usr/share/zoneinfo/Europe/Berlin dest=/etc/localtime | |
- template: src=fastd-mac.j2 dest=/etc/fastd/ffhl-mesh-vpn/mac | |
+- template: src=fastd-mac-2.j2 dest=/etc/fastd/ffhl-mesh-vpn-2/mac | |
- template: src=fastd-gw-mac.j2 dest=/etc/fastd/ffhl-gw-vpn/mac | |
- template: src=dhcpd.conf.j2 dest=/etc/dhcpd.conf | |
- template: src=radvd.conf.j2 dest=/etc/radvd.conf | |
diff --git a/roles/base/tasks/units.yml b/roles/base/tasks/units.yml | |
index a4e8572..d49652e 100644 | |
--- a/roles/base/tasks/units.yml | |
+++ b/roles/base/tasks/units.yml | |
@@ -9,6 +9,7 @@ | |
- bird.service | |
- dhcpd4.service | |
- "'fastd@ffhl\\x2dmesh\\x2dvpn.service'" | |
+ - "'fastd@ffhl\\x2dmesh\\x2dvpn\\x2d2.service'" | |
- "'fastd@ffhl\\x2dgw\\x2dvpn.service'" | |
- freifunk-ip-rule.service | |
- haveged.service | |
diff --git a/roles/base/templates/fastd-mac-2.j2 b/roles/base/templates/fastd-mac-2.j2 | |
new file mode 100644 | |
index 0000000..1a27d4c | |
--- /dev/null | |
+++ b/roles/base/templates/fastd-mac-2.j2 | |
@@ -0,0 +1 @@ | |
+{{ fastd_mac_2 }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment