ELB provides customized strategies for managing service access. Before customizing these strategies, ELB needs to obtain the visitor's IP address contained in the access request. The TOA kernel module installed on backend servers is used to obtain IP addresses (IPv4 IP addresses) in the access requests.
This section describes how to compile the TOA kernel module in the OS.
The configuration operations of the TOA module for Linux OSs with kernel version of 2.6.32 are different from those for Linux OSs with kernel version of 3.0 or later.
During the installation, you need to download the required kernel module development package from the Internet if it cannot be found in the source.
The following are operations for compiling the kernel module in different Linux OSs. Choose appropriate operations as needed.
sudo yum install gcc
sudo yum install make
sudo yum install kernel-devel-`uname -r`
During the installation, you need to download the required kernel module development package from the following address if it cannot be found in the source:
For example, to install 3.10.0-693.11.1.el7.x86_64, run the following command:
rpm -ivh kernel-devel-3.10.0-693.11.1.el7.x86_64.rpm
sudo apt-get install gcc
sudo apt-get install make
sudo apt-get install linux-headers-`uname -r`
sudo zypper install gcc
sudo zypper install make
sudo zypper install enel-default-devel
For CoreOS, the kernel module will be compiled in a container, and it must be started before the kernel module is compiled.
For detailed operations, see the CoreOS documentation. Obtain the documentation from the following link:
If the git tool is not installed, download the TOA kernel module source code from the following link:
If no warning or error code is prompted, the compilation was successful. Verify that the toa.ko file was generated in the current directory.
sudo insmod toa.ko
dmesg | grep TOA
If TOA: toa loaded is displayed in the command output, the kernel module has been loaded.
After compiling the CoreOS kernel module in the container, copy it to the host system and then load it. The container for compiling the kernel module shares the /lib/modules directory with the host system, so you can copy the kernel module in the container to this directory, allowing the host system to use it.
To make the TOA kernel module take effect when the system starts, add the command for loading the TOA kernel module to your startup script.
You can use either of the following methods to automatically load the kernel module:
The following is an example of the content in the toa.modules file.
/sbin/modinfo -F filename /root/toa/toa.ko > /dev/null 2>&1
if [ $? -eq 0 ]; then
/root/toa/toa.ko is the path of the TOA kernel module file. You need to replace it with their actual path.
sudo chmod +x /etc/sysconfig/modules/toa.modules
If the kernel is upgraded, the current TOA kernel module will no longer match. Therefore, you need to compile the TOA kernel module again.
To load the kernel module in the same OSs, copy the toa.ko file to VMs where the kernel module is to be loaded and then perform the operations in 3.
After the kernel module is successfully loaded, applications can obtain the real IP address contained in the request.
The OS of the node must have the same version as the kernel.
The TOA plug-in supports the OSs (CentOS 6.8 image) with a kernel of 2.6.32-xx. Perform the following steps to configure the TOA kernel module:
Change the value of #define TCPOPT_TOA200 to #define TCPOPT_TOA254.
sed -i 's/CONFIG_IPV6=m/CONFIG_IPV6=y/g' .config
echo -e '\n# toa\nCONFIG_TOA=m' >> .config
After the configuration, the IPv6 module is compiled into the kernel. TOA is compiled into a separate kernel module and can be independently started and stopped.
You can add a description to the end of EXTRAVERSION =. This description will be displayed in uname -r, for example, -toa.
make -j n
n indicates the number of vCPUs. For example, if there are four vCPUs, n can be set to 4.
The following information is displayed.
The following information is displayed.
During the restart, the system will load the vmlinuz-2.6.32-toa kernel.
You are advised to add the modprobe toa command to both the startup script and the system scheduled monitoring script.
After the TOA module is loaded, query the kernel information.