funkinseldebian
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| funkinseldebian [2008/11/20 19:42] – ChristianPointner | funkinseldebian [2017/08/25 22:51] (current) – MathiasMayrhofer | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | /* UndefinedMacro: TableOfContents(None) */ | + | <<[[: |
| ====== Funkinsel Setup auf Debian ====== | ====== Funkinsel Setup auf Debian ====== | ||
| - | Dieses Howto beschreibt das Funkinsel Setup für Debian. Howtos für andere Firmware Images können auf der Seite [[: | + | :!: Dieses Howto beschreibt das Funkinsel Setup für Debian. Howtos für andere Firmware Images können auf der Seite [[: |
| Line 30: | Line 30: | ||
| proto udp | proto udp | ||
| - | remote | + | remote |
| resolv-retry infinite | resolv-retry infinite | ||
| nobind | nobind | ||
| Line 46: | Line 46: | ||
| cert "< | cert "< | ||
| key "< | key "< | ||
| + | |||
| + | ns-cert-type server | ||
| cipher none | cipher none | ||
| Line 79: | Line 81: | ||
| LinkQualityLevel 2 | LinkQualityLevel 2 | ||
| UseHysteresis no | UseHysteresis no | ||
| - | FIBMetric "flat" | + | FIBMetric "approx" |
| ClearScreen yes | ClearScreen yes | ||
| - | Willingness 3 | ||
| LinkQualityAging 0.1 | LinkQualityAging 0.1 | ||
| - | LinkQualityAlgorithm "etx_fpm" | + | LinkQualityAlgorithm "etx_ff" |
| RtTable 111 | RtTable 111 | ||
| RtTableDefault 112 | RtTableDefault 112 | ||
| - | Interface " | + | InterfaceDefaults |
| { | { | ||
| - | HelloInterval | + | HelloInterval |
| HelloValidityTime 125.0 | HelloValidityTime 125.0 | ||
| TcInterval 2.0 | TcInterval 2.0 | ||
| Line 96: | Line 97: | ||
| MidInterval 25.0 | MidInterval 25.0 | ||
| MidValidityTime 500.0 | MidValidityTime 500.0 | ||
| - | HnaInterval | + | HnaInterval |
| - | HnaValidityTime | + | HnaValidityTime |
| } | } | ||
| Interface " | Interface " | ||
| { | { | ||
| - | | + | |
| - | HelloValidityTime 125.0 | + | |
| - | TcInterval 2.0 | + | |
| - | TcValidityTime 500.0 | + | |
| - | MidInterval 25.0 | + | |
| - | MidValidityTime 500.0 | + | |
| - | HnaInterval 25.0 | + | |
| - | HnaValidityTime 500.0 | + | |
| } | } | ||
| </ | </ | ||
| - | Diese Konfiguration geht davon aus das das Interface //eth1// zb. eine WLan Karte ist die im Funkfeuer Netz hängt. | + | Diese Konfiguration geht davon aus das das Interface //eth1// zb. eine WLan Karte ist die im Funkfeuer Netz hängt. |
| ===== Policy Routing ===== | ===== Policy Routing ===== | ||
| - | Um das Policy Routing fertig zu konfigurieren brauchen wir noch einen zusätzlichen Initscript | + | Um das Policy Routing fertig zu konfigurieren brauchen wir noch einen zusätzliches Script |
| - | < | + | < |
| </ | </ | ||
| folgendes reinkopieren: | folgendes reinkopieren: | ||
| Line 127: | Line 121: | ||
| - | < | + | < |
| + | #! /bin/sh | ||
| # | # | ||
| - | # Route and Firewall | + | # Policy-Routing |
| - | DEFAULT_GW=192.168.0.254 | + | ## zu konfigurieren |
| - | OLSR_IFACES=" | + | OLSR_IFACES=" |
| case " | case " | ||
| - | | + | |
| - | ip route add default via $DEFAULT_GW table default | + | ip rule add lookup |
| - | ip rule add lookup | + | ip rule add lookup |
| - | ip rule add lookup | + | |
| ip rule del pref 32766 | ip rule del pref 32766 | ||
| - | ip rule add pref 32766 fwmark 1 lookup olsr-default | ||
| - | for i in $OLSR_IFACES; | + | |
| - | | + | |
| - | done | + | ip rule add iif $iface |
| - | ;; | + | |
| - | stop) | + | |
| - | ip rule del pref 32766 | + | |
| - | | + | |
| - | ip rule del lookup main | + | |
| - | ip rule del lookup olsr | + | |
| - | ip route del default via $DEFAULT_GW table default | + | |
| - | + | ||
| - | for i in $OLSR_IFACES; | + | |
| - | | + | |
| done | done | ||
| + | ;; | ||
| + | down) | ||
| + | PREF=32000 | ||
| + | for iface in $OLSR_IFACES; | ||
| + | ip rule del iif $iface pref $PREF lookup olsr-default | ||
| + | PREF=$((PREF+1)) | ||
| + | done | ||
| + | |||
| + | ip rule add lookup main pref 32766 | ||
| + | ip rule del pref 30000 | ||
| + | ip rule del pref 20000 | ||
| ;; | ;; | ||
| *) | *) | ||
| - | echo " | + | echo " |
| exit 1 | exit 1 | ||
| ;; | ;; | ||
| Line 169: | Line 164: | ||
| - | < | + | < |
| - | # update-rc.d network_additional defaults 20 | + | |
| </ | </ | ||
| - | Nach einem Reboot sollte der Tunnel aufgebaut werden und die Funkinsel somit aktiv sein. | + | Damit dieses Script funktioniert müssen die Routing Tabellen von olsr noch benannt werden: |
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | </ | ||
| + | Am Ende folgendes reinkopieren: | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | 112 | ||
| + | </ | ||
| + | Zuletzt müssen folgenden Änderungen bei der Interface Konfiguration gemacht werden: | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | </ | ||
| + | Bei dem Interface das mit dem Internet verbunden ist darf auf keinen Fall ein Default Gateway gesetzt sein. Es muss also die Zeile: | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | </ | ||
| + | gegen untenstehendes ersetzt werden (natürlich muss die Adresse 192.2.0.1 gegen die richtige Gateway Adresse ausgebessert werden). | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | down ip route del default via 192.2.0.1 table default | ||
| + | </ | ||
| + | Nun noch bei dem Interface für Funkfeuer (in unserem Beispiel eth1) noch folgedes einfügen: | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | down / | ||
| + | </ | ||
| + | Auch hier darf es keine Default Gateway Konfiguration geben. | ||
| + | |||
| + | Nach einem Reboot sollte | ||
funkinseldebian.1227210152.txt · Last modified: (external edit)
