Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| linux:radvd [06.07.2024 19:47. ] – [Rolle] django | linux:radvd [10.07.2024 18:40. ] (aktuell) – [RA — Router Advertisement (ICMPv6 type 134)] django | ||
|---|---|---|---|
| Zeile 61: | 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 67: | 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 174: | 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: | ||
| - | - **[[# | + | - **[[# |
| - | - **[[# | + | - **[[# |
| + | - **[[# | ||
| </ | </ | ||
| - | ==== 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 226: | 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 698: | 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 763: | Zeile 763: | ||
| </ | </ | ||
| - | ==== Router Advertisement ICMPv6-Nachrichten für Stateful DHCPv6 | + | ==== Konfigurationsbeispiel DHCPv6 ==== |
| + | === Router Advertisement ICMPv6-Nachrichten für Stateful DHCPv6 === | ||
| Ein **Stateful DHCPv6-Server** liefert neben IPv6-Adressen auch weitere Informationen, | Ein **Stateful DHCPv6-Server** liefert neben IPv6-Adressen auch weitere Informationen, | ||
| Zeile 1159: | 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! | ||
| + | ==== Musterkonfiguration GUA via SLAAC und ULA via DHCPv6 ==== | ||
| + | === Grundüberlegungen === | ||
| + | In den beiden vorgenannten Konfigurationsbeispielen **[[# | ||
| + | |||
| + | 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 und welche sollen letztendlich auch wirklich genutzt werden. Nun Gut, die **L**ink **L**ocla **A**ddress generiert ein Host selbst wie wir bereits wissen, denn ohne diese könnte er z.B. kein SLAAC initiieren. | ||
| + | |||
| + | <WRAP center round important 80%> | ||
| + | Betrachten wir also nun die **U**nified **L**ocal **A**ddress, | ||
| + | </ | ||
| + | <WRAP center round info 80%> | ||
| + | |||
| + | Je länger man sich nun mit der ganzen Thematik um nicht Misere zu sagen beschäftigt kommt man zu folgender Musterkonfigurationslösung: | ||
| + | - **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. | ||
| + | - Gästen oder entsprechenden Geräte lassen wir aus einem dynamischen Pool **ULA** zuweisen. | ||
| + | - **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 | ||
| + | </ | ||
| + | |||
| + | <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 = **'' | ||
| + | |||
| + | O.K. das **'' | ||
| + | </ | ||
| + | |||
| + | === radvd Konfiguration === | ||
| + | Wie wir aber dennoch eine funktionierende Konfiguration des **radvd** hierzu hinbekommen werden wir uns nun ansehen. **SPOILER**: | ||
| + | |||
| + | * **Netzwerkinterface** : \\ Der **radvd** soll auf dem Netzwerkinterface **'' | ||
| + | * **GUA** | ||
| + | * **SLAAC** : \\ Clients sollen sich über den Mechanismus **SLAAC** selbst öffentliche IPv6-Adressen generieren und das ohne Zuhilfenahme eines DHCPv6-Servers bei der Adressvergabe! | ||
| + | * **Global-Scope Address Prefix** : \\ **'' | ||
| + | * **Route** : \\ **'' | ||
| + | * **AdvRouteLifetime** : \\ Gültigkeit der Routen Lifetime | ||
| + | * **M-Flag**: \\ AdvManagedFlag = **'' | ||
| + | * **O-Flag**: \\ AdvOtherConfigFlag = **'' | ||
| + | * **A-Flag**: \\ AdvAutonomous = **'' | ||
| + | * **ULA** | ||
| + | * **DHCPv6** : \\ Der **radvd** lauscht auf dem Netzwerkinterface **'' | ||
| + | * **Unique Local IPv6 prefix** : \\ Hier verwenden wir den zuvor erzeugten Unique Local IPv6 prefix von **'' | ||
| + | * **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 = **'' | ||
| + | |||
| + | Daraus ergibt sich nun folgende Konfigurationsdatei für unseren radvd: | ||
| + | # vim / | ||
| + | <file bash / | ||
| + | # for GUA and SLAAC as well as ULA with DHCPv6 | ||
| + | # | ||
| + | # - O-flag: AdvOtherConfigFlag = on (obtaining a DNS server list | ||
| + | # and a domain name from a Stateless DHCPv6 server, but | ||
| + | # not addressing information. | ||
| + | # - M-flag: AdvManagedFlag = off (address configuration via SLAAC for GUA) | ||
| + | # - A-flag: AdvAutonomous = on (address configuration via SLAAC for GUA) | ||
| + | # - A-flag: AdvAutonomous = off (address configuration via DHCPv6 for static ULA) | ||
| + | |||
| + | interface eth1 | ||
| + | { | ||
| + | # A flag indicating | ||
| + | # router advertisements and responds to router solicitations. | ||
| + | # This option no longer has to be specified first, but it needs | ||
| + | # to be on to enable advertisement on this interface. | ||
| + | AdvSendAdvert on; | ||
| + | |||
| + | # The maximum | ||
| + | # cast router advertisements from the interface, in seconds. | ||
| + | # Must be no less than 4 seconds and no greater than 1800 seconds. | ||
| + | # Minimum when using Mobile IPv6 extensions: 0.07. | ||
| + | # For values less than 0.2 seconds, 0.02 seconds is added to | ||
| + | # account for scheduling granularities as specified in RFC3775. | ||
| + | MaxRtrAdvInterval 600; | ||
| + | |||
| + | # The minimum time allowed between sending unsolicited multicast | ||
| + | # router advertisements from the interface, in seconds. | ||
| + | # Must be no less than 3 seconds and no greater than | ||
| + | # 0.75 * MaxRtrAdvInterval. | ||
| + | # Minimum when using Mobile IPv6 extensions: 0.03. | ||
| + | MinRtrAdvInterval 200; | ||
| + | |||
| + | # The preference associated with the default router, as either | ||
| + | # " | ||
| + | AdvDefaultPreference medium; | ||
| + | |||
| + | # Mobile IPv6 support, when set, indicates that sending router is | ||
| + | # able to serve as Mobile IPv6 Home Agent. | ||
| + | # When set, minimum limits specified by Mobile IPv6 are used for | ||
| + | # MinRtrAdvInterval and MaxRtrAdvInterval. | ||
| + | AdvHomeAgentFlag off; | ||
| + | |||
| + | # When set, hosts use the administered (stateful) protocol for | ||
| + | # address | ||
| + | # autoconfigured using stateless address autoconfiguration. | ||
| + | # The use of this flag is described in RFC 4862. | ||
| + | # 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 | ||
| + | # a Stateful DHCPv6 server. Typically this means that auto- | ||
| + | # addressing using SLAAC is not allowed on this segment and both | ||
| + | # the A-flag and the O-flag are set to 0. | ||
| + | AdvManagedFlag on; | ||
| + | |||
| + | # When set, hosts use the administered (stateful) protocol for | ||
| + | # autoconfiguration of other (non-address) information. | ||
| + | # The use of this flag is described in RFC 4862 | ||
| + | # 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 | ||
| + | # DHCPv6 server, but not addressing information. Typically it | ||
| + | # works in conjunction with SLAAC for auto-addressing and both | ||
| + | # the A-flag and the O-flag are set to on. | ||
| + | # | ||
| + | AdvOtherConfigFlag on; | ||
| + | |||
| + | # The time, in milliseconds, | ||
| + | # reachable after having received a reachability confirmation. | ||
| + | # Used by the Neighbor Unreachability Detection algorithm (see | ||
| + | # Section 7.3 of RFC 4861). | ||
| + | # A value of zero means unspecified (by this router). | ||
| + | # Must be no greater than 3,600,000 milliseconds (1 hour). | ||
| + | AdvReachableTime 0; | ||
| + | |||
| + | # The time,in milliseconds, | ||
| + | # citation messages. Used by address resolution and the Neighbor | ||
| + | # Unreachability Detection algorithm (see Sections 7.2 and 7.3 | ||
| + | # of RFC 4861). | ||
| + | AdvRetransTimer 0; | ||
| + | |||
| + | # The default value that should be placed in the Hop Count field of | ||
| + | # the IP header for outgoing (unicast) IP packets. The value should | ||
| + | # be set to the current diameter of the Internet. | ||
| + | # The value zero means unspecified (by this router). | ||
| + | AdvCurHopLimit 64; | ||
| + | |||
| + | # The lifetime associated with the default router in units of seconds. | ||
| + | # The maximum value corresponds to 18.2 hours. A lifetime of 0 indi- | ||
| + | # cates that the router is not a default router and should not appear | ||
| + | # on the default router list. The router lifetime applies only to the | ||
| + | # router' | ||
| + | # formation contained in other message fields or options. Options that | ||
| + | # need time limits for their information include their own lifetime | ||
| + | # fields. | ||
| + | # Must be either zero or between MaxRtrAdvInterval and 9000 seconds. | ||
| + | # Default: 3 * MaxRtrAdvInterval (Minimum 1 second). | ||
| + | AdvDefaultLifetime 1800; | ||
| + | |||
| + | # When set, the link-layer address of the outgoing interface is | ||
| + | # included in the RA. | ||
| + | AdvSourceLLAddress on; | ||
| + | |||
| + | # global-scope adress prefix | ||
| + | prefix 2003: | ||
| + | { | ||
| + | # When set, indicates that this prefix can be used for on-link | ||
| + | # determination. When not set the advertisement makes no statement | ||
| + | # about on-link or off-link properties of the prefix. For instance, | ||
| + | # the prefix might be used for address configuration with some of | ||
| + | # the addresses belonging to the prefix being on-link and others | ||
| + | # being off-link. | ||
| + | AdvOnLink on; | ||
| + | |||
| + | # When set, indicates that this prefix can be used for autonomous | ||
| + | # address configuration as specified in RFC 4862. | ||
| + | # 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 | ||
| + | # that auto-configuration is not allowed for this segment. | ||
| + | AdvAutonomous on; | ||
| + | |||
| + | # When set, indicates that the address of interface is sent instead | ||
| + | # of network prefix, as is required by Mobile IPv6. When set, | ||
| + | # minimum limits specified by Mobile IPv6 are used for | ||
| + | # MinRtrAdvInterval and MaxRtrAdvInterval. | ||
| + | AdvRouterAddr off; | ||
| + | |||
| + | # 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- | ||
| + | # termination. The symbolic value infinity represents infinity | ||
| + | # (i.e. a value of all one bits (0xffffffff)). The valid lifetime | ||
| + | # is also used by RFC 4862. | ||
| + | # | ||
| + | # Note that clients will ignore AdvValidLifetime of an existing | ||
| + | # prefix if the lifetime is below two hours, as required in RFC | ||
| + | # 4862 Section 5.5.3 point e). | ||
| + | # Note: RFC4861' | ||
| + | # 30 days. | ||
| + | AdvValidLifetime 5400; | ||
| + | |||
| + | # The length of time in seconds (relative to the time the packet | ||
| + | # is sent) that addresses generated from the prefix via stateless | ||
| + | # address autoconfiguration remain preferred. The symbolic value | ||
| + | # infinity represents infinity (i.e. a value of all one bits | ||
| + | # (0xffffffff)). | ||
| + | # | ||
| + | # Note: RFC4861' | ||
| + | # 7 days. | ||
| + | AdvPreferredLifetime 2700; | ||
| + | }; | ||
| + | |||
| + | route 2003: | ||
| + | { | ||
| + | # The preference associated with the default router, as either | ||
| + | # " | ||
| + | AdvRoutePreference medium; | ||
| + | |||
| + | # The lifetime associated with the route in units of seconds. The | ||
| + | # symbolic value infinity represents infinity (i.e. a value of | ||
| + | # all one bits (0xffffffff)). | ||
| + | # | ||
| + | # Default: 3 * MaxRtrAdvInterval | ||
| + | AdvRouteLifetime 1800; | ||
| + | }; | ||
| + | |||
| + | prefix fdb6: | ||
| + | { | ||
| + | # When set, indicates that this prefix can be used for on-link | ||
| + | # determination. When not set the advertisement makes no statement | ||
| + | # about on-link or off-link properties of the prefix. For instance, | ||
| + | # the prefix might be used for address configuration with some of | ||
| + | # the addresses belonging to the prefix being on-link and others | ||
| + | # being off-link. | ||
| + | AdvOnLink on; | ||
| + | |||
| + | # When set, indicates that this prefix can be used for autonomous | ||
| + | # address configuration as specified in RFC 4862. | ||
| + | # 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 | ||
| + | # that auto-configuration is not allowed for this segment. | ||
| + | AdvAutonomous off; | ||
| + | |||
| + | # When set, indicates that the address of interface is sent instead | ||
| + | # of network prefix, as is required by Mobile IPv6. When set, | ||
| + | # minimum limits specified by Mobile IPv6 are used for | ||
| + | # MinRtrAdvInterval and MaxRtrAdvInterval. | ||
| + | AdvRouterAddr off; | ||
| + | |||
| + | # 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- | ||
| + | # termination. The symbolic value infinity represents infinity | ||
| + | # (i.e. a value of all one bits (0xffffffff)). The valid lifetime | ||
| + | # is also used by RFC 4862. | ||
| + | # | ||
| + | # Note that clients will ignore AdvValidLifetime of an existing | ||
| + | # prefix if the lifetime is below two hours, as required in RFC | ||
| + | # 4862 Section 5.5.3 point e). | ||
| + | # Note: RFC4861' | ||
| + | # 30 days. | ||
| + | AdvValidLifetime 5400; | ||
| + | |||
| + | # The length of time in seconds (relative to the time the packet | ||
| + | # is sent) that addresses generated from the prefix via stateless | ||
| + | # address autoconfiguration remain preferred. The symbolic value | ||
| + | # infinity represents infinity (i.e. a value of all one bits | ||
| + | # (0xffffffff)). | ||
| + | # | ||
| + | # Note: RFC4861' | ||
| + | # 7 days. | ||
| + | AdvPreferredLifetime 2700; | ||
| + | }; | ||
| + | |||
| + | route fdb6: | ||
| + | { | ||
| + | # The preference associated with the default router, as either | ||
| + | # " | ||
| + | AdvRoutePreference medium; | ||
| + | |||
| + | # The lifetime associated with the route in units of seconds. The | ||
| + | # symbolic value infinity represents infinity (i.e. a value of | ||
| + | # all one bits (0xffffffff)). | ||
| + | # | ||
| + | # Default: 3 * MaxRtrAdvInterval | ||
| + | AdvRouteLifetime 1800; | ||
| + | }; | ||
| + | | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | 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 | ||
| + | # | ||
| + | |||
| + | interface enp0s25 | ||
| + | { | ||
| + | AdvSendAdvert on; | ||
| + | # Note: {Min, | ||
| + | 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 | ===== Orchestrierung - Installation und Konfiguration des radvd mit Hilfe von Ansible | ||
| ==== Aufgabenstellung ==== | ==== Aufgabenstellung ==== | ||
| Zeile 1303: | Zeile 1854: | ||
| ++++ | ++++ | ||
| - | Wie wir sehen ist die Rolle durchaus überschaubar, | + | Wie wir sehen ist die Rolle durchaus überschaubar, |
| $ vim roles/ | $ vim roles/ | ||
| {{gh> https:// | {{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 **'' | Die eigentliche Installation und Konfiguration erfolgt dann im Task **'' | ||
| Zeile 1318: | Zeile 1888: | ||
| {{gh> https:// | {{gh> https:// | ||
| - | Das Template **'' | + | Die beiden Templates **'' |
| - | $ vim roles/ | + | Das Template **'' |
| + | $ vim roles/ | ||
| - | {{gh> https:// | + | {{gh> https:// |
| + | |||
| + | Sollen sowohl **GUA** wie **ULA** zum Einsatz kommen wird das zweite Template **'' | ||
| + | $ vim roles/ | ||
| + | |||
| + | {{gh> https:// | ||
| Zeile 1355: | 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: | ||