lvs--ipvsadm Command Explanation
1,virtual-service-address: Refers to the IP address of the virtual server
2,real-service-address: Refers to the IP address of the real server
3,scheduler: Scheduling method
The usage and format of IPVSADM are as follows:
ipvsadm-a| E-t|u|f Virutal-service-address:port [-S scheduler] [-P [Timeout]] [-M netmask]
ipvsadm-d-t|u|f virtual-service-address
Ipvsadm-c
Ipvsadm-r
Ipvsadm-s [-N]
Ipvsadm-a|e-t|u|f service-address:port-r Real-server-address:port [-g|i|m] [-w weight]
ipvsadm-d-t|u|f service-address-r server-address
ipvsadm-l|l [Options]
Ipvsadm-z [-t|u|f service-address]
Ipvsadm--set TCP Tcpfin UDP
Ipvsadm--start-daemon state [--mcast-interface interface]
Ipvsadm--stop-daemon
Ipvsadm-h
Command Options explained:
There are two types of command options, long and short, with the same meaning. Both are available when used in practice.
-a --add-service adds a new virtual server record to the Virtual server table in the kernel. That is, add a new virtual server.
- e --edit-service Edit a virtual server record in the Kernel Virtual server table.
- D --delete-service Deletes a virtual server record from the kernel Virtual server table.
- C --clear clears all records in the kernel Virtual server table.
- R --restore restore virtual Server rules
- s --save save virtual Server rule, output to-r option readable format
-A--add-server adds a new real-world server record to a record in the Kernel Virtual server table. That is, adding a new real server to a virtual server
- e --edit-server edit a real server record in a virtual server record
- d --delete-server Delete a real server record in a virtual server record
- L| - l --list show kernel virtual server table
-Z--zero Virtual Service Table counter clear 0 (empty current number of connections, etc.)
--set TCP tcpfin UDP Setting connection timeout value
--start-daemon initiates the synchronization daemon. He can be followed by master or backup to indicate that the LVS router are master or backup. Keepalived's VRRP function can also be used in this function.
--stop-daemon Stop the synchronization daemon
- H --help Display Help information
Other options :
- T --tcp-service service-address Description of the service provided by the virtual server is TCP [Vip:port] or [Real-server-ip:port]
- u --udp-service service-address Description of the service provided by the virtual server is UDP [Vip:port] or [Real-server-ip:port]
The- f --fwmark-service fwmark description is a service type that has been iptables marked.
- s --scheduler Scheduler uses a scheduling algorithm that has such several options RR|WRR|LC|WLC|LBLC|LBLCR|DH|SH|SED|NQ,
The default scheduling algorithm is: WLC.
- p --persistent [timeout] a durable and stable service. This option means that multiple requests from the same customer will be processed by the same real server. The default value for timeout is 300 seconds.
- m --netmask netmask Persistent granularity mask
- R --real-server server-address real server [Real-server:port]
- G --gatewaying The operating mode of the specified LVS is the direct route mode (also the LVS default mode)
-I--IPIP the operating mode of the specified LVS is tunnel mode
- m --masquerading Specifies the operating mode of LVS for NAT mode
- w --weight weight real server weights
--mcast-interface Interface The specified group%b
lvs--ipvsadm Command Explanation