Network
Default gateway
You can specify the default gateway that will allow your HAProxy ALOHA appliance to communicate with devices outside its subnet.
-
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.
-
-
In the Services tab, click network instance setup next to a network interface.
-
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:haproxyservice network eth0ip address 172.16.24.237/255.255.255.0ip route default 172.16.24.1haproxyservice network eth0ip address 172.16.24.237/255.255.255.0ip route default 172.16.24.1 -
Optional: If you configure multiple network interfaces, for example
eth0
andeth1
, each with a different default gateway viaip route default
, then assign ametric
value to each one to indicate their order of preference. The default gateway with the lowestmetric
value has the highest priority and will be chosen when routing to destinations outside the network. Ifmetric
is not set, it defaults to0
.haproxyservice network eth0ip address 172.16.24.237/255.255.255.0ip route default 172.16.24.1 metric 10haproxyservice network eth0ip address 172.16.24.237/255.255.255.0ip route default 172.16.24.1 metric 10Policy-based routing
Beginning in HAProxy ALOHA 16.5, you can also use policy-based routing to set default routes on each interface.
-
Click OK and Close to return to the Services tab.
-
Reload the network interface or the whole network service.
Version > 16.0
In versions greater than 16.0, click the Apply new configuration button on the interface to apply the changes and automatically restart the network interface service.
-
To check the default gateway, go to the Tools tab and click Launch a terminal. Then run
netstat -r
.nixnetstat -rnixnetstat -routputtextKernel IP routing tableDestination Gateway Genmask Flags MSS Window irtt Ifacedefault 172.16.24.1 0.0.0.0 UG 0 0 0 eth0172.16.24.0 * 255.255.255.0 U 0 0 0 eth0outputtextKernel IP routing tableDestination Gateway Genmask Flags MSS Window irtt Ifacedefault 172.16.24.1 0.0.0.0 UG 0 0 0 eth0172.16.24.0 * 255.255.255.0 U 0 0 0 eth0 -
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?