==================================
Changing a host IP address
==================================

Aggregators and PWAN routers have a static public IP address
(and optionally a static IPv6 address) that is known by each assigned bonder.
Changing the configured address on either node type should be an infrequent
task, and requires a few coordinated changes as described below.
Use the following procedure to safely make the transition.

#. Plan the migration. Choose the new IP address and determine if any
   OSPF or BGP settings need to be changed.
#. If possible, temporarily move the host node's bonds to other hosts to
   avoid outages.
#. Change the IP address on the node's details page in the web
   interface. This changes the IP address that bonders will contact,
   and will result in an outage for any bonds still on the host until
   the remaining steps are completed.
#. Start a console session to the node using one of the techniques
   described in `Accessing a node <../nodes/accessing-a-node.html>`__.
   Log in as the root user.
#. Using your favourite text editor, update the file ``/etc/network/interfaces``.
   Find interface block configured with the IP address(es) you are changing
   (usually ``eth0``). It should look something like this:

   ::

       auto eth0
       iface eth0 inet static
               address 203.0.113.250/24
               gateway 203.0.113.254
       iface eth0 inet6 static
               address 2001:db8::c0ca:1eaf/64
               gateway 2001:db8::1ead:ed:beef

   Change the addresses to be the new desired values as appropriate.

.. note::
   There may not be any IPv6 configuration present if the node was not previously
   configured to use IPv6, but nodes always require an IPv4 configuration.

#. Update OSPF or BGP settings, if present, using the ``vtysh`` command.
#. Reboot the server:
   ``reboot``
#. Verify that the node restarts and is available at the new IP
   address. Verify it peers with your OSPF or BGP routers.
#. Move bonds back to the node if they were moved elsewhere.
