Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
linux:radvd [03.07.2024 21:26. ] – [Lösung] django | linux:radvd [10.07.2024 18:40. ] (aktuell) – [RA — Router Advertisement (ICMPv6 type 134)] django | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ~~NOCACHE~~ | ||
====== Router Advertisements mit radvd unter Arch Linux einrichten und nutzen ====== | ====== Router Advertisements mit radvd unter Arch Linux einrichten und nutzen ====== | ||
{{: | {{: | ||
Zeile 60: | Zeile 61: | ||
=== RA — Router Advertisement (ICMPv6 type 134) === | === RA — Router Advertisement (ICMPv6 type 134) === | ||
- | **Router Advertisment Nachrichten** werden vom Server entweder regelmässig an alle Clients im Netz oder ebnen speziell auf An Anfrage durch einen Client versandt. Es handelt sich also im ersten Fall um eine ICMPv6-Nachricht, | + | **Router Advertisment Nachrichten** werden vom Server entweder regelmässig an alle Clients im Netz oder ebnen speziell auf An Anfrage durch einen Client versandt. Es handelt sich also im ersten Fall um eine ICMPv6-Nachricht, |
* Ein Router verwenden diese RA-Nachrichten, | * Ein Router verwenden diese RA-Nachrichten, | ||
* Hosts verwerten diese RA-Nachrichten, | * Hosts verwerten diese RA-Nachrichten, | ||
Zeile 66: | Zeile 67: | ||
* **Home-Agent H-Flag**: Dieses Flag wird verwendet, um anzuzeigen, dass es sich bei dem beworbenen Präfix um ein Heimnetzwerk-Präfix handelt, insbesondere für Mobile IPv6, dass sie also somit als Home Agent für Mobile IPv6 fungieren und Dienste für mobile Knoten bereitstellen können. | * **Home-Agent H-Flag**: Dieses Flag wird verwendet, um anzuzeigen, dass es sich bei dem beworbenen Präfix um ein Heimnetzwerk-Präfix handelt, insbesondere für Mobile IPv6, dass sie also somit als Home Agent für Mobile IPv6 fungieren und Dienste für mobile Knoten bereitstellen können. | ||
* **On-link L-Flag**: Ist dieses Flag gesetzt, wird definiert dass ein bestimmtes Präfix als " | * **On-link L-Flag**: Ist dieses Flag gesetzt, wird definiert dass ein bestimmtes Präfix als " | ||
- | * **Managed M-Flag** : Eine ' | + | * **Managed M-Flag** : Eine ' |
* **Other O-Flag** : Eine ' | * **Other O-Flag** : Eine ' | ||
* **Router-Präferenz (Prf)**: Der Wert in diesem Feld steht für die Präferenzstufe des Routers, der die RA-Nachricht sendet. So wird z.B. darüber ermittelt ob das Gateway als Standardgateway fungieren soll. Das Prf-Feld kann drei Werte annehmen: Hoch (0x00), Mittel (0x40) oder Niedrig (0x80). Router mit einem höheren Präferenzwert werden gegenüber Routern mit niedrigeren Werten bevorzugt. | * **Router-Präferenz (Prf)**: Der Wert in diesem Feld steht für die Präferenzstufe des Routers, der die RA-Nachricht sendet. So wird z.B. darüber ermittelt ob das Gateway als Standardgateway fungieren soll. Das Prf-Feld kann drei Werte annehmen: Hoch (0x00), Mittel (0x40) oder Niedrig (0x80). Router mit einem höheren Präferenzwert werden gegenüber Routern mit niedrigeren Werten bevorzugt. | ||
Zeile 142: | Zeile 143: | ||
Damit unsere Clients Verbindungen zu dem geöffneten **dhcpv6-client**-Port **546/udp** und **dhcpv6-server**-Port **547/udp** unseres radvd-Daemons aufbauen können, müssen wir für diese noch Änderungen am Paketfilter **firewalld** vornehmen. | Damit unsere Clients Verbindungen zu dem geöffneten **dhcpv6-client**-Port **546/udp** und **dhcpv6-server**-Port **547/udp** unseres radvd-Daemons aufbauen können, müssen wir für diese noch Änderungen am Paketfilter **firewalld** vornehmen. | ||
- | Mit Hilfe des Programms **firewall-cmd** legen wir nun eine **permanente** Regel in der Zone **intra** | + | Mit Hilfe des Programms **firewall-cmd** legen wir nun eine **permanente** Regel in der Zone **intra** an. Genug der Vorrede, mit nachfolgendem Befehl |
# firewall-cmd --permanent --zone=intra --add-service=dhcpv6 | # firewall-cmd --permanent --zone=intra --add-service=dhcpv6 | ||
Zeile 173: | Zeile 174: | ||
<WRAP center round info 80%> | <WRAP center round info 80%> | ||
Starten werden wir den **radvd**-Daemon erst einmal noch nicht, da wir diesen ja noch konfigurieren müssen. Nachfolgend werden wir noch detailliert zu einzelnen Anwendungsfällen eingehen: | Starten werden wir den **radvd**-Daemon erst einmal noch nicht, da wir diesen ja noch konfigurieren müssen. Nachfolgend werden wir noch detailliert zu einzelnen Anwendungsfällen eingehen: | ||
- | - **[[# | + | - **[[# |
- | - **DHCPv6 - stateless und stateful** | + | - **[[# |
+ | - **[[# | ||
</ | </ | ||
- | ==== SLAAC - IPv6 Stateless Address Auto-configuration | + | ==== Konfigurationsbeispiel für SLAAC ==== |
- | === Was ist SLAAC und wie funktioniert es === | + | === Was ist SLAAC (IPv6 Stateless Address Autoconfiguration) |
Bevor wir uns nun mit der Konfiguration unseres **radvd** beschäftigen, | Bevor wir uns nun mit der Konfiguration unseres **radvd** beschäftigen, | ||
Zeile 225: | Zeile 226: | ||
Bei unserem Konfigurationsbeispiel hier gehen wir für den Router Advertisement Daemon **radvd** für die Adressvergabe über **SLAAC** von folgenden Eckwerten aus: | Bei unserem Konfigurationsbeispiel hier gehen wir für den Router Advertisement Daemon **radvd** für die Adressvergabe über **SLAAC** von folgenden Eckwerten aus: | ||
- | * **Netzwerkinterface** : \\ Der **radvd** soll nure auf dem Netzwerkinterface **'' | + | * **Netzwerkinterface** : \\ Der **radvd** soll nure auf dem Netzwerkinterface **'' |
* **M-Flag**: \\ AdvManagedFlag = **'' | * **M-Flag**: \\ AdvManagedFlag = **'' | ||
* **O-Flag**: \\ AdvOtherConfigFlag = **'' | * **O-Flag**: \\ AdvOtherConfigFlag = **'' | ||
- | * **A-Flag**: \\AdvAutonomous = **'' | + | * **A-Flag**: \\ AdvAutonomous = **'' |
* **Global-Scope Address Prefix** : \\ **'' | * **Global-Scope Address Prefix** : \\ **'' | ||
* **Route** : \\ **'' | * **Route** : \\ **'' | ||
Zeile 697: | Zeile 698: | ||
</ | </ | ||
- | Warum ist das nun so? Ganz einfach, weil am Client-Renchner | + | Warum ist das nun so? Ganz einfach, weil am Client-Rechner |
# vim / | # vim / | ||
<file bash / | <file bash / | ||
Zeile 762: | Zeile 763: | ||
</ | </ | ||
- | ==== Router Advertisement ICMPv6-Nachrichten für Stateful DHCPv6 | + | ==== Konfigurationsbeispiel DHCPv6 ==== |
- | Ein **Stateful DHCPv6-Server** liefert neben IPv6-Adressen | + | === Router Advertisement ICMPv6-Nachrichten für Stateful DHCPv6 === |
+ | Ein **Stateful DHCPv6-Server** liefert neben IPv6-Adressen | ||
=== Stateful DHCPv6 Konfiguration beim radvd === | === Stateful DHCPv6 Konfiguration beim radvd === | ||
Zeile 772: | Zeile 774: | ||
* **M-Flag**: \\ AdvManagedFlag = **'' | * **M-Flag**: \\ AdvManagedFlag = **'' | ||
* **O-Flag**: \\ AdvOtherConfigFlag = **'' | * **O-Flag**: \\ AdvOtherConfigFlag = **'' | ||
- | * **A-Flag**: \\AdvAutonomous = **'' | + | * **A-Flag**: \\ AdvAutonomous = **'' |
* **Route** für den **Global-Scope Address Prefix** **'' | * **Route** für den **Global-Scope Address Prefix** **'' | ||
* **Route** für den **Unique Local IPv6 prefix** : **'' | * **Route** für den **Unique Local IPv6 prefix** : **'' | ||
Zeile 1158: | Zeile 1160: | ||
Verbindet sich nun ein Client mit dem Netzwerk, handelt dieser **__nicht__** eigenständig seine IPv6-Adressen aus, sondern richtet eine entsprechende Anfrage an den DHCPv6-Server! | Verbindet sich nun ein Client mit dem Netzwerk, handelt dieser **__nicht__** eigenständig seine IPv6-Adressen aus, sondern richtet eine entsprechende Anfrage an den DHCPv6-Server! | ||
- | ===== Orchestrierung - Installation | + | ==== Musterkonfiguration GUA via SLAAC und ULA via DHCPv6 |
- | ==== Aufgabenstellung ==== | + | === Grundüberlegungen |
- | Natürlich wird man im Jahr 2024 nicht mehr ernsthaft, manuell Server aufsetzen | + | In den beiden vorgenannten Konfigurationsbeispielen **[[# |
- | Wir werden | + | Wenn wir uns mit dem Thema IPv6 im Intranet befassen, wird sich in aller Regel folgende Frage stellen: Welche Typen von Adressen werden benötigt |
- | ==== Lösung ==== | + | <WRAP center round important 80%> |
+ | Betrachten wir also nun die **U**nified **L**ocal **A**ddress, | ||
+ | </ | ||
+ | <WRAP center round info 80%> | ||
- | <WRAP center round tip 80%> | + | Je länger man sich nun mit der ganzen Thematik um nicht Misere zu sagen beschäftigt kommt man zu folgender Musterkonfigurationslösung: |
- | Der ungeduldigen Leser kann auch direkt zur Tat schreiten und das manuelle Anlegen | + | - **ULA**: |
+ | - Wir wollen statische eineindeutige wiederkehrende feste **ULA**s die wir per **DHCPv6** auf Basis der **DUID** oder anderen dem Host zuordenbare Eigenschafte fest vergeben. | ||
+ | | ||
+ | - **GUA**: | ||
+ | - Die öffentlichen **IPv6** Adressen (**GUA**)) vergeben wir dynamisch via SLAAC. | ||
+ | - Laptops oder Notebooks auf denen ein aktuelles fortschrittliches Linux, wie z.B. **[[https:// | ||
+ | - Bei mobilen Geräten aus dem Hause Apple mit ihrem **[[https:// | ||
+ | Wir wollen uns also nun ansehen, wie wir solch ein Muster-Szenario abbilden können | ||
+ | </ | ||
- | <code> $ mkdir -p ~/ | + | <WRAP center round alert 80%> |
+ | Der geneigte Leser wir sich nun fragen, ja wie macht man denn nun das beim **radvd**? Denn schliesslich wissen wir ja dass wir bei Nutzung von **SLAAC** die bekannten Flags wir folgt setzen müssen: | ||
+ | * **M-Flag**: \\ AdvManagedFlag = **'' | ||
+ | * **O-Flag**: \\ AdvOtherConfigFlag = **'' | ||
+ | * **A-Flag**: \\ AdvAutonomous = **'' | ||
+ | Hingegen bei **DHCPv6** hingegen müssen wir die Flags wie folgt setzen. | ||
+ | * **M-Flag**: \\ AdvManagedFlag = **'' | ||
+ | * **O-Flag**: \\ AdvOtherConfigFlag = **'' | ||
+ | * **A-Flag**: \\ AdvAutonomous | ||
- | Nach Anpassung der Daten im Inventory kann man anschliessend direkt | + | O.K. das **'' |
</ | </ | ||
- | === Vorbereitung - (Server-)Daten im Inventory | + | === radvd Konfiguration |
- | Bei unserem Konfigurationsbeispiel hier gehen wir von folgenden Host-Parametern aus: | + | Wie wir aber dennoch eine funktionierende Konfiguration des **radvd** hierzu hinbekommen werden wir uns nun ansehen. |
- | | + | |
- | | + | |
- | Die Konfigurationsdatei unseres | + | |
- | $ vim inventories/ | + | * **GUA** |
- | ++++ inventories/production/ | + | * **SLAAC** |
- | <file bash inventories/production/ | + | * **Global-Scope Address Prefix** : \\ **'' |
- | # | + | * **Route** : \\ **'' |
- | # Hinweise: | + | * **AdvRouteLifetime** : \\ Gültigkeit der Routen Lifetime |
- | # - Kommentare beginnen mit einem '#'-Zeichen | + | * **M-Flag**: \\ AdvManagedFlag = **'' |
- | # - leere Zeilen werden ignoriert | + | * **O-Flag**: \\ AdvOtherConfigFlag = **'' |
- | # - Host- und Gruppendefinitionen werden | + | * **A-Flag**: \\ AdvAutonomous = **'' |
- | # - Hosts können | + | * **ULA** |
- | # - übergeordnete Gruppen werden durch [:children] abgegrenzt | + | * **DHCPv6** : \\ Der **radvd** lauscht auf dem Netzwerkinterface **'' |
- | # | + | * **Unique Local IPv6 prefix** : \\ Hier verwenden wir den zuvor erzeugten Unique Local IPv6 prefix von **'' |
- | # Host-Definitionen | + | * **Route** : \\ **'' |
+ | * **AdvRouteLifetime** : \\ Gültigkeit der Routen Lifetime | ||
+ | * **M-Flag**: \\ O.K. das **M-Flag** müssten wir ja eigentlich auf **'' | ||
+ | * **O-Flag**: \\ AdvOtherConfigFlag = **'' | ||
+ | * **A-Flag**: \\ AdvAutonomous = **'' | ||
- | # Hosts ohne Gruppenzuordnung | + | Daraus ergibt sich nun folgende Konfigurationsdatei |
- | localhost | + | # vim / |
- | + | <file bash / | |
- | [edmz] | + | # for GUA and SLAAC as well as ULA with DHCPv6 |
- | vml000210 | + | |
- | + | ||
- | [idmz] | + | |
- | vml000110 | + | |
- | + | ||
- | [intra] | + | |
- | vml010110 | + | |
- | + | ||
- | + | ||
- | # Host-Gruppen-Definitionen | + | |
- | # (zu welcher Gruppe gehören Untergruppen bzw. Hosts) | + | |
- | + | ||
- | [linux: | + | |
- | intra | + | |
- | edmz | + | |
- | idmz | + | |
- | + | ||
- | </ | + | |
- | ++++ | + | |
- | + | ||
- | Bei den Host-Variablen definieren wir über die Variable **'' | + | |
- | + | ||
- | Bei der Definition unseres KVM-Hosts hatten wir unter anderem definiert: | + | |
- | * **'' | + | |
- | * **'' | + | |
- | * **'' | + | |
- | * **'' | + | |
- | * **'' | + | |
- | + | ||
- | ++++ inventories/ | + | |
- | <file bash inventories/ | + | |
- | guest_ip6_net_2: | + | |
- | guest_mask6_2: | + | |
- | guest_ip6_ls_fx_2: | + | |
- | guest_zone_2: | + | |
- | </ | + | |
- | ++++ | + | |
- | + | ||
- | Die für den **radvd** relavanten Konfigurationsparameter legen wir in der Inventrory-Datei **'' | + | |
- | $ vim inventories/ | + | |
- | ++++ inventories/ | + | |
- | <file bash inventories/ | + | |
- | radvd_nic: | + | |
- | radvd_gua_prefix: | + | |
- | radvd_gua_netmask: | + | |
- | radvd_gua_preference: | + | |
- | radvd_gua_valid_time: | + | |
- | radvd_gua_route_time: | + | |
- | radvd_gua_prefd_time: | + | |
- | radvd_ula_prefix: | + | |
- | radvd_ula_netmask: | + | |
- | radvd_ula_preference: | + | |
- | radvd_ula_valid_time: | + | |
- | radvd_ula_route_time: | + | |
- | radvd_ula_prefd_time: | + | |
- | </ | + | |
- | ++++ | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | === Playbook === | + | |
- | Unser Playbook zum Installieren und Konfigurieren unseres Router Advertisements Daemon **radvd**, ist unscheinbar und unspektakulär. | + | |
- | $ vim playbooks/ | + | |
- | <file bash playbooks/ | + | |
- | --- | + | |
- | + | ||
- | # Ansible Playbook zum Konfigurieren des Router Advertisement Daemon unter Arch-Linux. | + | |
- | # Aufruf via $ ansible-playbook playbooks/ | + | |
- | # $ ansible-playbook playbooks/ | + | |
- | # für einen Host aus der Hostgruppe DMZ. | + | |
- | + | ||
- | - name: " | + | |
- | hosts: vml010110 | + | |
- | + | ||
- | roles: | + | |
- | - role: radvd # radvd installieren und konfigurieren | + | |
- | tags: radvd # Tag-Kennzeichnung der definierten Rolle | + | |
- | ... | + | |
- | </ | + | |
- | === Rolle === | + | |
- | Für die Konfiguration unseres **radvd** verwenden wir eine eigene Rolle **'' | + | |
- | $ cp -avr roles/ | + | |
- | < | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | </ | + | |
- | + | ||
- | Bei Bedarf können wir uns die Struktur die somit angelegt wurde mit nachfolgendem Befehl anzeigen lassen. | + | |
- | $ tree roles/ | + | |
- | + | ||
- | ++++ Ausgabe von tree roles/ | + | |
- | < | + | |
- | ├── defaults | + | |
- | ├── files | + | |
- | ├── handlers | + | |
- | ├── library | + | |
- | ├── lookup_plugins | + | |
- | ├── meta | + | |
- | ├── module_utils | + | |
- | ├── tasks | + | |
- | │ ├── firewalld.yml | + | |
- | │ ├── install.yml | + | |
- | │ └── main.yml | + | |
- | ├── templates | + | |
- | │ └── radvd_config.j2 | + | |
- | └── vars | + | |
- | </ | + | |
- | ++++ | + | |
- | + | ||
- | Wie wir sehen ist die Rolle durchaus überschaubar, | + | |
- | | + | |
- | + | ||
- | <file bash roles/ | + | |
- | --- | + | |
- | + | ||
- | - name: " | + | |
- | ansible.builtin.include_tasks: | + | |
- | file: install.yml | + | |
- | apply: | + | |
- | tags: install | + | |
- | + | ||
- | - name: " | + | |
- | ansible.builtin.include_tasks: | + | |
- | file: firewalld.yml | + | |
- | apply: | + | |
- | tags: firewalld | + | |
- | + | ||
- | ... | + | |
- | </ | + | |
- | + | ||
- | Die eigentliche Installation und Konfiguration erfolgt dann im Task **'' | + | |
- | $ vim roles/ | + | |
- | <file bash roles/ | + | |
- | + | ||
- | - name: " | + | |
- | community.general.pacman: | + | |
- | name: radvd | + | |
- | state: present | + | |
- | + | ||
- | - name: " | + | |
- | ansible.builtin.stat: | + | |
- | path: / | + | |
- | register: check_radvd_config | + | |
- | + | ||
- | - name: " | + | |
- | ansible.builtin.copy: | + | |
- | remote_src: true | + | |
- | src: / | + | |
- | dest: / | + | |
- | owner: root | + | |
- | group: root | + | |
- | mode: ' | + | |
- | when: not check_radvd_config.stat.exists | + | |
- | + | ||
- | - name: " | + | |
- | ansible.builtin.template: | + | |
- | src: templates/ | + | |
- | dest: / | + | |
- | owner: root | + | |
- | group: root | + | |
- | mode: ' | + | |
- | + | ||
- | ... | + | |
- | </ | + | |
- | + | ||
- | Die Anpassung an unserer Firewall-Konfiguration | + | |
- | $ vim roles/ | + | |
- | <file bash roles/ | + | |
- | + | ||
- | - name: " | + | |
- | ansible.builtin.systemd: | + | |
- | state: reloaded | + | |
- | enabled: true | + | |
- | name: firewalld | + | |
- | + | ||
- | - name: " | + | |
- | ansible.posix.firewalld: | + | |
- | zone: '{{ guest_zone_2 }}' | + | |
- | service: dhcpv6 | + | |
- | immediate: true | + | |
- | permanent: true | + | |
- | state: enabled | + | |
- | + | ||
- | - name: "Zum Schluss den aktuellen permanenten Regelsatz final neu laden." | + | |
- | ansible.builtin.service: | + | |
- | name: firewalld | + | |
- | state: reloaded | + | |
- | + | ||
- | ... | + | |
- | </ | + | |
- | + | ||
- | Das Template **'' | + | |
- | $ vim roles/ | + | |
- | <file bash roles/ | + | |
- | # Ansible managed configuration file, do not modify manually! | + | |
# | # | ||
- | # Configuration file router advertisement daemon radvd | ||
- | |||
- | {% if radvd_ipv6_mode == " | ||
- | # - M-flag: AdvManagedFlag = on (address configuration via '{{ radvd_ipv6_mode }}') | ||
- | {% else %} | ||
- | # - M-flag: AdvManagedFlag = off (address configuration via '{{ radvd_ipv6_mode }}') | ||
- | {% endif %} | ||
# - O-flag: AdvOtherConfigFlag = on (obtaining a DNS server list | # - O-flag: AdvOtherConfigFlag = on (obtaining a DNS server list | ||
# and a domain name from a Stateless DHCPv6 server, but | # and a domain name from a Stateless DHCPv6 server, but | ||
# not addressing information. | # not addressing information. | ||
- | {% if radvd_ipv6_mode | + | # - M-flag: AdvManagedFlag |
- | # - A-flag: AdvAutonomous = off (address configuration via '{{ radvd_ipv6_mode }}') | + | # - A-flag: AdvAutonomous = on (address configuration via SLAAC for GUA) |
- | {% else %} | + | # - A-flag: AdvAutonomous = off (address configuration via DHCPv6 for static ULA) |
- | # - A-flag: AdvAutonomous = on (address configuration via '{{ radvd_ipv6_mode }}') | + | |
- | {% endif %} | + | |
- | interface | + | interface |
{ | { | ||
- | # A flag indicating | + | # A flag indicating |
# router advertisements and responds to router solicitations. | # router advertisements and responds to router solicitations. | ||
# This option no longer has to be specified first, but it needs | # This option no longer has to be specified first, but it needs | ||
Zeile 1440: | Zeile 1240: | ||
# Must be no less than 4 seconds and no greater than 1800 seconds. | # Must be no less than 4 seconds and no greater than 1800 seconds. | ||
# Minimum when using Mobile IPv6 extensions: 0.07. | # Minimum when using Mobile IPv6 extensions: 0.07. | ||
- | # For values less than 0.2 seconds, 0.02 seconds is added to | + | # For values less than 0.2 seconds, 0.02 seconds is added to |
# account for scheduling granularities as specified in RFC3775. | # account for scheduling granularities as specified in RFC3775. | ||
MaxRtrAdvInterval 600; | MaxRtrAdvInterval 600; | ||
Zeile 1446: | Zeile 1246: | ||
# The minimum time allowed between sending unsolicited multicast | # The minimum time allowed between sending unsolicited multicast | ||
# router advertisements from the interface, in seconds. | # router advertisements from the interface, in seconds. | ||
- | # Must be no less than 3 seconds and no greater than | + | # Must be no less than 3 seconds and no greater than |
# 0.75 * MaxRtrAdvInterval. | # 0.75 * MaxRtrAdvInterval. | ||
# Minimum when using Mobile IPv6 extensions: 0.03. | # Minimum when using Mobile IPv6 extensions: 0.03. | ||
MinRtrAdvInterval 200; | MinRtrAdvInterval 200; | ||
- | # The preference associated with the default router, as either | + | # The preference associated with the default router, as either |
# " | # " | ||
- | AdvDefaultPreference | + | AdvDefaultPreference |
- | # Mobile IPv6 support, when set, indicates that sending router is | + | # Mobile IPv6 support, when set, indicates that sending router is |
# able to serve as Mobile IPv6 Home Agent. | # able to serve as Mobile IPv6 Home Agent. | ||
- | # When set, minimum limits specified by Mobile IPv6 are used for | + | # When set, minimum limits specified by Mobile IPv6 are used for |
# MinRtrAdvInterval and MaxRtrAdvInterval. | # MinRtrAdvInterval and MaxRtrAdvInterval. | ||
AdvHomeAgentFlag off; | AdvHomeAgentFlag off; | ||
- | # When set, hosts use the administered (stateful) protocol for | + | # When set, hosts use the administered (stateful) protocol for |
- | # address | + | # address |
# autoconfigured using stateless address autoconfiguration. | # autoconfigured using stateless address autoconfiguration. | ||
# The use of this flag is described in RFC 4862. | # The use of this flag is described in RFC 4862. | ||
- | # M-flag - if it is set to 1, this informs hosts that they can | + | # M-flag - if it is set to 1, this informs hosts that they can |
# obtain a global address as well as DNS and a domain name from | # obtain a global address as well as DNS and a domain name from | ||
# a Stateful DHCPv6 server. Typically this means that auto- | # a Stateful DHCPv6 server. Typically this means that auto- | ||
# addressing using SLAAC is not allowed on this segment and both | # addressing using SLAAC is not allowed on this segment and both | ||
# the A-flag and the O-flag are set to 0. | # the A-flag and the O-flag are set to 0. | ||
- | {% if radvd_ipv6_mode == " | + | |
- | | + | |
- | {% else %} | + | |
- | AdvManagedFlag = off; | + | |
- | {% endif %} | + | |
- | # When set, hosts use the administered (stateful) protocol for | + | # When set, hosts use the administered (stateful) protocol for |
# autoconfiguration of other (non-address) information. | # autoconfiguration of other (non-address) information. | ||
# The use of this flag is described in RFC 4862 | # The use of this flag is described in RFC 4862 | ||
# O-flag - if it is set to on, this informs hosts that they can | # O-flag - if it is set to on, this informs hosts that they can | ||
- | # obtain a DNS server list and a domain name from a Stateless | + | # obtain a DNS server list and a domain name from a Stateless |
- | # DHCPv6 server, but not addressing information. Typically it | + | # DHCPv6 server, but not addressing information. Typically it |
# works in conjunction with SLAAC for auto-addressing and both | # works in conjunction with SLAAC for auto-addressing and both | ||
# the A-flag and the O-flag are set to on. | # the A-flag and the O-flag are set to on. | ||
Zeile 1487: | Zeile 1283: | ||
AdvOtherConfigFlag on; | AdvOtherConfigFlag on; | ||
- | # The time, in milliseconds, | + | # The time, in milliseconds, |
# reachable after having received a reachability confirmation. | # reachable after having received a reachability confirmation. | ||
# Used by the Neighbor Unreachability Detection algorithm (see | # Used by the Neighbor Unreachability Detection algorithm (see | ||
Zeile 1497: | Zeile 1293: | ||
# The time,in milliseconds, | # The time,in milliseconds, | ||
# citation messages. Used by address resolution and the Neighbor | # citation messages. Used by address resolution and the Neighbor | ||
- | # Unreachability Detection algorithm (see Sections 7.2 and 7.3 | + | # Unreachability Detection algorithm (see Sections 7.2 and 7.3 |
# of RFC 4861). | # of RFC 4861). | ||
AdvRetransTimer 0; | AdvRetransTimer 0; | ||
Zeile 1513: | Zeile 1309: | ||
# router' | # router' | ||
# formation contained in other message fields or options. Options that | # formation contained in other message fields or options. Options that | ||
- | # need time limits for their information include their own lifetime | + | # need time limits for their information include their own lifetime |
# fields. | # fields. | ||
# Must be either zero or between MaxRtrAdvInterval and 9000 seconds. | # Must be either zero or between MaxRtrAdvInterval and 9000 seconds. | ||
# Default: 3 * MaxRtrAdvInterval (Minimum 1 second). | # Default: 3 * MaxRtrAdvInterval (Minimum 1 second). | ||
- | AdvDefaultLifetime | + | AdvDefaultLifetime |
- | # When set, the link-layer address of the outgoing interface is | + | # When set, the link-layer address of the outgoing interface is |
# included in the RA. | # included in the RA. | ||
AdvSourceLLAddress on; | AdvSourceLLAddress on; | ||
- | # global-scope | + | # global-scope |
- | prefix | + | prefix |
{ | { | ||
- | # When set, indicates that this prefix can be used for on-link | + | # When set, indicates that this prefix can be used for on-link |
# determination. When not set the advertisement makes no statement | # determination. When not set the advertisement makes no statement | ||
# about on-link or off-link properties of the prefix. For instance, | # about on-link or off-link properties of the prefix. For instance, | ||
# the prefix might be used for address configuration with some of | # the prefix might be used for address configuration with some of | ||
- | # the addresses belonging to the prefix being on-link and others | + | # the addresses belonging to the prefix being on-link and others |
# being off-link. | # being off-link. | ||
AdvOnLink on; | AdvOnLink on; | ||
- | # When set, indicates that this prefix can be used for autonomous | + | # When set, indicates that this prefix can be used for autonomous |
# address configuration as specified in RFC 4862. | # address configuration as specified in RFC 4862. | ||
- | # A-flag - if it is set to on, this informs hosts that they can | + | # A-flag - if it is set to on, this informs hosts that they can |
# auto-generate GUA address using SLAAC. If it is set to off means | # auto-generate GUA address using SLAAC. If it is set to off means | ||
# that auto-configuration is not allowed for this segment. | # that auto-configuration is not allowed for this segment. | ||
- | {% if radvd_ipv6_mode == " | ||
- | AdvAutonomous off; | ||
- | {% else %} | ||
AdvAutonomous on; | AdvAutonomous on; | ||
- | {% endif %} | ||
# When set, indicates that the address of interface is sent instead | # When set, indicates that the address of interface is sent instead | ||
- | # of network prefix, as is required by Mobile IPv6. When set, | + | # of network prefix, as is required by Mobile IPv6. When set, |
# minimum limits specified by Mobile IPv6 are used for | # minimum limits specified by Mobile IPv6 are used for | ||
# MinRtrAdvInterval and MaxRtrAdvInterval. | # MinRtrAdvInterval and MaxRtrAdvInterval. | ||
AdvRouterAddr off; | AdvRouterAddr off; | ||
- | # The length of time in seconds (relative to the time the packet is | + | # The length of time in seconds (relative to the time the packet is |
# sent) that the prefix is valid for the purpose of on-link de- | # sent) that the prefix is valid for the purpose of on-link de- | ||
- | # termination. The symbolic value infinity represents infinity | + | # termination. The symbolic value infinity represents infinity |
# (i.e. a value of all one bits (0xffffffff)). The valid lifetime | # (i.e. a value of all one bits (0xffffffff)). The valid lifetime | ||
# is also used by RFC 4862. | # is also used by RFC 4862. | ||
Zeile 1562: | Zeile 1354: | ||
# Note: RFC4861' | # Note: RFC4861' | ||
# 30 days. | # 30 days. | ||
- | AdvValidLifetime | + | AdvValidLifetime |
# The length of time in seconds (relative to the time the packet | # The length of time in seconds (relative to the time the packet | ||
Zeile 1572: | Zeile 1364: | ||
# Note: RFC4861' | # Note: RFC4861' | ||
# 7 days. | # 7 days. | ||
- | AdvPreferredLifetime | + | AdvPreferredLifetime |
}; | }; | ||
- | # route for global-scope address prefix | + | |
- | | + | |
{ | { | ||
- | # The preference associated with the default router, as either | + | # The preference associated with the default router, as either |
# " | # " | ||
- | AdvRoutePreference | + | AdvRoutePreference |
# The lifetime associated with the route in units of seconds. The | # The lifetime associated with the route in units of seconds. The | ||
Zeile 1587: | Zeile 1378: | ||
# | # | ||
# Default: 3 * MaxRtrAdvInterval | # Default: 3 * MaxRtrAdvInterval | ||
- | AdvRouteLifetime | + | AdvRouteLifetime |
}; | }; | ||
- | | + | prefix |
- | prefix {{ radvd_ula_prefix }}{{ radvd_ula_netmask }} | + | |
{ | { | ||
- | # When set, indicates that this prefix can be used for on-link | + | # When set, indicates that this prefix can be used for on-link |
# determination. When not set the advertisement makes no statement | # determination. When not set the advertisement makes no statement | ||
# about on-link or off-link properties of the prefix. For instance, | # about on-link or off-link properties of the prefix. For instance, | ||
# the prefix might be used for address configuration with some of | # the prefix might be used for address configuration with some of | ||
- | # the addresses belonging to the prefix being on-link and others | + | # the addresses belonging to the prefix being on-link and others |
# being off-link. | # being off-link. | ||
- | AdvOnLink on; | + | AdvOnLink on; |
- | # When set, indicates that this prefix can be used for autonomous | + | # When set, indicates that this prefix can be used for autonomous |
# address configuration as specified in RFC 4862. | # address configuration as specified in RFC 4862. | ||
- | # A-flag - if it is set to on, this informs hosts that they can | + | # A-flag - if it is set to on, this informs hosts that they can |
# auto-generate GUA address using SLAAC. If it is set to off means | # auto-generate GUA address using SLAAC. If it is set to off means | ||
# that auto-configuration is not allowed for this segment. | # that auto-configuration is not allowed for this segment. | ||
- | {% if radvd_ipv6_mode == " | ||
AdvAutonomous off; | AdvAutonomous off; | ||
- | {% else %} | ||
- | AdvAutonomous on; | ||
- | {% endif %} | ||
# When set, indicates that the address of interface is sent instead | # When set, indicates that the address of interface is sent instead | ||
- | # of network prefix, as is required by Mobile IPv6. When set, | + | # of network prefix, as is required by Mobile IPv6. When set, |
# minimum limits specified by Mobile IPv6 are used for | # minimum limits specified by Mobile IPv6 are used for | ||
# MinRtrAdvInterval and MaxRtrAdvInterval. | # MinRtrAdvInterval and MaxRtrAdvInterval. | ||
AdvRouterAddr off; | AdvRouterAddr off; | ||
- | # The length of time in seconds (relative to the time the packet is | + | # The length of time in seconds (relative to the time the packet is |
# sent) that the prefix is valid for the purpose of on-link de- | # sent) that the prefix is valid for the purpose of on-link de- | ||
- | # termination. The symbolic value infinity represents infinity | + | # termination. The symbolic value infinity represents infinity |
# (i.e. a value of all one bits (0xffffffff)). The valid lifetime | # (i.e. a value of all one bits (0xffffffff)). The valid lifetime | ||
# is also used by RFC 4862. | # is also used by RFC 4862. | ||
Zeile 1629: | Zeile 1415: | ||
# Note: RFC4861' | # Note: RFC4861' | ||
# 30 days. | # 30 days. | ||
- | AdvValidLifetime | + | AdvValidLifetime |
# The length of time in seconds (relative to the time the packet | # The length of time in seconds (relative to the time the packet | ||
Zeile 1639: | Zeile 1425: | ||
# Note: RFC4861' | # Note: RFC4861' | ||
# 7 days. | # 7 days. | ||
- | AdvPreferredLifetime | + | AdvPreferredLifetime |
- | }; | + | }; |
- | #route for unique local prefix | + | |
- | | + | |
{ | { | ||
- | # The preference associated with the default router, as either | + | # The preference associated with the default router, as either |
# " | # " | ||
- | AdvRoutePreference | + | AdvRoutePreference |
# The lifetime associated with the route in units of seconds. The | # The lifetime associated with the route in units of seconds. The | ||
# symbolic value infinity represents infinity (i.e. a value of | # symbolic value infinity represents infinity (i.e. a value of | ||
# all one bits (0xffffffff)). | # all one bits (0xffffffff)). | ||
- | # | + | # |
# Default: 3 * MaxRtrAdvInterval | # Default: 3 * MaxRtrAdvInterval | ||
- | AdvRouteLifetime | + | AdvRouteLifetime |
}; | }; | ||
+ | | ||
+ | }; | ||
+ | </ | ||
+ | Wollen wir die Kondfigurationsdate ohne die Kommentare sehen, grep' | ||
+ | # grep -Ev ' | ||
+ | |||
+ | ++++ Beispielkonfigurationsdatei ohne Kommentare | | ||
+ | < | ||
+ | { | ||
+ | AdvSendAdvert on; | ||
+ | MaxRtrAdvInterval 600; | ||
+ | MinRtrAdvInterval 200; | ||
+ | AdvDefaultPreference medium; | ||
+ | AdvHomeAgentFlag off; | ||
+ | AdvManagedFlag on; | ||
+ | AdvOtherConfigFlag on; | ||
+ | AdvReachableTime 0; | ||
+ | AdvRetransTimer 0; | ||
+ | AdvCurHopLimit 64; | ||
+ | AdvDefaultLifetime 1800; | ||
+ | AdvSourceLLAddress on; | ||
+ | prefix 2003: | ||
+ | { | ||
+ | AdvOnLink on; | ||
+ | AdvAutonomous on; | ||
+ | AdvRouterAddr off; | ||
+ | AdvValidLifetime 5400; | ||
+ | AdvPreferredLifetime 2700; | ||
+ | }; | ||
+ | route 2003: | ||
+ | { | ||
+ | AdvRoutePreference medium; | ||
+ | AdvRouteLifetime 1800; | ||
+ | }; | ||
+ | prefix fdb6: | ||
+ | { | ||
+ | AdvOnLink on; | ||
+ | AdvAutonomous off; | ||
+ | AdvRouterAddr off; | ||
+ | AdvValidLifetime 5400; | ||
+ | AdvPreferredLifetime 2700; | ||
+ | }; | ||
+ | route fdb6: | ||
+ | { | ||
+ | AdvRoutePreference medium; | ||
+ | AdvRouteLifetime 1800; | ||
+ | }; | ||
+ | | ||
}; | }; | ||
+ | </ | ||
+ | ++++ | ||
+ | |||
+ | Bevor wir nun unseren **radvd** starten, führen wir noch einen Konfigurationstest durch. | ||
+ | Wir prüfen also nun die Konfigurationsdatei unseres **radvd** auf syntaktische Fehler. | ||
+ | # radvd -cC / | ||
+ | |||
+ | [Jul 09 17:59:05] radvd (1264): config file, / | ||
+ | |||
+ | Nun starten wir unseren **radvd** Daemon. | ||
+ | # systemctl start radvd.service | ||
+ | |||
+ | Im journald wir der Start entsprechend dokumentiert. | ||
+ | # journalctl -fu radvd | ||
+ | |||
+ | < | ||
+ | Jul 09 18:00:37 vml000110 radvd[1296]: | ||
+ | Bei Bedarf können wir natürlich auch den Status unseres Daemons jederzeit abfragen. | ||
+ | # systemctl status radvd.service | ||
+ | |||
+ | < | ||
+ | <font style=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | Main PID: 1296 (radvd) | ||
+ | Tasks: 2 (limit: 9510) | ||
+ | | ||
+ | CPU: 13ms | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Jul 09 18:00:37 vml000110 systemd[1]: Started IPv6 Router Advertisement Daemon. | ||
+ | Jul 09 18:00:37 vml000110 radvd[1296]: | ||
+ | </ | ||
+ | |||
+ | |||
+ | Nun prüfen wir, ob unser **radvd** auch die richtigen Router Advertisement ICMPv6 Nachrichten ins Netz schickt. Hier bieten sich zwei mögliche Varianten an: | ||
+ | - Mit dem Programm **'' | ||
+ | # radvd configuration generated by radvdump 2.18 | ||
+ | # based on Router Advertisement from fe80:: | ||
+ | # received by interface enp0s25 | ||
# | # | ||
- | # END ANSIBLE MANAGED | + | |
+ | interface enp0s25 | ||
+ | { | ||
+ | AdvSendAdvert on; | ||
+ | | ||
+ | AdvManagedFlag on; | ||
+ | AdvOtherConfigFlag on; | ||
+ | AdvReachableTime 0; | ||
+ | AdvRetransTimer 0; | ||
+ | AdvCurHopLimit 64; | ||
+ | AdvDefaultLifetime 1800; | ||
+ | AdvHomeAgentFlag off; | ||
+ | AdvDefaultPreference medium; | ||
+ | AdvSourceLLAddress on; | ||
+ | |||
+ | prefix 2001: | ||
+ | { | ||
+ | AdvValidLifetime 5400; | ||
+ | AdvPreferredLifetime 2700; | ||
+ | AdvOnLink on; | ||
+ | AdvAutonomous on; | ||
+ | AdvRouterAddr off; | ||
+ | }; # End of prefix definition | ||
+ | |||
+ | |||
+ | prefix fdb6: | ||
+ | { | ||
+ | AdvValidLifetime 5400; | ||
+ | AdvPreferredLifetime 2700; | ||
+ | AdvOnLink on; | ||
+ | AdvAutonomous off; | ||
+ | AdvRouterAddr off; | ||
+ | }; # End of prefix definition | ||
+ | |||
+ | |||
+ | route 2001: | ||
+ | { | ||
+ | AdvRoutePreference medium; | ||
+ | AdvRouteLifetime 1800; | ||
+ | }; # End of route definition | ||
+ | |||
+ | |||
+ | route fdb6: | ||
+ | { | ||
+ | AdvRoutePreference medium; | ||
+ | AdvRouteLifetime 1800; | ||
+ | }; # End of route definition | ||
+ | |||
+ | }; # End of interface definition</ | ||
+ | - Mit Hilfe von **'' | ||
+ | 18: | ||
+ | hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms | ||
+ | prefix info option (3), length 32 (4): 2003: | ||
+ | prefix info option (3), length 32 (4): fdb6: | ||
+ | route info option (24), length 24 (3): 2003: | ||
+ | route info option (24), length 24 (3): fdb6: | ||
+ | source link-address option (1), length 8 (1): 52: | ||
+ | ^C | ||
+ | 1 packet captured | ||
+ | 1 packet received by filter | ||
+ | 0 packets dropped by kernel | ||
+ | </ | ||
+ | |||
+ | |||
+ | === kea-dhcp6 Konfiguration === | ||
+ | Wir brauchen jetzt natürlich für die statischen **ULA** noch eine passende Konfigurationsdatei. Wir greifen nun kurz dem Kapitel **[[linux: | ||
+ | |||
+ | # vim / | ||
+ | ++++ Beispielkonfigurationsdatei ohne Kommentare | | ||
+ | < | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | ++++ | ||
+ | |||
+ | === IP-Adresse am Client === | ||
+ | Fragen wir die IP-Adresse des Netzwerkinterfaces ab sehen wir: | ||
+ | django@nitropad: | ||
+ | < | ||
+ | link/ether 3c: | ||
+ | inet 10.0.10.73/ | ||
+ | | ||
+ | inet6 fdb6: | ||
+ | | ||
+ | inet6 2001: | ||
+ | | ||
+ | inet6 2001: | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | |||
+ | <WRAP center round tip 80%> | ||
+ | Wir haben neben der **IPv4** Adresse **'' | ||
+ | </ | ||
+ | ===== Orchestrierung - Installation und Konfiguration des radvd mit Hilfe von Ansible | ||
+ | ==== Aufgabenstellung ==== | ||
+ | Natürlich wird man im Jahr 2024 nicht mehr ernsthaft, manuell Server aufsetzen und betreiben wollen. Vielmehr wird man auf ein Orchestrierungswerkzeug wie z.B. **[[linux: | ||
+ | |||
+ | Wir werden uns nun nachfolgend die Server-Installation und -konfiguration genauer betrachten. | ||
+ | |||
+ | ==== Lösung ==== | ||
+ | |||
+ | <WRAP center round tip 80%> | ||
+ | Der ungeduldigen Leser kann auch direkt zur Tat schreiten und das manuelle Anlegen der Inventory-Hülle, | ||
+ | |||
+ | < | ||
+ | |||
+ | Nach Anpassung der Daten im Inventory kann man anschliessend direkt **[[# | ||
+ | </ | ||
+ | |||
+ | === Vorbereitung - (Server-)Daten im Inventory === | ||
+ | Bei unserem Konfigurationsbeispiel hier gehen wir von folgenden Host-Parametern aus: | ||
+ | * **'' | ||
+ | * **'' | ||
+ | |||
+ | Die Konfigurationsdatei unseres **inventory** in unsere, Ansible-Verzeichnis beinhaltet demnach unter anderem: | ||
+ | $ vim inventories/ | ||
+ | ++++ inventories/ | ||
+ | <file bash inventories/ | ||
+ | # | ||
+ | # Hinweise: | ||
+ | # - Kommentare beginnen mit einem '#' | ||
+ | # - leere Zeilen werden ignoriert | ||
+ | # - Host- und Gruppendefinitionen werden mit [] abgegrenzt | ||
+ | # - Hosts können über ihren Hostnamen, FQN oder ihrer IP-Adresse definiert | ||
+ | # - übergeordnete Gruppen werden durch [:children] abgegrenzt | ||
+ | # | ||
+ | # Host-Definitionen | ||
+ | |||
+ | # Hosts ohne Gruppenzuordnung | ||
+ | localhost | ||
+ | |||
+ | [edmz] | ||
+ | vml000210 | ||
+ | |||
+ | [idmz] | ||
+ | vml000110 | ||
+ | |||
+ | [intra] | ||
+ | vml010110 | ||
+ | |||
+ | |||
+ | # Host-Gruppen-Definitionen | ||
+ | # (zu welcher Gruppe gehören Untergruppen bzw. Hosts) | ||
+ | |||
+ | [linux: | ||
+ | intra | ||
+ | edmz | ||
+ | idmz | ||
</ | </ | ||
+ | ++++ | ||
+ | |||
+ | Bei den Host-Variablen definieren wir über die Variable **'' | ||
+ | |||
+ | Bei der Definition unseres KVM-Hosts hatten wir unter anderem definiert: | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | |||
+ | ++++ inventories/ | ||
+ | <file bash inventories/ | ||
+ | guest_ip6_net_2: | ||
+ | guest_mask6_2: | ||
+ | guest_ip6_ls_fx_2: | ||
+ | guest_zone_2: | ||
+ | </ | ||
+ | ++++ | ||
+ | |||
+ | Die für den **radvd** relevanten Konfigurationsparameter legen wir in der Inventrory-Datei **'' | ||
+ | $ vim inventories/ | ||
+ | ++++ inventories/ | ||
+ | |||
+ | {{gh> https:// | ||
+ | |||
+ | ++++ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | === Playbook === | ||
+ | Unser Playbook zum Installieren und Konfigurieren unseres Router Advertisement Daemon **radvd**, ist unscheinbar und unspektakulär. | ||
+ | $ vim playbooks/ | ||
+ | |||
+ | {{gh> https:// | ||
+ | |||
+ | === Rolle === | ||
+ | Für die Konfiguration unseres **radvd** verwenden wir eine eigene Rolle **'' | ||
+ | $ cp -avr roles/ | ||
+ | < | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | </ | ||
+ | |||
+ | Bei Bedarf können wir uns die Struktur die somit angelegt wurde mit nachfolgendem Befehl anzeigen lassen. | ||
+ | $ tree roles/ | ||
+ | |||
+ | ++++ Ausgabe von tree roles/ | ||
+ | < | ||
+ | ├── defaults | ||
+ | ├── files | ||
+ | ├── handlers | ||
+ | ├── library | ||
+ | ├── lookup_plugins | ||
+ | ├── meta | ||
+ | ├── module_utils | ||
+ | ├── tasks | ||
+ | │ ├── firewalld.yml | ||
+ | │ ├── install.yml | ||
+ | │ ├── main.yml | ||
+ | │ └── variablencheck.yml | ||
+ | ├── templates | ||
+ | │ ├── radvd_both_config.j2 | ||
+ | │ └── radvd_single_config.j2 | ||
+ | └── vars | ||
+ | </ | ||
+ | ++++ | ||
+ | |||
+ | Wie wir sehen ist die Rolle durchaus überschaubar, | ||
+ | $ vim roles/ | ||
+ | |||
+ | {{gh> https:// | ||
+ | |||
+ | Bei der Konfiguration unseres **radvd** haben wir in unserem Konfigurationsbeispiel, | ||
+ | |||
+ | <WRAP center round tip 80%> | ||
+ | Für die Überlegungen welche Adressen und wie diese bezogen werden, hilf unter anderem der **[[https:// | ||
+ | </ | ||
+ | |||
+ | Die Konfiguration welcher Adresstyp und ob **SLAAC** und|oder **DHCPv6** zum Einsatz kommen wird, wird im Inventory mit den beiden Variablen **'' | ||
+ | |||
+ | GUA-/ | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | |||
+ | |||
+ | Um sicher zu stellen, dass die beiden Variablen **'' | ||
+ | $ vim roles/ | ||
+ | |||
+ | {{gh> https:// | ||
+ | |||
+ | Die eigentliche Installation und Konfiguration erfolgt dann im Task **'' | ||
+ | $ vim roles/ | ||
+ | |||
+ | {{gh> https:// | ||
+ | |||
+ | Die Anpassung an unserer Firewall-Konfiguration | ||
+ | $ vim roles/ | ||
+ | |||
+ | {{gh> https:// | ||
+ | |||
+ | Die beiden Templates **'' | ||
+ | Das Template **'' | ||
+ | $ vim roles/ | ||
+ | |||
+ | {{gh> https:// | ||
+ | |||
+ | Sollen sowohl **GUA** wie **ULA** zum Einsatz kommen wird das zweite Template **'' | ||
+ | $ vim roles/ | ||
+ | {{gh> https:// | ||
Zeile 1695: | Zeile 1931: | ||
</ | </ | ||
+ | /* | ||
+ | [15:40:36] Gathering Facts | ||
+ | ↳ vml010110 | SUCCESS | 3.43s | ||
+ | [15:40:40] radvd : Prüfen ob die Variablen für GUA und ULA valide Werte haben. | ||
+ | ↳ vml010110 | SUCCESS | 12ms | ||
+ | [15: | ||
+ | ↳ vml010110 | SUCCESS | 34ms | ||
+ | [15: | ||
+ | ↳ vml010110 | SUCCESS | 34ms | ||
+ | [15: | ||
+ | vml010110 | SKIPPED | 19ms | ||
+ | [15:40:40] radvd : Installation und Konfiguration des Router Advertisement Daemon radvd. | ||
+ | ↳ vml010110 | SUCCESS | 13ms | ||
+ | [15: | ||
+ | ↳ vml010110 | SUCCESS | 4.12s | ||
+ | [15: | ||
+ | ↳ vml010110 | SUCCESS | 765ms | ||
+ | [15: | ||
+ | vml010110 | SKIPPED | 18ms | ||
+ | [15: | ||
+ | vml010110 | SKIPPED | 17ms | ||
+ | [15: | ||
+ | ↳ vml010110 | CHANGED | 1.30s | ||
+ | [15: | ||
+ | ↳ vml010110 | CHANGED | 1.08s | ||
+ | [15:40:47] radvd : Konfiguration des firewalld für den Router Advertisement Daemon radvd. | ||
+ | ↳ vml010110 | SUCCESS | 16ms | ||
+ | [15: | ||
+ | ↳ vml010110 | CHANGED | 1.12s | ||
+ | [15: | ||
+ | ↳ vml010110 | SUCCESS | 874ms | ||
+ | [15: | ||
+ | ↳ vml010110 | CHANGED | 852ms | ||
+ | [15:40:50] system | ||
+ | -- Play recap -- | ||
+ | vml010110 | ||
+ | ✔ ~/ | ||
+ | |||
+ | */ | ||
+ | FIXME | ||
=== Ergebniskontrolle === | === Ergebniskontrolle === | ||
Nun prüfen wir, ob unser **radvd** auch die richtigen Router Advertisement ICMPv6 Nachrichten ins Netz schickt. Hier bieten sich zwei mögliche Varianten an: | Nun prüfen wir, ob unser **radvd** auch die richtigen Router Advertisement ICMPv6 Nachrichten ins Netz schickt. Hier bieten sich zwei mögliche Varianten an: | ||
Zeile 1752: | Zeile 2028: | ||
}; # End of interface definition</ | }; # End of interface definition</ | ||
- Mit Hilfe von **'' | - Mit Hilfe von **'' | ||
- | 22:58:47.643378 | + | 22:23:42.141271 |
hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms | hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms | ||
prefix info option (3), length 32 (4): 2001: | prefix info option (3), length 32 (4): 2001: |