Updated on 2024-05-17 GMT+08:00

Switching the IPVS Kernel Module on LVS Nodes

Overview

This chapter describes how to switch the IPVS kernel module so that the FNAT mode can be used.

Precautions

  1. To switch the IPVS kernel module, you need to have the root permission.
  2. Keepalived must be disabled before you switch the kernel.
  3. During the switchover, the traffic is interrupted and IPVS tables in all kernels are deleted.

Verification

  1. Run the following command to switch the IPVS mode to the FullNAT mode:

    ipvs-switch fnat

    [root@localhost keepalived]# ipvs-switch fnat 
    Clear ip_vs tables 
    rmmod ip_vs modules 
    doing depmod 
    modprobe ip_vs modules 
    switch to fnat mode successfully

    Run these commands on both primary and standby LVS nodes.