ansible.fftdf.supernode/files/l2tp_backbone.sh.exit.j2

42 lines
1.6 KiB
Plaintext
Raw Normal View History

#!/bin/sh
2016-06-11 11:57:07 +00:00
# Version 9
sleep 60
batctl=/usr/local/sbin/batctl
ip=/sbin/ip
2016-06-11 11:57:07 +00:00
communitymacaddress="a2:8c:ae:6f:f6"
localserver=$(/bin/hostname)
2016-06-11 15:55:25 +00:00
communityname=troisdorf
2016-06-11 11:57:07 +00:00
# L2tp to Map
$ip l2tp add tunnel remote 138.201.70.103 local $(/bin/hostname -I | /usr/bin/cut -f1 -d' ') tunnel_id {{ sn_number }}0 peer_tunnel_id 0{{ sn_number }} encap udp udp_sport 300{{ sn_number }}0 udp_dport 3000{{ sn_number }}
$ip l2tp add session name l2tp-map tunnel_id {{ sn_number }}0 session_id 1{{ sn_number }}0 peer_session_id 2{{ sn_number }}0
$ip link set dev l2tp-map mtu 1312
$ip link set up l2tp-map
$batctl if add l2tp-map
2016-06-11 11:57:07 +00:00
# Rest Starten
$ip link set address $communitymacaddress:0${localserver#$communityname} dev bat0
$ip link set up dev bat0
2016-05-17 21:42:37 +00:00
$ip addr add {{ sn_mesh_IPv4 }}/19 broadcast {{ sn_mesh_IPv4_brcast }} dev bat0
$ip -6 addr add {{ sn_mesh_IPv6 }}/64 dev bat0
2016-05-26 20:38:20 +00:00
$ip route add 10.188.0.0/16 via {{ sn_mesh_IPv4_xfer }} table 42
$ip route add 10.188.0.0/16 via {{ sn_mesh_IPv4_xfer }}
2016-07-02 21:11:08 +00:00
$ip -6 route add 2a03:2260:121:4000::/52 via {{ sn_mesh_IPv6_xfer }} table 42
$ip -6 route add 2a03:2260:121:5000::/52 via {{ sn_mesh_IPv6_xfer }} table 42
$ip -6 route add 2a03:2260:121:6000::/52 via {{ sn_mesh_IPv6_xfer }} table 42
$ip -6 route add 2a03:2260:121:7000::/52 via {{ sn_mesh_IPv6_xfer }} table 42
/usr/bin/killall batadv-vis
/bin/sleep 15
$batadv -i bat0 -s > /dev/null 2>&1 &
2016-07-20 19:14:37 +00:00
/bin/sleep 15
/usr/sbin/service tunneldigger restart
/usr/sbin/service bind9 restart
/usr/sbin/service bird restart
/usr/sbin/service bird6 restart
/usr/sbin/service isc-dhcp-server restart
/usr/sbin/service radvd restart
2016-07-29 17:01:38 +00:00
$batctl gw server 100Mbit/100Mbit
2016-07-20 19:14:37 +00:00