batman.cfg.j2 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. # batman-adv mesh interface
  2. # Dummy-Interface als MainIF mit manueller MAC fuer batman-adv
  3. auto batman-dummy0
  4. iface batman-dummy0 inet manual
  5. pre-up ip link add $IFACE type dummy
  6. pre-up ip link set address {{batman_mesh_mac}} dev $IFACE
  7. pre-up ip link set up dev $IFACE
  8. post-down ip link set down dev $IFACE
  9. post-down ip link del dev $IFACE
  10. up batctl if add $IFACE
  11. # batman-adv Mesh Interface, wird von meshdummy0 per Hotplug aktiviert
  12. allow-hotplug bat0
  13. iface bat0 inet static
  14. address {{batman_mesh_ipv4|ipaddr('address')}}
  15. netmask {{batman_mesh_ipv4|ipaddr('netmask')}}
  16. hwaddress {{batman_bat_mac}}
  17. pre-up ip rule add from {{batman_mesh_ipv4}} table 42
  18. pre-up ip rule add to {{batman_mesh_ipv4}} table 42
  19. pre-up batctl it 5000
  20. pre-up batctl bl 0
  21. {% if batman_gateway %}
  22. pre-up batctl gw server 48mbit/48mbit
  23. {% endif %}
  24. pre-up echo 120 > /sys/class/net/$IFACE/mesh/hop_penalty
  25. post-down ip rule del from {{batman_mesh_ipv4}} table 42
  26. post-down ip rule del to {{batman_mesh_ipv4}} table 42
  27. iface bat0 inet6 static
  28. address {{batman_mesh_ipv6}}