Ipvsadm command reference, and based on their own experience, a simple translation, hope to have some help for the users of ipvsadm.
In order to better understand this command manual, we will briefly introduce several terms used in this manual: 1, virtual-service-address: it refers to the Virtual Server ip address 2, real-service-address: refers to the real Server ip address 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 -- s Et tcp tcpfin udp ipvsadm -- start-daemon state [-- mcast-interface] ipvsadm -- stop-daemon ipvsadm-h Command Option explanation: There are two Command Option formats, long and Short have the same meaning. In actual use, either of them can be used.
-A -- add-service adds A new virtual server record in the virtual server table of 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: delete a virtual server record in the kernel virtual server table.
-C -- clear clears all records in the kernel virtual server table.
-R -- restore Virtual Server rule-S -- save Virtual Server rule, the output is in the readable format of the-R option.-a -- add-server adds a new Real server record to a record in the kernel virtual server table. That is, add a new real server to a virtual server-e -- edit-server to edit a Real server record in a virtual server record-d -- delete-server to delete a virtual server A Real Server record in the record-L |-l -- list displays the kernel virtual server table-Z -- zero virtual service table counters cleared (clearing the current number of connections, etc)
-- Set tcp tcpfin udp sets the connection timeout value -- start-daemon to start the synchronization daemon. It can be followed by a master or backup to indicate that the LVS Router is a master or backup. The VRRP function of keepalived can also be used in this function.
-- Stop-daemon stop synchronization daemon-h -- help display help information other options:-t -- tcp-service-address indicates that the virtual server provides the tcp service [vip: port] or [real-server-ip: port]-u -- udp-service-address indicates that the virtual server provides the udp service [vip: port] or [real-server-ip: port]-f -- fwmark-service fwmark indicates the service type marked by iptables.
-S -- scheduler scheduling algorithm, which has the following options: rr | wrr | lc | wlc | lblc | lblcr | dh | sh | sed | nq. The default scheduling algorithm is: wlc. -p -- persistent [timeout] persistent and stable service. This option means that multiple requests from the same customer will be processed by the same real server. The default timeout value is 300 seconds.
-M -- netmask persistent granularity mask-r -- real-server-address Real Server [real-server: port]-g -- gatewaying specifies that the LVS working mode is the direct routing mode (also the default LVS mode)
-I -- ipip: Specify the LVS working mode as tunnel mode-m -- masquerading: Specify the LVS working mode as NAT mode-w -- weight: the actual server's weight -- mcast-interface the multicast synchronization interface-c -- connection displays the current connection of LVS, for example: ipvsadm-L-c -- timeout: displays the timeout value of tcp tcpfin udp, for example: ipvsadm-L -- timeout -- daemon displays the status of the synchronization daemon -- stats displays statistics -- rate displays rate information -- sort sorts the output of the virtual server and the Real Server -- numeric-n outputs the IP address and port Number Format