HAProxy ALOHA Documentation 15.5

Assign an IP Address

Use the web UI or CLI to add or change the HAProxy ALOHA static IP address.

Assign a static IP address through the web UI

You must assign a static internal IP address to your appliance.

If you manage a pair of appliances, assign each one a different IP address so you can connect to each of them.

  1. Connect to the web UI as user admin with the password admin at http://<IP Address>:4444/.

  2. In the Services tab, click network instance setup setup_icon next to a network interface.

    https://cdn.haproxy.com/documentation/aloha/latest/assets/interface_setup-4c57f2c87bd88fa7300e8d440c2109bcef43b7087bfb2903fb6298f6b0f2235a.png
  3. Do one of the following:

    • Enter an IP address and a network mask, either class mask or CIDR format.

      service network eth0
         # Class mask format:
         ip address 172.16.24.237/255.255.255.0
         # CIDR format:
         # ip address 172.16.24.237/24
    • Enter an IP address alias and a network mask, either class mask or CIDR format.

      service network eth0
         # Class mask format:
         ip address 172.16.24.237/255.255.255.0
         ip address 172.16.24.238/255.255.255.255
         # CIDR format:
         # ip address 172.16.24.237/24
         # ip address 172.16.24.238/32
  4. Reload reload_icon the network interface.

  5. In the Setup tab, click Save under Configuration to persist your changes after a reboot.

Assign a static IP address through the CLI

  1. Connect to the appliance as user admin with the password admin through:

    • SSH at http://<IP Address>:4444/, or

    • the serial port.

    You can also click Launch a terminal in the web UI's Tools tab.

  2. Get root access.

    root@aloha1:~# root
  3. Set up the device hostname.

    root@aloha1:~# config set system hostname <HOSTNAME>
    root@aloha1:~# config set system hostname MYALOHA
  4. Set up the IP address for the eth0 network interface.

    root@aloha1:~# config set network.eth0 ip-address <IP/NETMASK>
    root@aloha1:~# config set network.eth0 ip-address 172.16.24.237/24
  5. Set up the default gateway.

    root@aloha1:~# config set network.eth0 ip-route-default <GATEWAY>
    root@aloha1:~# config set network.eth0 ip-address 172.16.24.238
  6. Apply your configuration.

    root@aloha1:~# service network restart
  7. Connect HAProxy ALOHA to your network using its eth0 network interface.

  8. Ping HAProxy ALOHA.

  9. If the ping succeeds, save the configuration.

    root@aloha1:~# config save

Troubleshooting

Duplicate IPs

To troubleshoot duplicate IPs, you can use the ARP who-has diagnostic tool.

This tool checks if the MAC address associated with the IP address is the one expected or not:

  • If yes, the problem may be on an upper layer

  • If not, the MAC address of the server has the duplicated IP

Ping

You can use the ping diagnostic tool to try to reach an IP address on the network.


Next up

Add IP Static Routes