Ip configuration

This application note is intended to help you configure an IP address or a route on one or more network interface(s) for the ALOHA Load Balancer solution.


Objective

Add a private IP address and a route to the Aloha device, available to internal users. This enables load balancing on two Web sites located on different networks (this method may be used to change or delete an IP address or a route).


Constraints

Add a new IP listening address on the same Aloha physical interface. Requires a list of IP addresses which are available and useable on the network, and a detailed map of the routing rules applied on the network.


Complexity

2


Versions

v3.x and later

ALOHA load balancer Configuring an IP address


Target network diagram


Extract of the network configuration

Before modifications

service network eth0
 ######### Interface eth0, used as the admin port.
 auto on
 mtu 1500
 ip address 10.0.32.10/24

 service network eth1
 ########## Interface eth1: .
 auto on
 mtu 1500

 service network eth2
 ########## Interface eth2: .
 auto on
 mtu 1500

After modifications

service network eth0
 ######### Interface eth0, used as the admin port.
 auto on
 mtu 1500
 ip address 10.0.32.10/24
 ip address 10.0.32.11/24
 ip route 10.0.33.0/24 10.0.32.254

 service network eth1
 ########## Interface eth1: .
 auto on
 mtu 1500

 service network eth2
 ########## Interface eth2: .
 auto on
 mtu 1500

You can configure the network interface configuration directly from the Services tab by editing the network service.

In order to meet the objective, simply specify the new IP address and its subnet mask on the network interface in question.

Then you can enter as many IP addresses or routes as required.

To add a route, you must specify the following parameters:

 ip route “network/mask address” “gateway IP address”
Warning: there can only be one default route for the entire machine!

Basic troubleshooting

# /bin/arping -c 5 -I eth0 10.0.32.11

ARPING 10.0.32.11 from 10.0.32.10 eth0
Unicast reply from 10.0.32.11 [00:0D:C5:36:C6:72] 0.666ms
Unicast reply from 10.0.32.11 [00:0D:C5:36:C6:72] 0.618ms
Unicast reply from 10.0.32.11 [00:0D:C5:36:C6:72] 0.620ms
Unicast reply from 10.0.32.11 [00:0D:C5:36:C6:72] 0.636ms
Unicast reply from 10.0.32.11 [00:0D:C5:36:C6:72] 0.618ms

Should a problem arise, check whether the IP address you have just added to Aloha is used by any other device. To do this, you can use the built-in “arp who-has” tool available in the “DiagTools” tab; specify the name of the interface and the IP address to test. If a unicast message appears, then the IP address is already used.

# /bin/ping -n -c 5 10.0.33.101

PING 10.0.33.101 (10.0.33.101) 56(84) bytes of data.
64 bytes from 10.0.33.101: icmp_seq=1 ttl=64 time=0.051 ms
64 bytes from 10.0.33.101: icmp_seq=2 ttl=64 time=0.030 ms
64 bytes from 10.0.33.101: icmp_seq=3 ttl=64 time=0.024 ms
64 bytes from 10.0.33.101: icmp_seq=4 ttl=64 time=0.030 ms
64 bytes from 10.0.33.101: icmp_seq=5 ttl=64 time=0.036 ms
--- 10.0.33.101 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4008ms
rtt min/avg/max/mdev = 0.024/0.034/0.051/0.009 ms 

Now you must make sure the route is working correctly by checking the IP address of a machine on the remote network. To do this, you can use the built-in “ping” tool; specify the target IP address to test.

# /bin/netstat -nr

Kernel IP routing table
Destination    Gateway        Genmask         Flags   MSS   Window   irtt   Iface
10.0.32.0      0.0.0.0        255.255.255.0   U       0     0        0      eth0
10.0.33.0      10.0.32.254    255.255.255.0   U       0     0        0      eth0 

Finally, you can display all the known routes on your Aloha. To do this, you can use the built-in “route” tool; click on the “Run” button