<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="group-replication-ipv6">
      </a>
      20.5.5 Support For IPv6 And For Mixed IPv6 And IPv4 Groups
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045132868704">
  </a>
  <a class="indexterm" name="idm46045132867248">
  </a>
  <p>
   Group Replication group members can use IPv6 addresses as an
      alternative to IPv4 addresses for communications within the group.
      To use IPv6 addresses, the operating system on the server host and
      the MySQL Server instance must both be configured to support IPv6.
      For instructions to set up IPv6 support for a server instance, see
   <a class="xref" href="ipv6-support.html" title="7.1.13 IPv6 Support">
    Section 7.1.13, “IPv6 Support”
   </a>
   .
  </p>
  <p>
   IPv6 addresses, or host names that resolve to them, can be
      specified as the network address that the member provides in the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
    <code class="literal">
     group_replication_local_address
    </code>
   </a>
   option for connections from other members. When specified with a
      port number, an IPv6 address must be specified in square brackets,
      for example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-simple"><div class="docs-select-all right" id="sa53742953"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">group_replication_local_address<span class="token operator">=</span> "<span class="token punctuation">[</span>2001<span class="token operator">:</span>db8<span class="token operator">:</span>85a3<span class="token operator">:</span>8d3<span class="token operator">:</span>1319<span class="token operator">:</span>8a2e<span class="token operator">:</span>370<span class="token operator">:</span>7348<span class="token punctuation">]</span><span class="token operator">:</span>33061"</code></pre>
  </div>
  <p>
   The network address or host name specified in
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
    <code class="literal">
     group_replication_local_address
    </code>
   </a>
   is used by Group Replication as the unique identifier for a group
      member within the replication group. If a host name specified as
      the Group Replication local address for a server instance resolves
      to both an IPv4 and an IPv6 address, the IPv4 address is always
      used for Group Replication connections. The address or host name
      specified as the Group Replication local address is not the same
      as the MySQL server SQL protocol host and port, and is not
      specified in the
   <a class="link" href="server-system-variables.html#sysvar_bind_address">
    <code class="literal">
     bind_address
    </code>
   </a>
   system variable for the server instance. For the purpose of IP
      address permissions for Group Replication (see
   <a class="xref" href="group-replication-ip-address-permissions.html" title="20.6.4 Group Replication IP Address Permissions">
    Section 20.6.4, “Group Replication IP Address Permissions”
   </a>
   ), the
      address that you specify for each group member in
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
    <code class="literal">
     group_replication_local_address
    </code>
   </a>
   must be added to the list for the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
    <code class="literal">
     group_replication_ip_allowlist
    </code>
   </a>
   system variable on the other servers in the replication group.
  </p>
  <p>
   A replication group can contain a combination of members that
      present an IPv6 address as their Group Replication local address,
      and members that present an IPv4 address. When a server joins such
      a mixed group, it must make the initial contact with the seed
      member using the protocol that the seed member advertises in the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
    <code class="literal">
     group_replication_group_seeds
    </code>
   </a>
   option, whether that is IPv4 or IPv6. If any of the seed members
      for the group are listed in the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
    <code class="literal">
     group_replication_group_seeds
    </code>
   </a>
   option with an IPv6 address when a joining member has an IPv4
      Group Replication local address, or the reverse, you must also set
      up and permit an alternative address for the joining member for
      the required protocol (or a host name that resolves to an address
      for that protocol). If a joining member does not have a permitted
      address for the appropriate protocol, its connection attempt is
      refused. The alternative address or host name only needs to be
      added to the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
    <code class="literal">
     group_replication_ip_allowlist
    </code>
   </a>
   system variable on the other servers in the replication group, not
      to the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
    <code class="literal">
     group_replication_local_address
    </code>
   </a>
   value for the joining member (which can only contain a single
      address).
  </p>
  <p>
   For example, server A is a seed member for a group, and has the
      following configuration settings for Group Replication, so that it
      is advertising an IPv6 address in the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
    <code class="literal">
     group_replication_group_seeds
    </code>
   </a>
   option:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-simple"><div class="docs-select-all right" id="sa67998240"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">group_replication_bootstrap_group<span class="token operator">=</span>on
group_replication_local_address<span class="token operator">=</span> "<span class="token punctuation">[</span>2001<span class="token operator">:</span>db8<span class="token operator">:</span>85a3<span class="token operator">:</span>8d3<span class="token operator">:</span>1319<span class="token operator">:</span>8a2e<span class="token operator">:</span>370<span class="token operator">:</span>7348<span class="token punctuation">]</span><span class="token operator">:</span>33061"
group_replication_group_seeds<span class="token operator">=</span> "<span class="token punctuation">[</span>2001<span class="token operator">:</span>db8<span class="token operator">:</span>85a3<span class="token operator">:</span>8d3<span class="token operator">:</span>1319<span class="token operator">:</span>8a2e<span class="token operator">:</span>370<span class="token operator">:</span>7348<span class="token punctuation">]</span><span class="token operator">:</span>33061"</code></pre>
  </div>
  <p>
   Server B is a joining member for the group, and has the following
      configuration settings for Group Replication, so that it has an
      IPv4 Group Replication local address:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-simple"><div class="docs-select-all right" id="sa40373293"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">group_replication_bootstrap_group<span class="token operator">=</span>off
group_replication_local_address<span class="token operator">=</span> "203<span class="token punctuation">.</span>0<span class="token punctuation">.</span>113<span class="token punctuation">.</span>21<span class="token operator">:</span>33061"
group_replication_group_seeds<span class="token operator">=</span> "<span class="token punctuation">[</span>2001<span class="token operator">:</span>db8<span class="token operator">:</span>85a3<span class="token operator">:</span>8d3<span class="token operator">:</span>1319<span class="token operator">:</span>8a2e<span class="token operator">:</span>370<span class="token operator">:</span>7348<span class="token punctuation">]</span><span class="token operator">:</span>33061"</code></pre>
  </div>
  <p>
   Server B also has an alternative IPv6 address
   <code class="literal">
    2001:db8:8b0:40:3d9c:cc43:e006:19e8
   </code>
   . For Server
      B to join the group successfully, both its IPv4 Group Replication
      local address, and its alternative IPv6 address, must be listed in
      Server A's allowlist, as in the following example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-simple"><div class="docs-select-all right" id="sa59846858"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">group_replication_ip_allowlist<span class="token operator">=</span>
"203<span class="token punctuation">.</span>0<span class="token punctuation">.</span>113<span class="token punctuation">.</span>0<span class="token operator">/</span>24<span class="token punctuation">,</span>2001<span class="token operator">:</span>db8<span class="token operator">:</span>85a3<span class="token operator">:</span>8d3<span class="token operator">:</span>1319<span class="token operator">:</span>8a2e<span class="token operator">:</span>370<span class="token operator">:</span>7348<span class="token punctuation">,</span>
2001<span class="token operator">:</span>db8<span class="token operator">:</span>8b0<span class="token operator">:</span>40<span class="token operator">:</span>3d9c<span class="token operator">:</span>cc43<span class="token operator">:</span>e006<span class="token operator">:</span>19e8"</code></pre>
  </div>
  <p>
   As a best practice for Group Replication IP address permissions,
      Server B (and all other group members) should have the same
      allowlist as Server A, unless security requirements demand
      otherwise.
  </p>
  <p>
   If any or all members of a replication group are using an older
      MySQL Server version that does not support the use of IPv6
      addresses for Group Replication, a member cannot participate in
      the group using an IPv6 address (or a host name that resolves to
      one) as its Group Replication local address. This applies both in
      the case where at least one existing member uses an IPv6 address
      and a new member that does not support this attempts to join, and
      in the case where a new member attempts to join using an IPv6
      address but the group includes at least one member that does not
      support this. In each situation, the new member cannot join. To
      make a joining member present an IPv4 address for group
      communications, you can either change the value of
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
    <code class="literal">
     group_replication_local_address
    </code>
   </a>
   to an IPv4 address, or configure your DNS to resolve the joining
      member's existing host name to an IPv4 address. After you have
      upgraded every group member to a MySQL Server version that
      supports IPv6 for Group Replication, you can change the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
    <code class="literal">
     group_replication_local_address
    </code>
   </a>
   value for each member to an IPv6 address, or configure your DNS to
      present an IPv6 address. Changing the value of
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
    <code class="literal">
     group_replication_local_address
    </code>
   </a>
   takes effect only when you stop and restart Group Replication.
  </p>
  <p>
   IPv6 addresses can also be used as distributed recovery endpoints,
      which can be specified using the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_advertise_recovery_endpoints">
    <code class="literal">
     group_replication_advertise_recovery_endpoints
    </code>
   </a>
   system variable. The same rules apply to addresses used in this
      list. See
   <a class="xref" href="group-replication-distributed-recovery-connections.html" title="20.5.4.1 Connections for Distributed Recovery">
    Section 20.5.4.1, “Connections for Distributed Recovery”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
