From nobody Sat Feb 12 11:53:43 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1626019A868C for ; Sat, 12 Feb 2022 11:53:46 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.netfence.it (mailserver.netfence.it [78.134.96.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailserver.netfence.it", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jwpm9028Jz3kXZ for ; Sat, 12 Feb 2022 11:53:44 +0000 (UTC) (envelope-from ml@netfence.it) Received: from [10.1.2.18] (alamar.local.netfence.it [10.1.2.18]) (authenticated bits=0) by soth.netfence.it (8.17.1/8.17.1) with ESMTPSA id 21CBrh5E038986 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO) for ; Sat, 12 Feb 2022 12:53:43 +0100 (CET) (envelope-from ml@netfence.it) X-Authentication-Warning: soth.netfence.it: Host alamar.local.netfence.it [10.1.2.18] claimed to be [10.1.2.18] Message-ID: <594e3d18-9645-3b3f-7a41-87c586fb93ad@netfence.it> Date: Sat, 12 Feb 2022 12:53:43 +0100 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 From: Andrea Venturoli Subject: Some strangeness with CARP To: freebsd-net@freebsd.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Jwpm9028Jz3kXZ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=netfence.it; spf=pass (mx1.freebsd.org: domain of ml@netfence.it designates 78.134.96.152 as permitted sender) smtp.mailfrom=ml@netfence.it X-Spamd-Result: default: False [-3.80 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:78.134.96.152:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_NONE(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[netfence.it,none]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-net]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:35612, ipnet:78.134.0.0/17, country:IT]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hello. I've set up a network with CARP and I think I'm seeing something strange. What follows is a simplified setup (the real one involves lagg and vlan, but this should not matter). I have a Zyxel managed switch, two "servers": - A 192.168.0.1 - B 192.168.0.2 and two "clients" - C 192.168.0.10 - D 192.168.0.11 Now let's add the "shared" CARP IP 192.168.0.3 (vhid 1) to server A and server B and start sniffing on C and D. If C or D talks with A or B using their own IP (192.168.0.1/192.168.0.2) the other client does not see that traffic (as is to be expected on a switched network). However if any client talks with the CARP IP (192.168.0.3) every node on the LAN can sniff that traffic! I tracked this down to the switch not learning the MAC address 00:00:5e:00:01:01 (which is what CARP vhid 1 uses), so every outgoing packet is broadcast to the whole network. Is this normal??? Changing to any other VHID (I tried 2, 4 and 10) does not show the same problem, as 00:00:5e:00:01:xx will show up in the switch MAC database. I'm scrapping my head trying to find an explanation, but so far I could only think the switch is misbehaving. Or am I missing some info and there's a reason for this? bye & Thanks av.