HAProxy Enterprise Documentation 10.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.

Note

Use this IP address for managing the appliance. It can be different from the IP address used to receive incoming traffic.

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/10-5/assets/interface_setup-793bcaec28321fe396915d219f6523986b63381e49c3bd1074e60fbf091fab00.png
  3. Do one of the following:

    • Enter an IP address (e.g. 172.16.24.237) and a network mask (e.g. 255.255.255.0).

      service network eth0
        ip address 172.16.24.237/255.255.255.0
    • Enter an IP address alias (e.g. 172.16.24.238) and a /32 network mask (255.255.255.255).

      service network eth0
        ip address 172.16.24.237/255.255.255.0
        ip address 172.16.24.238/255.255.255.255
  4. Reload reload_icon the network interface.

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.

  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