免费注册 查看新帖 |

Chinaunix

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

keepalived只使用vrrp十分困惑 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-30 11:52 |只看该作者 |倒序浏览
我用两个虚拟机设置vrrp,不使用lvs,只是测试vrrp,但是不管用keepalived
虚拟机一:
! Configuration File for keepalived

global_defs {
   notification_email {
     acassen
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_DEVEL
}


vrrp_instance VI_1 {
    state MASTER
    interface eth4
    garp_master_delay 10
    smtp_alert
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        10.2.3.154
    }
}这是全部文件,因为我只想试试vrrp功能

虚拟机2:

global_defs {
   notification_email {
     acassen
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_DEVEL
}


vrrp_instance VI_1 {
    state BACKUP
    interface eth1
    garp_master_delay 10
    smtp_alert
    virtual_router_id 51
    priority 10
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        10.2.3.154
    }
}这是全部文件,因为我只想试试vrrp功能

使用ip a看 两个机子上都有 inet 10.2.3.154/32 scope global eth*,没有竞争
master tail -f /var/log/messages 信息:
Nov 30 19:48:21 localhost Keepalived_vrrp: Remote SMTP server [127.0.0.1:25] connected.
Nov 30 19:48:21 localhost Keepalived_vrrp: Error processing RCPT cmd on SMTP server [127.0.0.1:25]. SMTP status code = 550
Nov 30 19:48:21 localhost Keepalived_vrrp: Can not read data from remote SMTP server [127.0.0.1:25].
Nov 30 19:48:31 localhost Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth4 for 10.2.3.154
Nov 30 19:50:11 localhost Keepalived_vrrp: VRRP_Instance(VI_1) Received lower prio advert, forcing new election
Nov 30 19:50:11 localhost Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth4 for 10.2.3.154
Nov 30 19:50:12 localhost Keepalived_vrrp: VRRP_Instance(VI_1) Received lower prio advert, forcing new election

back信息为:
Nov 30 11:41:17 localhost Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE
Nov 30 11:41:18 localhost Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE
Nov 30 11:41:18 localhost Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.
Nov 30 11:41:18 localhost Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 10.2.3.154
Nov 30 11:41:18 localhost avahi-daemon[971]: Registering new address record for 10.2.3.154 on eth0.IPv4.
Nov 30 11:41:18 localhost Keepalived_healthcheckers: Netlink reflector reports IP 10.2.3.154 added
Nov 30 11:41:18 localhost Keepalived_vrrp: Remote SMTP server [127.0.0.1:25] connected.
Nov 30 11:41:18 localhost Keepalived_vrrp: Error processing RCPT cmd on SMTP server [127.0.0.1:25]. SMTP status code = 550
Nov 30 11:41:18 localhost Keepalived_vrrp: Can not read data from remote SMTP server [127.0.0.1:25].
Nov 30 11:41:28 localhost Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 10.2.3.154


为什么会出现master发送arp但是backup收不到呢,二者不竞争。
tcpdump backup 信息为:
11:32:10.254780 ARP, Request who-has 10.2.3.154 (Broadcast) tell 10.2.3.154, length 46
11:32:10.254929 ARP, Request who-has 10.2.3.154 (Broadcast) tell 10.2.3.154, length 46
11:32:10.254997 ARP, Request who-has 10.2.3.154 (Broadcast) tell 10.2.3.154, length 46
11:32:10.255100 ARP, Request who-has 10.2.3.154 (Broadcast) tell 10.2.3.154, length 46

受到了,但是没有回啊

论坛徽章:
0
2 [报告]
发表于 2009-12-01 12:37 |只看该作者

回复 #1 spike8800 的帖子

看到master上有多个接口
确认下是否是如此的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP