Network

Default gateway

You can specify the default gateway that will allow your HAProxy ALOHA appliance to communicate with devices outside its subnet.

Caution

Specify only one default gateway unless directed otherwise: all network interfaces will use the default gateway you specify for any interface.

  1. Before beginning, be sure to:

    • [VM appliance] Create a snapshot of your VM.

    • [Hardware appliance] Make sure you can connect to your appliance through the serial port.

      If you specify an invalid IP address for the default gateway, you may not be able to log in to your appliance through SSH or display the web UI.

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

    Interface Setup

  3. Specify the default gateway through the ip route default directive.

    For example, to use the router whose IP address is 172.16.24.1 as the default gateway:

    haproxy
    service network eth0
    ip address 172.16.24.237/255.255.255.0
    ip route default 172.16.24.1
    haproxy
    service network eth0
    ip address 172.16.24.237/255.255.255.0
    ip route default 172.16.24.1
  4. Optional: If you configure multiple default gateways with ip route default, then assign a metric value to each one to indicate their order of preference. Do this even if they are on different network devices (for example eth0 and eth1). The default gateway with the lowest metric value has the highest priority and will be chosen when routing to destinations outside the network. If metric is not set, it defaults to 0.

    haproxy
    service network eth0
    ip address 172.16.24.237/255.255.255.0
    ip route default 172.16.24.1 metric 10
    haproxy
    service network eth0
    ip address 172.16.24.237/255.255.255.0
    ip route default 172.16.24.1 metric 10
  5. Reload the network interface or the whole network service.

  6. To check the default gateway, go to the Tools tab and click Launch a terminal. Then run netstat -r.

    nix
    netstat -r
    nix
    netstat -r
    output
    text
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    default 172.16.24.1 0.0.0.0 UG 0 0 0 eth0
    172.16.24.0 * 255.255.255.0 U 0 0 0 eth0
    output
    text
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    default 172.16.24.1 0.0.0.0 UG 0 0 0 eth0
    172.16.24.0 * 255.255.255.0 U 0 0 0 eth0
  7. To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.

Do you have any suggestions on how we can improve the content of this page?