设为首页 收藏本站
查看: 1239|回复: 0

[经验分享] Centos7-Lvs+Keepalived架构实验详解

[复制链接]

尚未签到

发表于 2018-12-31 11:58:16 | 显示全部楼层 |阅读模式
# ipvsadm-h  
ipvsadmv1.27 2008/5/15 (compiled with popt and IPVS v1.2.1)
  
Usage:
  
  ipvsadm -A|E -t|u|f service-address [-sscheduler] [-p [timeout]] [-M netmask] [--pe persistence_engine] [-bsched-flags]
  
  ipvsadm -D -t|u|f service-address
  
  ipvsadm -C
  
  ipvsadm -R
  
  ipvsadm -S [-n]
  
  ipvsadm -a|e -t|u|f service-address -rserver-address [options]
  
  ipvsadm -d -t|u|f service-address -rserver-address
  
  ipvsadm -L|l [options]
  
  ipvsadm -Z [-t|u|f service-address]
  
  ipvsadm --set tcp tcpfin udp
  
  ipvsadm --start-daemon state[--mcast-interface interface] [--syncid sid]
  
  ipvsadm --stop-daemon state
  
  ipvsadm -h
  

  
Options:
  
  --tcp-service -t service-address  service-address is host[:port]
  
  --udp-service -u service-address  service-address is host[:port]
  
  --fwmark-service  -f fwmark         fwmark is an integer greater than zero
  
  --ipv6        -6                   fwmark entryuses IPv6
  
  --scheduler   -s scheduler         one ofrr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq,
  
                                      thedefault scheduler is wlc.
  
  --pe            engine              alternate persistence engine maybe sip,
  
                                      not setby default.
  
  --persistent  -p [timeout]         persistentservice
  
  --netmask     -M netmask           persistentgranularity mask
  
  --real-server -r server-address   server-address is host (and port)
  
  --gatewaying  -g                   gatewaying(direct routing) (default)
  
  --ipip        -i                   ipip encapsulation (tunneling)
  
  --masquerading -m                   masquerading (NAT)
  
  --weight      -w weight            capacity ofreal server
  
  --u-threshold -x uthreshold        upperthreshold of connections
  
  --l-threshold -y lthreshold        lowerthreshold of connections
  
  --mcast-interface interface         multicast interface for connectionsync
  
  --syncid sid                        syncid for connectionsync (default=255)
  
  --connection  -c                   output ofcurrent IPVS connections
  
  --timeout                           output of timeout(tcp tcpfin udp)
  
  --daemon                            output of daemoninformation
  
  --stats                             output ofstatistics information
  
  --rate                              output of rateinformation
  
  --exact                             expand numbers(display exact values)
  
  --thresholds                        output of thresholdsinformation
  
  --persistent-conn                   output of persistentconnection info
  
  --nosort                            disable sortingoutput of service/server entries
  
  --sort                              does nothing, forbackwards compatibility
  
  --ops         -o                   one-packet scheduling
  
  --numeric     -n                   numericoutput of addresses and ports
  
  --sched-flags -b flags             schedulerflags (comma-separated)
  

  

  
--add-service     -A        add virtual service with option
  
  在内核的虚拟服务器表中添加一条新的虚拟服务器记录。也就是增加一台新的虚拟服务器
  
  --edit-service    -E        edit virtual service with options
  
  编辑内核虚拟服务器表中的一条虚拟服务器记录
  
  --delete-service  -D        delete virtual service
  
  删除内核虚拟服务器表中的一条虚拟服务器记录
  
  --clear           -C        clear the whole table
  
  清除内核虚拟服务器表中的所有记录
  
  --restore         -R        restore rules from stdin
  
  恢复虚拟服务器规则
  
  --save            -S        save rules to stdout
  
  保存虚拟服务器规则,输出为-R 选项可读的格式
  
  --add-server      -a        add real server with options
  
  在内核虚拟服务器表的一条记录里添加一条新的真实服务器
  
  --edit-server     -e        edit real server with options
  
  编辑一条虚拟服务器记录中的某条真实服务器记录
  
  --delete-server   -d        delete real server
  
  删除一条虚拟服务器记录中的某条真实服务器记录
  
  --list            -L|-l     list the table
  
  显示内核虚拟服务器表
  
  --zero            -Z        zero counters in a service or all services
  
  虚拟服务表计数器清零
  
  --set tcp tcpfin udp        set connection timeout values
  
  设置连接超时值
  
  --start-daemon              start connection sync daemon
  
  启动同步守护进程。他后面可以是master 或backup,用来说明LVS Router 是master 或是backup。在这个功能上也可以采keepalived 的VRRP 功能。
  
  --stop-daemon               stop connection sync daemon
  
  停止同步守护进程
  
  --help            -h        display this help message
  
  显示帮助信息
  

  

  
Options:
  
  --tcp-service  -t service-address   service-address is host[:port]
  
  说明虚拟服务器提供的是tcp 的服务[vip:port] or [real-server-ip:port]
  
  --udp-service  -u service-address   service-address is host[:port]
  
  说明虚拟服务器提供的是udp 的服务[vip:port] or [real-server-ip:port]
  
  --fwmark-service  -f fwmark         fwmark is an integer greater than zero
  
  说明是经过iptables 标记过的服务类型。
  
  --scheduler    -s scheduler         one of rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq,the default scheduler is wlc.
  
  使用的调度算法,有这样几个选项,默认的调度算法是: wlc.
  
  --persistent   -p [timeout]         persistent service
  
  持久稳固的服务。这个选项的意思是来自同一个客户的多次请求,将被同一台真实的服务器处理。timeout 的默认值为300 秒
  
  --netmask      -M netmask           persistent granularity mask
  

  
  --real-server  -r server-address    server-address is host (and port)
  
  真实的服务器[Real-Server:port]
  
  --gatewaying   -g                   gatewaying (direct routing) (default)
  
  指定LVS 的工作模式为直接路由模式(也是LVS 默认的模式
  
  --ipip         -i                   ipip encapsulation (tunneling)
  
  指定LVS 的工作模式为隧道模式
  
  --masquerading -m                   masquerading (NAT)
  
  指定LVS 的工作模式为NAT 模式
  
  --weight       -w weight            capacity of real server
  
  真实服务器的权值
  
  --u-threshold  -x uthreshold        upper threshold of connections
  

  
  --l-threshold  -y lthreshold        lower threshold of connections
  

  
  --mcast-interface interface         multicast interface for connection sync
  
  指定组播的同步接口
  
  --syncid sid                        syncid for connection sync (default=255)
  

  
  --connection   -c                   output of current IPVS connections
  
  显示LVS 目前的连接 如:ipvsadm -L -c
  
  --timeout                           output of timeout (tcp tcpfin udp)
  
  显示tcp tcpfin udp 的timeout 值 如:ipvsadm -L --timeout
  
  --daemon                            output of daemon information
  
  显示同步守护进程状态
  
  --stats                             output of statistics information
  
  显示统计信息
  
  --rate                              output of rate information
  
  显示速率信息
  
  --thresholds                        output of thresholds information
  

  
  --persistent-conn                   output of persistent connection info
  

  
  --sort                              sorting output of service/server entries
  
   对虚拟服务器和真实服务器排序输出
  
  --ops          -O                   one-packet scheduling
  

  
  --numeric      -n                   numeric output of addresses and ports
  
  输出IP 地址和端口的数字形式



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-657940-1-1.html 上篇帖子: CentOS5.5环境下布署LVS+keepalived-zgjxfmc 下篇帖子: OpenResty+Keepalived组建高可用集群+双主模式
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表