.. _network-switch-v4-to-v6:

Switching Network Addresses from IPv4 to IPv6
---------------------------------------------

.. _24.1|VOSS-1305:


.. index:: network;network -4 del

From release 24.1, the VOSS Automate platform supports IPv4 as well as IPv6
network addressing. Options available are:

* IPv4 only
* IPv4 and IPv6
  
  * with IPv4 as primary network
  * with IPv6 as primary network
* IPv6 only

For network address options during installation, refer to the Installation Guide:

.. raw:: html

   <a href="../install/install-details.html">Create a New VM Using the Platform-Install OVA<a>.


.. raw:: latex

   *Create a New VM Using the Platform-Install OVA*.

The steps below provide options for a system using IPv4 addresses to use:

* IPv4 and IPv6
  
  * with IPv4 as primary network
  * with IPv6 as primary network
* IPv6 only

1. Add the relevant IPv6 address to the node.

   ::

      platform@VOSS:~$ network ens160 f10d::eafe:3/112 f10d::eafe:25   
      This change might require a reprovision. Do you wish to continue [y/n]? y
      
      Reprovision NOT needed. Primary address is ipv4.
      
         ipv6:  
             gateway: f10d::eafe:25
             ip: f10d::eafe:3/112
      
      Restart your system to reflect networking changes ipv6
      
      platform@VOSS:~$

2. Reboot the node if told to do so in the output.
3. Repeat the above for steps all nodes.

.. important::

   * Stop here if you want to use both IPv4 and IPv6 with IPv4 as the primary network.
   * Continue if you want to use both IPv4 and IPv6 with IPv6 as the primary network,
     or if you only want to use IPv6.

4. Removing IPv4 addresses: on each node, remove the IPv4 address
   from the cluster with: ``cluster del <IPv4Address>``

   ::
   
      platform@VOSS:~$ cluster del 192.168.100.3
      You are about to delete a host from the cluster. Do you wish to continue? y
      Cluster successfully deleted node 192.168.100.3
      
      Please run 'cluster provision' to reprovision the services in the cluster
      
      Please note that the remote host may still be part of the database clustering and should either be shut down
      or reprovisioned as a single node BEFORE this cluster is reprovisioned
      platform@VOSS:~$
 
5. Reboot the node: ``system reboot``
6. Run ``cluster prepnode`` on each node except the primary application node

   ::
   
      platform@VOSS:~$ cluster prepnode
      You are about to add this node to a cluster.
      Do you wish to continue? y
      platform@VOSS:~$
 
7. From the primary application node, add each node to the cluster using the respective
   IPv6 address: ``cluster add <IPv6Address>``

   ::
   
      platform@VOSS:~$ cluster add a00d::eafe:3
      -> Re-using existing platform/seed as I am the only node
      Cluster successfully invited node [a00d::eafe:3]
      
      Please run 'cluster provision' to provision the services in the cluster
      platform@VOSS:~$
 
8. On the primary application node run: ``cluster provision``

   ::
   
      platform@VOSS:~$ cluster provision
      You are about to provision the cluster, which will require restarting services at a data center.
      Please ensure for a cluster, the nodes are communicating correctly with a test command such as 'cluster run all network
      list' or a 'cluster run all app status' before you proceed.
      Do you wish to continue? y
      
      
      ---------- VOSS, ip=[a00d::eafe:3], role=webproxy,application,database, loc=cpt
     
.. important::

   * Stop here if you want to use both IPv4 and IPv6 with IPv6 as the primary network.
   * Continue if you only want to use IPv6.

9. To remove IPv4 completely, delete the IPv4 addresses from each node: ``network -4 del ens160``

   ::
   
      platform@VOSS:~$ network -4 del ens160
      This change will require a reprovision. Do you wish to continue [y/n]?y
      Primary address is ipv6, setting ipv4
      
         ipv4: value not set
      
      
      
      platform@VOSS:~$
 
10. Restart the network (you will lose the SSH connection): ``network restart``
11. Post change checks include the following:

    ::
    
       platform@VOSS:~$ cluster list
       Cluster has 1 nodes:
       
              webproxy :  [a00d::eafe:3]
           application :  [a00d::eafe:3]
              database :  [a00d::eafe:3]
       
       
       platform@VOSS:~$ cluster status
       
       Data Centre: cpt
              webproxy : VOSS[a00d::eafe:3]
       
           application : VOSS[a00d::eafe:3]
       
              database : VOSS[a00d::eafe:3]
       
       
       
       platform@VOSS:~$ cluster check
       No issues found with host checks
       platform@VOSS:~$
 
