Re: carp0 interface goes down on 6.2-PRERELEASE
On Thu, Oct 12, 2006 at 02:44:32PM +0300, Ari Suutari wrote: I have seen similar problems when the carp multicast (224.0.0.18) traffic was not allowed to be transmitted to the network due to a firewall configuration problem. Firewall wasn't enabled at this point, I wanted to keep things as simple as possible during testing. I have now tested with real hardware (ethernet is fxp0) and under VmWare (ethernet is lnc0). Same problem on both. Make sure you are NOT using ipfw divert for outgoint multicast. These two beasts (divert and multicast) are not friendly in between for FreeBSD. Eugene ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Eugene Grosbein wrote: On Thu, Oct 12, 2006 at 02:44:32PM +0300, Ari Suutari wrote: I have seen similar problems when the carp multicast (224.0.0.18) traffic was not allowed to be transmitted to the network due to a firewall configuration problem. Firewall wasn't enabled at this point, I wanted to keep things as simple as possible during testing. I have now tested with real hardware (ethernet is fxp0) and under VmWare (ethernet is lnc0). Same problem on both. Make sure you are NOT using ipfw divert for outgoint multicast. These two beasts (divert and multicast) are not friendly in between for FreeBSD. Ipfw is not even loaded. I suspect that this has something to do with sensing of media state, since if I up the carp0 interface manually and disconnect the lan cable carp0 goes down. Ari S. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Hi, Ari Suutari wrote: I have now tested with real hardware (ethernet is fxp0) and under VmWare (ethernet is lnc0). Same problem on both. I'll have to correct this. Carp works with fxp0. Problem is only under vmware, which makes me more and more suspect that it is because lnc0 does not support link state reporting (it seems to be present on only a few drivers). Ari S. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Ari Suutari wrote: Ari Suutari wrote: I have now tested with real hardware (ethernet is fxp0) and under VmWare (ethernet is lnc0). Same problem on both. I'll have to correct this. Carp works with fxp0. Problem is only under vmware, which makes me more and more suspect that it is because lnc0 does not support link state reporting (it seems to be present on only a few drivers). I do remember seeing this problem when developing some systems in vmware that the carp interfaces where always in INIT when the system booted. I added a small rc script to for the interfaces up using 'ifconfig carp0 up' which seemed to make the interfaces come up however if on system is unplugged from the network it will automatically put itself into the master state until it can talk to the other servers in the carp group. Tom J ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Hi, Tom Judge wrote: Ari Suutari wrote: Ari Suutari wrote: I have now tested with real hardware (ethernet is fxp0) and under VmWare (ethernet is lnc0). Same problem on both. I'll have to correct this. Carp works with fxp0. Problem is only under vmware, which makes me more and more suspect that it is because lnc0 does not support link state reporting (it seems to be present on only a few drivers). I do remember seeing this problem when developing some systems in vmware that the carp interfaces where always in INIT when the system booted. I added a small rc script to for the interfaces up using 'ifconfig carp0 up' which seemed to make the interfaces come up however if on system is unplugged from the network it will automatically put itself into the master state until it can talk to the other servers in the carp group. I already found the problem, it is in netinet/ip_carp.c. Since lnc driver doesn't support link state, the state is always LINK_STATE_UNKNOWN and carp code doesn't understand this. Following patch fixes it for me: cvs diff: Diffing . Index: ip_carp.c === RCS file: /opt/freebsd-cvs/src/sys/netinet/ip_carp.c,v retrieving revision 1.27.2.8 diff -c -r1.27.2.8 ip_carp.c *** ip_carp.c 25 Sep 2006 13:01:59 - 1.27.2.8 --- ip_carp.c 13 Oct 2006 11:11:08 - *** *** 2116,2122 { CARP_SCLOCK_ASSERT(sc); ! if (sc-sc_carpdev-if_link_state != LINK_STATE_UP || !(sc-sc_carpdev-if_flags IFF_UP)) { sc-sc_flags_backup = SC2IFP(sc)-if_flags; SC2IFP(sc)-if_flags = ~IFF_UP; --- 2116,2122 { CARP_SCLOCK_ASSERT(sc); ! if (sc-sc_carpdev-if_link_state == LINK_STATE_DOWN || !(sc-sc_carpdev-if_flags IFF_UP)) { sc-sc_flags_backup = SC2IFP(sc)-if_flags; SC2IFP(sc)-if_flags = ~IFF_UP; Ari S. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
On Oct 13, 2006, at 1:43 AM, Ari Suutari wrote: a kernel implementation. It doesn't require both nodes to be alive when the system starts, if there is only one system and it doesn't hear advertisements from anyone, it goes to MASTER state after a while. This has been my experience. If both systems are rebooted, and one does not come back up, the other is active as MASTER.
Re: carp0 interface goes down on 6.2-PRERELEASE
On Fri, 13 Oct 2006, Vivek Khera wrote: On Oct 13, 2006, at 1:43 AM, Ari Suutari wrote: a kernel implementation. It doesn't require both nodes to be alive when the system starts, if there is only one system and it doesn't hear advertisements from anyone, it goes to MASTER state after a while. This has been my experience. If both systems are rebooted, and one does not come back up, the other is active as MASTER. yes luckily. Else nothing would work;) -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
carp0 interface goes down on 6.2-PRERELEASE
Hi, I started experimenting with carp, in order to replace freevrrpd stuff we are currently using. I'm running quite recent version of RELENG_6 (compiled this week). I was able to configure carp ok, but for some odd reason the interface goes down by itself shortly after it has been configured. Here is output from test script: # sh -x test.sh + ifconfig carp0 destroy + ifconfig carp0 create + ifconfig carp0 up + ifconfig carp0 inet 192.168.5.59/24 vhid 55 pass xxx123 + ifconfig carp0 carp0: flags=49UP,LOOPBACK,RUNNING mtu 1500 inet 192.168.5.59 netmask 0xff00 carp: BACKUP vhid 55 advbase 1 advskew 0 + sleep 5 + ifconfig carp0 carp0: flags=8LOOPBACK mtu 1500 carp: INIT vhid 55 advbase 1 advskew 0 See, here the interface is up, but after 5 seconds it has gone down. Could anybody give a hint why this happens ? There are messages on console about promiscuous mode being enabled/disabled, but nothing else. Ari S. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Ari Suutari wrote: Hi, I started experimenting with carp, in order to replace freevrrpd stuff we are currently using. I'm running quite recent version of RELENG_6 (compiled this week). I was able to configure carp ok, but for some odd reason the interface goes down by itself shortly after it has been configured. Here is output from test script: # sh -x test.sh + ifconfig carp0 destroy + ifconfig carp0 create + ifconfig carp0 up + ifconfig carp0 inet 192.168.5.59/24 vhid 55 pass xxx123 + ifconfig carp0 carp0: flags=49UP,LOOPBACK,RUNNING mtu 1500 inet 192.168.5.59 netmask 0xff00 carp: BACKUP vhid 55 advbase 1 advskew 0 + sleep 5 + ifconfig carp0 carp0: flags=8LOOPBACK mtu 1500 carp: INIT vhid 55 advbase 1 advskew 0 See, here the interface is up, but after 5 seconds it has gone down. Could anybody give a hint why this happens ? There are messages on console about promiscuous mode being enabled/disabled, but nothing else. I have seen similar problems when the carp multicast (224.0.0.18) traffic was not allowed to be transmitted to the network due to a firewall configuration problem. Tom ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Hi, Tom Judge wrote: I have seen similar problems when the carp multicast (224.0.0.18) traffic was not allowed to be transmitted to the network due to a firewall configuration problem. Firewall wasn't enabled at this point, I wanted to keep things as simple as possible during testing. I have now tested with real hardware (ethernet is fxp0) and under VmWare (ethernet is lnc0). Same problem on both. Ari S. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Ari Suutari [EMAIL PROTECTED] writes: carp0: flags=49UP,LOOPBACK,RUNNING mtu 1500 inet 192.168.5.59 netmask 0xff00 carp: BACKUP vhid 55 advbase 1 advskew 0 + sleep 5 + ifconfig carp0 carp0: flags=8LOOPBACK mtu 1500 carp: INIT vhid 55 advbase 1 advskew 0 See, here the interface is up, but after 5 seconds it has gone down. Could anybody give a hint why this happens ? There are messages on console about promiscuous mode being enabled/disabled, but nothing else. I think the interface didn't get sync from other carp interface, so it doesn't know that he is the MASTER or BACKUP, and because of that goes into the INIT state. Setup at least 2 interfaces like in this example and try it out. Example So on cluster1 put this in rc.conf NETWORK ### defaultrouter=10.0.0.1 hostname=cluster1.somehost.net ifconfig_bge0=inet 10.0.0.101 netmask 255.255.255.0 ifconfig_bge1=inet 192.168.0.1 netmask 255.255.255.0 cloned_interfaces=carp0 network_interfaces=carp0 pfsync0 bge0 bge1 lo0 ifconfig_carp0=vhid 1 pass ugly_password 10.0.0.103/24 ifconfig_pfsync0=up syncif bge1 pfsync_enable=YES pfsync_syncdev=bge1 on cluster2 put this in rc.conf NETWORK ### defaultrouter=10.0.0.1 hostname=cluster2.somehost.net ifconfig_bge0=inet 10.0.0.102 netmask 255.255.255.0 ifconfig_bge1=inet 192.168.0.2 netmask 255.255.255.0 cloned_interfaces=carp0 network_interfaces=carp0 pfsync0 bge0 bge1 lo0 ifconfig_carp0=vhid 1 pass ugly_password advskew 100 10.0.0.103/24 ifconfig_pfsync0=up syncif bge1 pfsync_enable=YES pfsync_syncdev=bge1 -- One cannot sell the earth upon which the people walk Tacunka Witco ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
On Oct 12, 2006, at 1:20 PM, Marko Lerota wrote: I think the interface didn't get sync from other carp interface, so it doesn't know that he is the MASTER or BACKUP, and because of that goes into the INIT state. Shouldn't it then move to MASTER since the other server could possibly be dead?
Re: carp0 interface goes down on 6.2-PRERELEASE
Vivek Khera [EMAIL PROTECTED] writes: On Oct 12, 2006, at 1:20 PM, Marko Lerota wrote: I think the interface didn't get sync from other carp interface, so it doesn't know that he is the MASTER or BACKUP, and because of that goes into the INIT state. Shouldn't it then move to MASTER since the other server could possibly be dead? Yes, but if interface had _never_ received any pfsync packet, and sysctl is set to net.inet.carp.preempt=0 ? Maybe it's because of that. Don't know really. Documentation for this is not so good. Someone who knows this code and how this really works, should write handbook like documentation. Clusters are always complex, and for that, docs should be *very* detailed. If someone does that, I'll buy him a beer. -- One cannot sell the earth upon which the people walk Tacunka Witco ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Marko Lerota [EMAIL PROTECTED] writes: Shouldn't it then move to MASTER since the other server could possibly be dead? Yes, but if interface had _never_ received any pfsync packet, and sysctl is set to net.inet.carp.preempt=0 ? Maybe it's because of that. Don't know really. Documentation for this is not so good. Someone who knows this code and how this really works, should write handbook like documentation. Clusters are always complex, and for that, docs should be *very* detailed. If someone does that, I'll buy him a beer. I meant: Maybe first they have to talk to each other and say: OK, I will be the master first, and you wait. And if I don't send you any more sync packets, then you should be in charge :) If they didn't agree on that, and don't know about each other, that should be the INIT state. Thats the only reasonable thing that I could think of, because there is no such INIT state in documentation [EMAIL PROTECTED]@#!@ -- One cannot sell the earth upon which the people walk Tacunka Witco ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Hi, Vivek Khera wrote: On Oct 12, 2006, at 1:20 PM, Marko Lerota wrote: I think the interface didn't get sync from other carp interface, so it doesn't know that he is the MASTER or BACKUP, and because of that goes into the INIT state. Shouldn't it then move to MASTER since the other server could possibly be dead? It doesn't do anything and I assume that it is because the interface goes down by itself. If I manually up it (via ifconfig carp0 up) it first goes BACKUP and after a while it goes MASTER. After that also traffic to that IP works. I started examining this because the carp0 didn't come up during boot. Ari S. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: carp0 interface goes down on 6.2-PRERELEASE
Hi, Marko Lerota wrote: I meant: Maybe first they have to talk to each other and say: OK, I will be the master first, and you wait. And if I don't send you any more sync packets, then you should be in charge :) I have been using freevrrpd for quite a long time now and I think that carp is basicly the same thing (ie. VRRP) but a kernel implementation. It doesn't require both nodes to be alive when the system starts, if there is only one system and it doesn't hear advertisements from anyone, it goes to MASTER state after a while. Ari S. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]