notiz:bird2-debian-buster-installieren
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| notiz:bird2-debian-buster-installieren [2020/11/17 22:14] – [bird2 konfigurieren] clerie | notiz:bird2-debian-buster-installieren [2020/11/18 22:18] (aktuell) – [bird2 bauen und installieren] clerie | ||
|---|---|---|---|
| Zeile 3: | Zeile 3: | ||
| ===== Abhängigkeiten installieren ===== | ===== Abhängigkeiten installieren ===== | ||
| - | < | + | <code bash> |
| apt install build-essential autotools-dev autoconf flex bison libncurses-dev libreadline-dev | apt install build-essential autotools-dev autoconf flex bison libncurses-dev libreadline-dev | ||
| </ | </ | ||
| Zeile 9: | Zeile 9: | ||
| ===== bird2 bauen und installieren ===== | ===== bird2 bauen und installieren ===== | ||
| - | < | + | <code bash> |
| wget https:// | wget https:// | ||
| tar -xf bird-2.0.7.tar.gz | tar -xf bird-2.0.7.tar.gz | ||
| - | ls -al | ||
| cd bird-2.0.7/ | cd bird-2.0.7/ | ||
| ./ | ./ | ||
| Zeile 21: | Zeile 20: | ||
| ===== bird2 einrichten ===== | ===== bird2 einrichten ===== | ||
| - | < | + | <code bash> |
| adduser --system --group --no-create-home bird | adduser --system --group --no-create-home bird | ||
| </ | </ | ||
| - | <code / | + | < |
| + | [Unit] | ||
| + | Description=BIRD Internet Routing Daemon | ||
| + | After=network.target | ||
| + | |||
| + | [Service] | ||
| + | ExecStartPre=/ | ||
| + | ExecReload=/ | ||
| + | ExecStart=/ | ||
| + | Restart=on-abort | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| </ | </ | ||
| - | < | + | <code bash> |
| systemctl enable --now bird | systemctl enable --now bird | ||
| </ | </ | ||
| Zeile 35: | Zeile 46: | ||
| <code - / | <code - / | ||
| + | router id 192.168.10.26; | ||
| + | |||
| + | ipv6 table ospf6; | ||
| + | ipv6 table bgp6; | ||
| + | |||
| + | protocol direct { | ||
| + | interface " | ||
| + | ipv6 { | ||
| + | table ospf6; | ||
| + | }; | ||
| + | } | ||
| + | |||
| + | protocol static { | ||
| + | ipv6 { | ||
| + | table bgp6; | ||
| + | }; | ||
| + | route fd56: | ||
| + | route fd56: | ||
| + | } | ||
| + | |||
| + | protocol kernel { | ||
| + | ipv6 { | ||
| + | table ospf6; | ||
| + | export filter { | ||
| + | krt_prefsrc=fd56: | ||
| + | accept; | ||
| + | }; | ||
| + | import none; | ||
| + | }; | ||
| + | kernel table 1337; | ||
| + | } | ||
| + | |||
| + | protocol kernel { | ||
| + | ipv6 { | ||
| + | table bgp6; | ||
| + | export filter { | ||
| + | krt_prefsrc=fd56: | ||
| + | accept; | ||
| + | }; | ||
| + | import none; | ||
| + | }; | ||
| + | kernel table 2342; | ||
| + | } | ||
| + | |||
| + | protocol ospf v3 { | ||
| + | ipv6 { | ||
| + | table ospf6; | ||
| + | import all; | ||
| + | export all; | ||
| + | }; | ||
| + | area 0 { | ||
| + | interface " | ||
| + | cost 80; | ||
| + | }; | ||
| + | }; | ||
| + | } | ||
| + | |||
| + | protocol bgp gw5 { | ||
| + | local as 4242422574; | ||
| + | graceful restart on; | ||
| + | neighbor fd56: | ||
| + | source address fd56: | ||
| + | ipv6 { | ||
| + | table bgp6; | ||
| + | igp table ospf6; | ||
| + | next hop self; | ||
| + | import keep filtered; | ||
| + | import all; | ||
| + | export all; | ||
| + | }; | ||
| + | } | ||
| + | |||
| + | |||
| + | protocol bgp peer_nex { | ||
| + | local as 4242422574; | ||
| + | graceful restart on; | ||
| + | neighbor fd9b: | ||
| + | source address fd9b: | ||
| + | ipv6 { | ||
| + | table bgp6; | ||
| + | igp table ospf6; | ||
| + | next hop self; | ||
| + | import keep filtered; | ||
| + | import filter { | ||
| + | if net ~ [fd00::/ | ||
| + | reject; | ||
| + | }; | ||
| + | export filter { | ||
| + | #if net ~ [fd9b: | ||
| + | if net ~ [fd00::/ | ||
| + | reject; | ||
| + | }; | ||
| + | }; | ||
| + | } | ||
| + | |||
| + | protocol device { | ||
| + | scan time 10; | ||
| + | } | ||
| </ | </ | ||
| + | ===== forwarding aktivieren ===== | ||
| + | |||
| + | <code / | ||
| + | net.ipv4.ip_forward=1 | ||
| + | net.ipv6.conf.all.forwarding=1 | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | systemctl restart systemd-sysctl | ||
| + | </ | ||
| + | |||
| + | ===== policy based Routing einrichten ===== | ||
| + | |||
| + | <code - / | ||
| + | #!/bin/bash | ||
| + | |||
| + | ip -6 rule flush | ||
| + | ip -6 rule add lookup main prio 32000 | ||
| + | ip -6 rule add from all to fd56: | ||
| + | #ip -6 rule add from fd56: | ||
| + | ip -6 rule add from all to all lookup 2342 prio 10000 | ||
| + | ip -6 rule add from all to fd56: | ||
| + | ip -6 rule add from fd56: | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | chmod +x / | ||
| + | / | ||
| + | </ | ||
notiz/bird2-debian-buster-installieren.1605647662.txt.gz · Zuletzt geändert: von clerie
