免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2224 | 回复: 0
打印 上一主题 下一主题

公网网卡+内网网卡怎么配置lvs+keepalived [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-01-07 16:23 |只看该作者 |倒序浏览
DR1:
eth0 : 192.168.1.11
eth1 :211.103.33.47

DR2:
eth0 : 192.168.1.11

webserver1
eth0:  192.168.1.21

webserver2
eth0: 192.168.1.22

目前我的keepalived的配置是这样的,在lvs里能看到请求数,但是web服务器收不到请求,请大家帮忙
  1. ! Configuration File for keepalived
  2. global_defs {
  3.    notification_email {
  4.     coldnight@linuxzen.com                                   
  5.    }
  6.    notification_email_from linuxzen@tesd.com            
  7.    smtp_server linuxzen.com                                 
  8.    smtp_connect_timeout 30
  9.    router_id LVS_DEVEL
  10. }
  11. vrrp_instance VI_1 {
  12.     state MASTER            
  13.     interface eth1           
  14.     virtual_router_id 51   
  15.     priority 100            
  16.     advert_int 1            
  17.     authentication {         
  18.         auth_type PASS      
  19.         auth_pass 1111      
  20.     }
  21.     virtual_ipaddress {      
  22.         211.103.33.47/26
  23.         
  24. }
  25.     notify_master /opt/routeTest.sh
  26. virtual_server 211.103.33.47 80 {
  27.     delay_loop 6      
  28.     lb_algo rr
  29.     lb_kind DR        
  30.     nat_mask 255.255.255.0
  31.     persistence_timeout 0  
  32.     protocol TCP            
  33.     real_server 192.168.1.12 80 {      
  34.         weight 3                       
  35.         TCP_CHECK {  
  36.             connect_timeout 3         
  37.             nb_get_retry 3
  38.             delay_before_retry 3
  39.             connect_port 80
  40.         }
  41.     }
  42.     real_server 192.168.1.22 80 {
  43.         weight 3
  44.         TCP_CHECK {
  45.             connect_timeout 3
  46.             nb_get_retry 3
  47.             delay_before_retry 3
  48.             connect_port 80
  49.         }
  50.     }
  51. }
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP