You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ffmyk-ansible/roles/setup_batman/files/ffmyk-iproute.sh

21 lines
988 B
Bash

#!/bin/bash
#Routingtabelle ffmyk ist per default nicht erreichbar
ip route add unreachable default table ffmyk
#Alles, was mit 0x1 markiert wird gehört zu Tabelle ffmyk
ip rule add from all fwmark 0x1 table ffmyk
#Alles mit Freifunk-IP - woher auch immer - gehlrt zu Tabelle ffmyk
ip rule add from 10.222.0.0/16 table ffmyk
#Tabelle ffmyk routet das Ziel mit Freifunk-IPs über das Device bat0
ip route replace 10.222.0.0/16 dev bat0 table ffmyk
ip route replace 0.0.0.0/1 via 10.222.100.1 dev bat0 metric 666 table ffmyk # fastd1
ip route replace 128.0.0.0/1 via 10.222.100.1 dev bat0 metric 666 table ffmyk # fastd1
ip route replace 0.0.0.0/1 via 10.222.112.1 dev bat0 metric 667 table ffmyk # fastd2
ip route replace 128.0.0.0/1 via 10.222.112.1 dev bat0 metric 667 table ffmyk # fastd2
ip route replace 0.0.0.0/1 via 10.222.120.1 dev bat0 metric 668 table ffmyk # fastd3
ip route replace 128.0.0.0/1 via 10.222.120.1 dev bat0 metric 668 table ffmyk # fastd3