From owner-freebsd-net@FreeBSD.ORG Thu Oct 16 09:41:45 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7D2E3A9 for ; Thu, 16 Oct 2014 09:41:44 +0000 (UTC) Received: from smtp-outbound.userve.net (smtp-outbound.userve.net [217.196.1.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.userve.net", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F08782B for ; Thu, 16 Oct 2014 09:41:44 +0000 (UTC) Received: from owa.usd-group.com (owa.usd-group.com [217.196.1.2]) by smtp-outbound.userve.net (8.14.7/8.14.7) with ESMTP id s9G9fXDq062270 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 16 Oct 2014 10:41:33 +0100 (BST) (envelope-from matt.churchyard@userve.net) Received: from SERVER.ad.usd-group.com (192.168.0.1) by SERVER.ad.usd-group.com (192.168.0.1) with Microsoft SMTP Server (TLS) id 15.0.516.32; Thu, 16 Oct 2014 10:41:32 +0100 Received: from SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9]) by SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9%12]) with mapi id 15.00.0516.029; Thu, 16 Oct 2014 10:41:32 +0100 From: Matt Churchyard To: Sascha , "freebsd-net@freebsd.org" Subject: RE: Carp stuck in INIT Thread-Topic: Carp stuck in INIT Thread-Index: Ac/oisnIy7pzRtICQlegI7PCf1AzE///+zoAgAAeP+mAAO5KgP//7YbAgAAqdYD//+vfgA== Date: Thu, 16 Oct 2014 09:41:31 +0000 Message-ID: References: <102a877d8483473bbd4a5c701c23aaa7@SERVER.ad.usd-group.com>, <1C4FB5A0-E106-46CE-B458-21030E32CAD3@userve.net> <543F7AC7.1020603@gmail.com> <543F8EE5.5020405@gmail.com> In-Reply-To: <543F8EE5.5020405@gmail.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.0.10] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2014 09:41:45 -0000 ifconfig_em0=3D"up" ifconfig_em0=3D"vhid 10 pass mypass 192.168.0.100/24" The problem with that is that rc.conf is basically just a list of variables= , so the second ifconfig_em0 entry will overwrite the first one. I'm not too bothered about my 'up' problem at the moment. I actually have n= o current requirement for carp, I was just doing some testing to see how it= worked. As I said I'll try again with 10.1 and if it's still the same I may get mor= e involved with trying to find out exactly what's going on and whether it's= a bug or not. Regards, Matt From: Sascha [mailto:kinzenator@gmail.com] Sent: 16 October 2014 10:25 To: Matt Churchyard; freebsd-net@freebsd.org Subject: Re: Carp stuck in INIT Hi Matt thanks a lot for the help! Unfortunately the Forum was down before I could read the replies. But what = you said makes sense and now it is clearly for me. The new Setup is working great and now the routing table looks good. I also= identified my mistake on the test machine and now I knew why I get stuck i= n INIT state. You're right. A /30 Subnet is only possible with CARP in Freebsd 10. Earlie= r versions couldn't handle that. Back to you're problem. Did you try to add something like this to rc.conf: ifconfig_em0=3D"up" ifconfig_em0=3D"vhid 10 pass mypass 192.168.0.100/24" defaultrouter=3D"192.168.0.10" Did you check if advertisements are sent from the interface after booting tcpdump -npi em0 -T carp Regards Sascha HI Sascha, This example is wrong: ifconfig_em0=3D"inet vhid 10 pass mypass alias 192.168.0.100/32" As discussed in the forum (not sure if you saw the last couple of messages = before forum was taken down), if the carp address is the primary address on= the interface, it needs to use the real mask. In my case during testing th= at was a /24, but for you it should be /30. (Also the 'inet' keyword should proceed the IP address, I suspect that ifco= nfig line would be rejected entirely) There is no need at all for you to use /32! /32 is only used when the addre= ss is an alias and you already have an address configured on the interface = that is part of the same network. In your case, you are only assigning the = carp address to your interface, so you need to use /30 in the carp ifconfig= line (See Freddie's example). As confirmed by Freddie, this configuration definitely works when using a /= 30 mask, so you should have no problem configuring your systems as in Fredd= ie's example (or my example on the forum although I tested with a /24 mask = instead of /30). These configs definitely work. I still get my issue of being stuck in INIT mode on boot even after reorder= ing the options and adding the 'inet' keyword (unless I add 'up'). That cou= ld be a weird virtualbox issue though. As mentioned I'm going to try a more= recent version of FreeBSD. Note: All this applies to FreeBSD 10. I'm not even sure carp on a /30 netwo= rk is possible in earlier versions that use the old carp system. (And confi= guration of the old carp is quite different) Regards, Matt Churchyard -- Hi Matt, I think I'm the user you try to help in the forum ;-). I had the same problem like you when doing the first tests with carp. The a= lias must be a /32 as subnet declaration. I didn't read properly the exampl= es in the manual and Handbook. So I configured CARP as usual in FreeBSD 9. = The first tries were with subnet mask from the relevant network (for exampl= e /24). This leads me into the same problem. When booting up the machine, s= ome interfaces stuck in INIT state. A Workaround was to put them first down= and then up again with ifconfig. But my router has also enabled PF and is = doing Traffic Filtering. The next problem came very fast. When reloading th= e pf.conf traffic was blocked on all interfaces. Then I discovered in the m= anual all examples have a /32 subnet mask. After changing the machine boots= up properly and all interfaces are in MASTER state. Also reloading pf.conf= was working. Maybe you can try this: ifconfig_em0=3D"inet vhid 10 pass mypass alias 192.168.0.100/32" On my first testing machine the configuration looks like this: ifconfig_vlan60=3D"inet 192.168.60.253/24" ifconfig_vlan60_alias0=3D"inet vhid 3 pass xxxxxxxx alias 192.168.60.1/32 v= lan 60 vlandev lagg0" The system shows a warning message during boot when I leave the inet keywor= d in carp interface configuration. I believe the manual is maybe incomplete= . Alls examples are without inet keyword. Maybe the warnings are wrong and = could be ignored. For me it worked also with the warning but I get a bit ne= rvous on those messages. @Freddie I had a internet connection like you with a /30 Subnet from my ISP. My interface is configured like this ifconfig_igb0_alias0=3D"vhid 100 advskew 0 pass Test alias x.x.67.2/32" But then I get confused about setting up a default route Details can be found here: https://forums.freebsd.org/viewtopic.php?f=3D7&t=3D48443 But it seems that you configured your interface different like described in= the manual. I'm a bit surprised that this configuration is working. regards Sascha Am 15.10.2014 um 18:46 schrieb Matt Churchyard: Thanks for the reply I tried moving the IP address to the beginning of the ifconfig line but it = still seems to show the same error on boot and refuses to leave INIT mode. = This isn't critical as I'm just playing around with it at the moment. I'm using virtualbox to test with and a few 10.0-RELEASE vm's I've had kick= ing around for a while. I might replace them with 10.1-RC2 tomorrow and see= if I get the same thing. Matt On 15 Oct 2014, at 16:58, Freddie Cash > wrote: You don't need the "up" keyword, and it definitely works with a /30 and a s= ingle IP. I use that at work. But the order of options does matter (IP firs= t, CARP stuff second). Requires FreeBSD 10 and the new CARP code. Might work on pre-10, but I neve= r got it to work. The following is from our core fibre router: ifconfig_em0=3D"inet 142.24.243.161/30 vhid 30 pass mypass30 -lro -tso -vlanhwtso" defaultrouter=3D"142.24.243.162" The slave box is the same, but with "advskew 128" added after the pass conf= ig. _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"