Ipvs Module Management Tools Ipvsadm Introduction _ Server Other

Source: Internet
Author: User

The ipvsadm of the command reference, and based on their own experience, a simple translation, hoping to ipvsadm users have some help.

In order to better understand the command manual, use a few of the terms in the manual for a brief introduction:

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

(lna@networksbase.com translation Ipvsadm v1.21 April 2004)

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 Explanation:

There are two types of command options format, long and short, with the same meaning. In actual use, both types can be
To.
-a--add-service adds a new virtual server record to the kernel's Virtual server table. Also
is to 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 rules, output to the-r option readable format
-a--add-server adds a new real server to a record in the Kernel Virtual server table
Recording. 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 Deletes a real server record from a virtual server record
-l|-l--list display kernel Virtual server table
-Z--zero Virtual Service Table counter clear 0 (empty current number of connections, etc.)
--set TCP tcpfin UDP set Connection timeout value
--start-daemon initiates the synchronization daemon. He could be master or backup, for example.
Ming LVs Router is master or backup. You can also use keepalived in this function.
VRRP function.
--stop-daemon Stop the synchronization daemon
-H--help Display Help information

Other options:

-T--tcp-service service-address indicates that the virtual server provides TCP services
[Vip:port] or [Real-server-ip:port]
-U--udp-service service-address indicates that the virtual server provides UDP services
[Vip:port] or [Real-server-ip:port]
-F--fwmark-service fwmark description is a service type that has been iptables marked.
-S--scheduler Scheduler uses a scheduling algorithm that has several options
RR|WRR|LC|WLC|LBLC|LBLCR|DH|SH|SED|NQ,
The default scheduling algorithm is: WLC.
-P--persistent [timeout] durable and stable service. This option means that from the same customer
Multiple requests from the user will be handled 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 Specifies the operating mode of LVS as direct routing mode (also the LVS default mode)
-I--ipip specifies that LVS work mode is tunnel mode
-M--masquerading specifies that LVS work mode is NAT mode
-W--weight weight real server weights
--mcast-interface interface Specify multicast synchronization interface
-C--connection Display LVS current connections such as: Ipvsadm-l-C
--timeout displays TCP Tcpfin UDP timeout values such as: Ipvsadm-l--timeout
--daemon Display Sync daemon status
--stats Display statistic Information
--rate Display rate Information
--sort sort output for virtual servers and real servers
--numeric-n output IP address and port number form

Attached examples

xian_ld_46:~ # Ipvsadm
IP Virtual Server version 1.2.1 (size=1048576)
Prot Localaddress:port Scheduler Flags
-> remoteaddress:port Forward Weight activeconn inactconn
TCP 11.22..239.138:http WRR
-> 192.168.34.22:http Tunnel 1 18974 19855
-> 192.168.34.29:http Tunnel 1 18951 19877
-> 192.168.34.21:http Tunnel 1 19727 20063
-> 192.168.34.23:http Tunnel 1 19182 19640
-> 192.168.34.28:http Tunnel 1 19109 19863
-> 192.168.34.65:http Tunnel 1 19113 19729
-> 192.168.34.66:http Tunnel 1 19319 19520
xian_ld_46:~ # ipvsadm-l--rate
IP Virtual Server version 1.2.1 (size=1048576)
Prot localaddress:port CPS Inpps Outpps inbps outbps
-> Remoteaddress:port
TCP 11.22..239.138:http 2803 81379 0 8734018 0
-> 192.168.34.22:http 400 11709 0 1255635 0
-> 192.168.34.29:http 400 11090 0 1228650 0
-> 192.168.34.21:http 401 11789 0 1262369 0
-> 192.168.34.23:http 401 12320 0 1278632 0
-> 192.168.34.28:http 400 11721 0 1268672 0
-> 192.168.34.65:http 400 11382 0 1210737 0
-> 192.168.34.66:http 400 11369 0 1229318 0
TCP 11.22..239.139:http 1707 14506 0 2293752 0


xian_ld_46:~ # Ipvsadm-l-C |head-n 5
Ipvs Connection Entries
Pro Expire State source virtual destination
TCP 00:46 fin_wait 125.33.200.144:6446 11.22..239.139:http 192.168.13.121:http
TCP 00:51 syn_recv 116.2.118.223:btpp2audctr1 11.22..239.138:http 192.168.34.28:http
TCP 00:07 Close 221.196.32.99:14256 11.22..239.138:http 192.168.34.29:http

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.