.. _configuring-default-bonder-via-web-service:

===========================================
Configuring default bonder via web service
===========================================

Bonders can be installed with a default configuration that isn't
attached to a specific bond. This is useful, for example, to keep a
stock of imaged but unconfigured bonders that can be shipped directly to
customers. The customer can be instructed to access the CPE's web
interface and provide a node key to finalize the bonder configuration.

To set up a default bonder when imaging or re-imaging a host, refer to
the instructions in `Node installation
methods <node-installation-methods/index.html>`__. To reset a
configured bonder to the default configuration, read `Resetting a
bonder to the default
configuration <../deconfiguring-a-bonder/resetting-a-bonder-to-the-default-configuration.html>`__.

Connecting to the Internet
---------------------------

To configure a default bonder via the web service, the bonder must first
be connected to a network that can access the Internet. This is done by
connecting any Ethernet interface to a DHCP network. For example, if the
first, second, third, or fourth Ethernet interface on the device is
connected to a DHCP network, the bonder will be able to access the
Internet. More than one interface can be connected to DHCP networks at
the same time, but this is not necessary.

Connecting to a network with a static IP or by PPPoE is not supported.

Accessing the bonder web service
---------------------------------

The bonder web service is served over HTTP, not HTTPS, and can be
accessed via DHCP or the static troubleshooting IP.

DHCP
+++++

The default bonder will automatically set up a connected IP of
10.0.0.1/24 on eth0, and host a DHCP server on it. The client can
connect to eth0 on the bonder to receive a DHCP lease. The bonder will
attempt to resolve all DNS requests to the bonder. So, generally, you
will be able to access the bonder's web service from a web browser by
navigating to any page over HTTP.

For ease of setup, you can set up your own domain name that resolves to
10.0.0.1 by configuring your DNS appropriately. Create an A record with the
desired name, such as "setup", that resolves to 10.0.0.1. You can then
visit http://setup.mydomain.com to reach the bonder.

The following diagram describes this network configuration. In the
example network in this diagram, the customer is being served DHCP from
the connected IP on the bonder.

|image0|

After getting an address this way, the client can begin configuring the
bonder by browsing to http://10.0.0.1/ in their web browser.

Troubleshooting IP
+++++++++++++++++++

.. note::
    This should only be necessary if you are unable to to get a DHCP lease
    from the bonder's DHCP server.

Every default bonder has the static IP 10.207.35.254/29 assigned on the
first Ethernet interface. To access the web service at this IP, connect
a computer to the port with the lowest MAC address. You may have to try
each port if can't confirm which port has the lowest MAC address.
Configure the computer with the IP address 10.207.35.250 and netmask
255.255.255.248. From the client computer, open a web browser to the URL
http://10.207.35.254/.

This network is described in the following diagram:

|image1|

The client computer will not be able to access the Internet or any other
resources while it is connected to the bonder by the troubleshooting IP
address. It will only be able to access the bonder. For more information
on the troubleshooting IP, refer to `Accessing a
node <../accessing-a-node.html>`__.

Configuring the bonder
-----------------------

To configure the bonder with a node key, follow the instructions below.

This method can only be used to assign a CPE to a specific bond when it
has no existing configuration. If it is currently assigned to a bond, it
must first be reset to the default configuration on the command line by
following the instructions at `Resetting a bonder to the default
configuration <../deconfiguring-a-bonder/resetting-a-bonder-to-the-default-configuration.html>`__.

#. Open a web browser to either 10.0.0.1 if using DHCP, or 10.207.35.254
   if connecting via the troubleshooting IP.
   |image2|
   The following page is shown:
   |image3|
#. Type the key.
   |image4|
#. Click Download configuration.
   |image5|
#. If the SSL certificate of the management server is not signed by a
   trusted authority, the following warning is shown.
   |image6|
   If the server is known to have a self-signed SSL certificate, click
   Continue anyway.
#. The configuration is downloaded and applied to the host. A page
   describing the downloaded configuration is shown. For example:
   |image7|
#. Click Configuration at the bottom-right corner of the page to see
   status information for the bonder.
   |image8|


.. |image0| image:: /attachments/2228447/12878294.png
.. |image1| image:: /attachments/2228447/2392117.png
.. |image2| image:: /attachments/2228447/2392111.png
.. |image3| image:: /attachments/2228447/2392106.png
.. |image4| image:: /attachments/2228447/2392114.png
.. |image5| image:: /attachments/2228447/2392101.png
.. |image6| image:: /attachments/2228447/2392108.png
.. |image7| image:: /attachments/2228447/2392115.png
.. |image8| image:: /attachments/2228447/2392112.png
