⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipvsadm.8

📁 实现了集群的实现 完成了资源负载平衡等问题
💻 8
📖 第 1 页 / 共 2 页
字号:
resolve problems with non-persistent cache clusters on the client side..TP.B -r, --real-server \fIserver-address\fPReal server that an associated request for service may be assigned to.The \fIserver-address\fP is the \fIhost\fP address of a real server,and may plus \fIport\fP. \fIHost\fP can be either a plain IP addressor a hostname.  \fIPort\fP can be either a plain port number or theservice name of port.  In the case of the masquerading method, thehost address is usually an RFC 1918 private IP address, and the portcan be different from that of the associated service. With thetunneling and direct routing methods, \fIport\fP must be equal to thatof the service address. For normal services, the port specified  inthe service address will be used if \fIport\fP is not specified. Forfwmark services, \fIport\fP may be omitted, in which case  thedestination port on the real server will be the destination port ofthe request sent to the virtual service..TP.B [packet-forwarding-method].sp\fB-g, --gatewaying\fR  Use gatewaying (direct routing). This is the default..sp\fB-i, --ipip\fR  Use ipip encapsulation (tunneling)..sp\fB-m, --masquerading\fR  Use masquerading (network access translation, or NAT)..sp\fBNote:\fR  Regardless of the packet-forwarding mechanism specified,real servers for addresses for which there are interfaces on the localnode will be use the local forwarding method, then packets for theservers will be passed to upper layer on the local node. This cannotbe specified by \fIipvsadm\fP, rather it set by the kernel as realservers are added or modified..TP.B -w, --weight \fIweight\fP\fIWeight\fP is an integer specifying the capacity  of a serverrelative to the others in the pool. The valid values of \fIweight\fPare 0 through to 65535. The default is 1. Quiescent servers arespecified with a weight of zero. A quiescent server will receive nonew jobs but still serve the existing jobs, for all schedulingalgorithms distributed with the Linux Virtual Server. Setting aquiescent server may be useful if the server is overloaded or needs tobe taken out of service for maintenance..TP.B -x, --u-threshold \fIuthreshold\fP\fIuthreshold\fP is an integer specifying the upper connectionthreshold of a server. The valid values of \fIuthreshold\fP are 0through to 65535. The default is 0, which means the upper connectionthreshold is not set. If \fIuthreshold\fP is set with other values, nonew connections will be sent to the server when the number of itsconnections exceeds its upper connection threshold..TP.B -y, --l-threshold \fIlthreshold\fP\fIlthreshold\fP is an integer specifying the lower connectionthreshold of a server. The valid values of \fIlthreshold\fP are 0through to 65535. The default is 0, which means the lower connectionthreshold is not set. If \fIlthreshold\fP is set with other values,the server will receive new connections when the number of itsconnections drops below its lower connection threshold. If\fIlthreshold\fP is not set but \fIuthreshold\fP is set, the serverwill receive new connections when the number of its connections dropsbelow three forth of its upper connection threshold..TP.B --mcast-interface \fIinterface\fPSpecify the multicast interface that the sync master daemon sendsoutgoing multicasts through, or the sync backup daemon listens to formulticasts..TP.B --syncid \fIsyncid\fPSpecify the \fIsyncid\fP that the sync master daemon fills in theSyncID header while sending multicast messages, or the sync backupdaemon uses to filter out multicast messages not matched with theSyncID value. The valid values of \fIsyncid\fP are 0 through to255. The default is 0, which means no filtering at all..TP.B -c, --connectionConnection output. The \fIlist\fP command with this option will listcurrent IPVS connections..TP.B --timeoutTimeout output. The \fIlist\fP command with this option will displaythe  timeout values (in seconds) for TCP sessions, TCP sessions afterreceiving a FIN packet, and UDP packets..TP.B --daemonDaemon information output. The \fIlist\fP command with this optionwill display the daemon status and its multicast interface..TP.B --statsOutput of statistics information. The \fIlist\fP command with thisoption will display the statistics information of services and theirservers..TP.B --rateOutput of rate information. The \fIlist\fP command with this optionwill display the rate information (such as connections/second,bytes/second and packets/second) of services and their servers..TP.B --thresholdsOutput of thresholds information. The \fIlist\fP command with thisoption will display the upper/lower connection threshold informationof each server in service listing..TP.B --persistent-connOutput of persistent connection information. The \fIlist\fP commandwith this option will display the persistent connection counterinformation of each server in service listing. The persistentconnection is used to forward the actual connections from the sameclient/network to the same server..TP.B --sortSort the list of virtual services and real servers. The virtualservice entries are sorted in ascending order by <protocol, address,port>. The real server entries are sorted in ascending order by<address, port>..TP.B -n, --numericNumeric output.  IP addresses and port numbers will be printed innumeric format rather than as as host names and services respectively,which is the  default..TP.B --exactExpand numbers.  Display the exact value of the packet and  bytecounters,  instead  of only the rounded number in K's (multiples of1000) M's (multiples of 1000K) or G's (multiples  of 1000M).  Thisoption is only relevant for the -L command..SH EXAMPLE 1 - Simple Virtual ServiceThe following commands configure a Linux Director to distributeincoming requests addressed to port 80 on 207.175.44.110 equally toport 80 on five real servers. The forwarding method used in thisexample is NAT, with each of the real servers being masqueraded by theLinux Director..PP.nfipvsadm -A -t 207.175.44.110:80 -s rripvsadm -a -t 207.175.44.110:80 -r 192.168.10.1:80 -mipvsadm -a -t 207.175.44.110:80 -r 192.168.10.2:80 -mipvsadm -a -t 207.175.44.110:80 -r 192.168.10.3:80 -mipvsadm -a -t 207.175.44.110:80 -r 192.168.10.4:80 -mipvsadm -a -t 207.175.44.110:80 -r 192.168.10.5:80 -m.fi.PPAlternatively, this could be achieved in a single ipvsadm command..PP.nfecho "-A -t 207.175.44.110:80 -s rr-a -t 207.175.44.110:80 -r 192.168.10.1:80 -m-a -t 207.175.44.110:80 -r 192.168.10.2:80 -m-a -t 207.175.44.110:80 -r 192.168.10.3:80 -m-a -t 207.175.44.110:80 -r 192.168.10.4:80 -m-a -t 207.175.44.110:80 -r 192.168.10.5:80 -m" | ipvsadm -R.fi.PPAs masquerading is used as the forwarding mechanism in this example,the default route of the real servers must be set to the linuxdirector, which will need to be configured to forward and masqueradepackets. This can be achieved using the following commands:.PP.nfecho "1" > /proc/sys/net/ipv4/ip_forward.fi.SH EXAMPLE 2 - Firewall-Mark Virtual ServiceThe following commands configure a Linux Director to distributeincoming requests addressed to any port on 207.175.44.110 or207.175.44.111 equally to the corresponding port on five realservers. As per the previous example, the forwarding method used inthis example is NAT, with each of the real servers being masqueradedby the Linux Director..PP.nfipvsadm -A -f 1  -s rripvsadm -a -f 1 -r 192.168.10.1:0 -mipvsadm -a -f 1 -r 192.168.10.2:0 -mipvsadm -a -f 1 -r 192.168.10.3:0 -mipvsadm -a -f 1 -r 192.168.10.4:0 -mipvsadm -a -f 1 -r 192.168.10.5:0 -m.fi.PPAs masquerading is used as the forwarding mechanism in this example,the default route of the real servers must be set to the linuxdirector, which will need to be configured to forward and masqueradepackets. The real server should also be configured to mark incomingpackets addressed to any port on 207.175.44.110 and  207.175.44.111with firewall-mark 1. If FTP traffic is to be handled by this virtualservice, then the ip_vs_ftp kernel module needs to be inserted intothe kernel.  These operations can be achieved using the followingcommands:.PP.nfecho "1" > /proc/sys/net/ipv4/ip_forwardmodprobe ip_tablesiptables  -A PREROUTING -t mangle -d 207.175.44.110/31 -j MARK --set-mark 1modprobe ip_vs_ftp.fi.SH NOTESThe Linux Virtual Server implements three defense strategies againstsome types of denial of service (DoS) attacks. The Linux Directorcreates an entry for each connection in order to keep its state, andeach entry occupies 128 bytes effective memory. LVS's vulnerability toa DoS attack lies in the potential to increase the number entries asmuch as possible until the linux director runs out of memory. Thethree defense strategies against the attack are: Randomly drop someentries in the table. Drop 1/rate packets before forwarding them. Anduse secure tcp state transition table and short timeouts. Thestrategies are controlled by sysctl variables and correspondingentries in the /proc filesystem:.sp/proc/sys/net/ipv4/vs/drop_entry/proc/sys/net/ipv4/vs/drop_packet/proc/sys/net/ipv4/vs/secure_tcp.PPValid values for each variable are 0 through to 3. The default valueis 0, which disables the respective defense strategy. 1 and 2 areautomatic modes - when there is no enough available memory, therespective strategy will be enabled and the variable is automaticallyset to 2, otherwise the strategy is disabled and the variable is setto 1. A value of 3 denotes that the respective strategy is alwaysenabled.  The available memory threshold and secure TCP timeouts canbe tuned using the sysctl variables and corresponding entries in the/proc filesystem:.sp/proc/sys/net/ipv4/vs/amemthresh/proc/sys/net/ipv4/vs/timeout_*.SH FILES.I /proc/net/ip_vs.br.I /proc/net/ip_vs_app.br.I /proc/net/ip_vs_conn.br.I /proc/net/ip_vs_stats.br.I /proc/sys/net/ipv4/vs/am_droprate.br.I /proc/sys/net/ipv4/vs/amemthresh.br.I /proc/sys/net/ipv4/vs/drop_entry.br.I /proc/sys/net/ipv4/vs/drop_packet.br.I /proc/sys/net/ipv4/vs/secure_tcp.br.I /proc/sys/net/ipv4/vs/timeout_close.br.I /proc/sys/net/ipv4/vs/timeout_closewait.br.I /proc/sys/net/ipv4/vs/timeout_established.br.I /proc/sys/net/ipv4/vs/timeout_finwait.br.I /proc/sys/net/ipv4/vs/timeout_icmp.br.I /proc/sys/net/ipv4/vs/timeout_lastack.br.I /proc/sys/net/ipv4/vs/timeout_listen.br.I /proc/sys/net/ipv4/vs/timeout_synack.br.I /proc/sys/net/ipv4/vs/timeout_synrecv.br.I /proc/sys/net/ipv4/vs/timeout_synsent.br.I /proc/sys/net/ipv4/vs/timeout_timewait.br.I /proc/sys/net/ipv4/vs/timeout_udp.SH SEE ALSOThe LVS web site (http://www.linuxvirtualserver.org/) for moredocumentation about LVS..PP\fBipvsadm-save\fP(8), \fBipvsadm-restore\fP(8), \fBiptables\fP(8),.br\fBinsmod\fP(8), \fBmodprobe\fP(8).SH AUTHORS.nfipvsadm - Wensong Zhang <wensong@linuxvirtualserver.org>	  Peter Kese <peter.kese@ijs.si>man page - Mike Wangsmo <wanger@redhat.com>	   Wensong Zhang <wensong@linuxvirtualserver.org>	   Horms <horms@verge.net.au>.fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -