ServerA - RHEL5.2 x64 - 10.190.1.228 - PRIORITY 50ServerB - RHEL6 x64 - 10.190.1.229 - PRIORITY 101VIP - 10.190.1.230
我的问题似乎是在服务器B上没有发送多播广告.它正在看多播广告.来自ServerA:
[root@ServerB~]# tcpdump -vv -c 3 -i eth0 vrrptcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 65535 bytes10:18:10.760577 IP (tos 0x0,ttl 255,ID 856,offset 0,flags [none],proto VRRP (112),length 40)10.190.1.228 > 224.0.0.18: VRRPv2,Advertisement,vrID 151,prio 50,authtype none,intvl 1s,length 20,addrs: 10.190.1.23010:18:11.762039 IP (tos 0x0,ID 857,addrs: 10.190.1.23010:18:12.762883 IP (tos 0x0,ID 858,addrs: 10.190.1.2303 packets captured3 packets received by filter0 packets dropped by kernel[root@ServerB~]#
如果我在ServerA上杀死keepalived,并保持tcpdump运行,我看不到数据包.我使用以下简单的keepalived配置:
服务器A – 10.190.1.228
vrrp_instance VI_1 { interface eth0 state BACKUP virtual_router_ID 151 priority 50 virtual_ipaddress { 10.190.1.230 }}
服务器B – 10.190.1.229
vrrp_instance VI_1 { interface eth0 state MASTER virtual_router_ID 151 priority 100 virtual_ipaddress { 10.190.1.230 }}
正确的我认为ServerA看到,因为它看不到ServerB上优先级较高的VRRPv2广告,正在举行VIP:
[root@ServerA~]# ip add sh eth02: eth0: <broADCAST,MulTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000link/ether 08:00:27:59:58:c0 brd ff:ff:ff:ff:ff:ffinet 10.190.1.228/24 brd 10.190.1.255 scope global eth0inet 10.190.1.230/32 scope global eth0inet6 fe80::a00:27ff:fe59:58c0/64 scope link valID_lft forever preferred_lft forever[root@ServerA~]#
网络配置
两台计算机上都禁用了防火墙.两个接口都设置了MulTICAST标志.
我使用iperf发布到VRRP组:
[root@ServerB~]# iperf -u -c 224.0.0.18------------------------------------------------------------ClIEnt connecting to 224.0.0.18,UDP port 5001Sending 1470 byte datagramsSetting multicast TTL to 1UDP buffer size: 122 KByte (default)------------------------------------------------------------[ 3] local 10.190.1.229 port 32929 connected with 224.0.0.18 port 5001^C[ ID] Interval Transfer BanDWIDth[ 3] 0.0- 0.6 sec 73.2 KBytes 1.05 Mbits/sec[ 3] Sent 51 datagrams[root@ServerB~]#
ServerA可以看到此流量:
[root@ServerA~]# tcpdump -c 3 -i eth0 host 224.0.0.18tcpdump: verbose output suppressed,use -v or -vv for full protocol decodeListening on eth0,capture size 96 bytes10:37:30.460427 IP 10.190.1.229.33088 > vrrp.mcast.net.commplex-link: UDP,length 147010:37:30.472247 IP 10.190.1.229.33088 > vrrp.mcast.net.commplex-link: UDP,length 147010:37:30.482908 IP 10.190.1.229.33088 > vrrp.mcast.net.commplex-link: UDP,length 14703 packets captured10 packets received by filter0 packets dropped by kernel[root@ServerA~]#
以上会让我觉得这不是一个网络问题.我在路由表中没有mutlicast路由,但上面的建议我不需要一个.多播流量使用eth0.
最后,这是从ServerB上的keepalived注销:
May 18 10:40:46 ServerB Keepalived: Starting Keepalived v1.2.1 (05/17,2011)May 18 10:40:46 ServerB Keepalived: Remove a zombIE pID file /var/run/keepalived.pIDMay 18 10:40:46 ServerB Keepalived: Registering Kernel netlink reflectorMay 18 10:40:46 ServerB Keepalived: Registering Kernel netlink command channelMay 18 10:40:46 ServerB Keepalived: Registering gratutIoUs ARP shared channelMay 18 10:40:46 ServerB Keepalived: Configuration is using : 55219 BytesMay 18 10:40:46 ServerB Keepalived: Using linkWatch kernel netlink reflector...
我没有使用-D开关运行它,这似乎是内存调试,对我来说意义不大.我已经将strace输出上传到here.
当我使用-n标志进行keepalived(不要fork)时,在上面链接的输出后得到以下输出:
sendto(3,"<30>May 18 10:58:50 Keepalived: "...,68,MSG_NOSIGNAL,NulL,0) = 68sendto(3,75,0) = 75rt_sigaction(SIGCHLD,{0x411b60,[],SA_RESTORER|SA_RESTART,0x3db5a32a20},{SIG_DFL,0},8) = 0select(1024,[4 6],{1,0}) = 0 (Timeout)select(1024,0}) = 0 (Timeout)[ etc ..]
这与在ServerA上工作keepalived的strace输出形成对比,在该输出中我可以看到正在进行的sendto(),sendmdg()和reCMSg()调用.
解决方法 男孩我觉得愚蠢.我将keepalived.conf文件保存为/ etc / keepalived /中的keepalived.cfg(我想从haproxy.cfg中选择了这个). Keepalived查找/etc/keepalived/keepalive.conf.我在没有-f标志的情况下启动keepalived,所以它从没有配置开始.如果我使用了-d选项(将conf转储到syslog),我会看到它使用的是默认配置而不是我的设置.
总结以上是内存溢出为你收集整理的linux – Keepalived不发送mutlicast广告全部内容,希望文章能够帮你解决linux – Keepalived不发送mutlicast广告所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)