Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| infrastruktur:host:dobby-setup [17.12.2025 11:43] – [Peer hinzufügen] Linus Lüssing | infrastruktur:host:dobby-setup [28.12.2025 02:22] (aktuell) – [pim6sd] Linus Lüssing | ||
|---|---|---|---|
| Zeile 96: | Zeile 96: | ||
| * zwischen dn42 peers immer routen/ | * zwischen dn42 peers immer routen/ | ||
| - | * eingehend ins nbsp Netz nur bei established/ | + | * eingehend |
| + | * Routebares IPv6 multicast zwischen dn42 und nbsp erlauben | ||
| < | < | ||
| Zeile 106: | Zeile 107: | ||
| nft add rule inet filter forward iifname " | nft add rule inet filter forward iifname " | ||
| nft add rule inet filter forward iifname " | nft add rule inet filter forward iifname " | ||
| + | nft add rule inet filter forward ip6 daddr ff00::/8 iifname " | ||
| + | nft add rule inet filter forward ip6 daddr ff00::/8 iifname " | ||
| nft add rule inet filter forward counter reject with icmpx type admin-prohibited | nft add rule inet filter forward counter reject with icmpx type admin-prohibited | ||
| </ | </ | ||
| Zeile 732: | Zeile 735: | ||
| # Add more interfaces as required below | # Add more interfaces as required below | ||
| phyint dn42_tx_wg nolistener enable; | phyint dn42_tx_wg nolistener enable; | ||
| + | phyint dn42_ffhl_wg nolistener enable; | ||
| # configure rendezvous point for the personal multicast prefix | # configure rendezvous point for the personal multicast prefix | ||
| Zeile 751: | Zeile 755: | ||
| Type=exec | Type=exec | ||
| ExecStart=pim6sd -n -f / | ExecStart=pim6sd -n -f / | ||
| + | RestartSteps=10 | ||
| + | RestartMaxDelaySec=30 | ||
| + | Restart=always | ||
| [Install] | [Install] | ||
| WantedBy=multi-user.target | WantedBy=multi-user.target | ||
| + | EOF | ||
| + | </ | ||
| + | |||
| + | bird BGP/MLD watchdog: | ||
| + | |||
| + | < | ||
| + | #!/bin/sh | ||
| + | # / | ||
| + | |||
| + | # Ignore route collector AS for instance | ||
| + | EXCLUDED_ASNS=" | ||
| + | FILTERS_CONF="/ | ||
| + | PIM6SD_PIDFILE="/ | ||
| + | BIRD_PEERS_DIR="/ | ||
| + | |||
| + | get_pim6sd_neighbors() { | ||
| + | local pid | ||
| + | |||
| + | if [ ! -f " | ||
| + | return 0 | ||
| + | fi | ||
| + | |||
| + | pid=" | ||
| + | if [ -z " | ||
| + | return 0 | ||
| + | fi | ||
| + | |||
| + | pim6stat -p " | ||
| + | } | ||
| + | |||
| + | has_bgp_mc_channel() { | ||
| + | local neighinfo=" | ||
| + | |||
| + | echo " | ||
| + | } | ||
| + | |||
| + | is_excluded_as() { | ||
| + | local neighinfo=" | ||
| + | local asn="" | ||
| + | |||
| + | for asn in ${EXCLUDED_ASNS}; | ||
| + | echo " | ||
| + | done | ||
| + | |||
| + | return 1 | ||
| + | # birdc show protocol all ROUTE_COLLECTOR | grep -q "^[ ]*Neighbor AS:[ ]*4242422602" | ||
| + | } | ||
| + | |||
| + | get_birdc_bgpmc_neigh_addr() { | ||
| + | local info=" | ||
| + | |||
| + | echo " | ||
| + | } | ||
| + | |||
| + | get_bird_bgmc_conf_toggle() { | ||
| + | local conf=" | ||
| + | local file | ||
| + | |||
| + | # get filename in an include in an "ipv6 multicast" | ||
| + | file=" | ||
| + | grep -v ' | ||
| + | tr ' | ||
| + | sed -n ' | ||
| + | |||
| + | [ -L " | ||
| + | } | ||
| + | |||
| + | get_bird_bgmc_conf() { | ||
| + | local neigh=" | ||
| + | |||
| + | grep -Ilr " | ||
| + | } | ||
| + | |||
| + | check_pim_neighbors() { | ||
| + | local addr=" | ||
| + | local neigh | ||
| + | |||
| + | echo " | ||
| + | } | ||
| + | |||
| + | update_conftoggle() { | ||
| + | local conftoggle=" | ||
| + | local source=" | ||
| + | local rconftoggle=" | ||
| + | local rsource=" | ||
| + | |||
| + | |||
| + | echo " | ||
| + | if [ " | ||
| + | # nothing changed | ||
| + | return 0 | ||
| + | fi | ||
| + | |||
| + | if [ -z " | ||
| + | return 1 | ||
| + | fi | ||
| + | |||
| + | ln -sf " | ||
| + | } | ||
| + | |||
| + | enable_bird_bgpmc_neighbor() { | ||
| + | local conftoggle=" | ||
| + | |||
| + | update_conftoggle " | ||
| + | } | ||
| + | |||
| + | disable_bird_bgpmc_neighbor() { | ||
| + | local conftoggle=" | ||
| + | |||
| + | update_conftoggle " | ||
| + | } | ||
| + | |||
| + | update_bird_bgpmc_neighbor() { | ||
| + | local neigh=" | ||
| + | local info=" | ||
| + | local addr=" | ||
| + | local conf=" | ||
| + | local conftoggle=" | ||
| + | |||
| + | if [ -z " | ||
| + | echo " | ||
| + | return 1 | ||
| + | fi | ||
| + | if [ -z " | ||
| + | echo " | ||
| + | return 1 | ||
| + | fi | ||
| + | if [ -z " | ||
| + | echo " | ||
| + | return 1 | ||
| + | fi | ||
| + | |||
| + | echo " | ||
| + | if check_pim_neighbors " | ||
| + | enable_bird_bgpmc_neighbor " | ||
| + | else | ||
| + | disable_bird_bgpmc_neighbor " | ||
| + | fi | ||
| + | |||
| + | return $? | ||
| + | } | ||
| + | |||
| + | update_bird_bgpmc_neighbors() { | ||
| + | local neigh | ||
| + | |||
| + | birdc show protocols | \ | ||
| + | sed -n " | ||
| + | while read neigh; do \ | ||
| + | local neighinfo=" | ||
| + | |||
| + | is_excluded_as " | ||
| + | has_bgp_mc_channel " | ||
| + | |||
| + | update_bird_bgpmc_neighbor " | ||
| + | done | ||
| + | } | ||
| + | |||
| + | pimneighbors=" | ||
| + | |||
| + | CHANGED=" | ||
| + | |||
| + | if [ -n " | ||
| + | echo " | ||
| + | if ! birdc configure; then | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | else | ||
| + | echo " | ||
| + | fi | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | $ cat << EOF > / | ||
| + | # / | ||
| + | [Unit] | ||
| + | Description=bird BGP route import/ | ||
| + | After=bird.service | ||
| + | |||
| + | [Service] | ||
| + | Type=oneshot | ||
| + | ExecStart=bird-bgp-pim-watchdog.sh | ||
| + | EOF | ||
| + | $ cat << EOF > / | ||
| + | # / | ||
| + | [Unit] | ||
| + | Description=Run the bird BGP/PIM watchdog periodically | ||
| + | |||
| + | [Timer] | ||
| + | OnBootSec=2m | ||
| + | OnUnitActiveSec=5m | ||
| + | AccuracySec=1m | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=timers.target | ||
| + | EOF | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | mkdir / | ||
| + | </ | ||
| + | |||
| + | For a new PIM peer: | ||
| + | |||
| + | < | ||
| + | ln -s /dev/null / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | $ cat << EOF > / | ||
| + | protocol bgp dn42_${PEERNAME}_v6 from dnpeersmc { | ||
| + | neighbor ${PEERIP6}%dn42_${PEERNAME}_wg as ${PEERASN}; | ||
| + | | ||
| + | ipv4 { | ||
| + | extended next hop on; | ||
| + | }; | ||
| + | | ||
| + | ipv6 multicast { | ||
| + | include "/ | ||
| + | }; | ||
| + | } | ||
| EOF | EOF | ||
| </ | </ | ||
| < | < | ||
| + | systemctl daemon-reload | ||
| systemctl start pim6sd | systemctl start pim6sd | ||
| systemctl enable pim6sd | systemctl enable pim6sd | ||
| + | systemctl enable bird-bgp-pim-watchdog.timer | ||
| + | systemctl start bird-bgp-pim-watchdog.service | ||
| + | systemctl start bird-bgp-pim-watchdog.timer | ||
| </ | </ | ||