From owner-freebsd-questions@freebsd.org Tue Oct 8 08:52:10 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 957DE1400F6 for ; Tue, 8 Oct 2019 08:52:10 +0000 (UTC) (envelope-from freebsd-database@pp.dyndns.biz) Received: from keymaster.local (ns1.xn--wesstrm-f1a.se [IPv6:2a00:d880:5:1b9::8526]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "keymaster.pp.dyndns.biz", Issuer "keymaster.pp.dyndns.biz" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46nWLd2rmKz4c4D for ; Tue, 8 Oct 2019 08:52:08 +0000 (UTC) (envelope-from freebsd-database@pp.dyndns.biz) Received: from [192.168.69.69] ([192.168.69.69]) by keymaster.local (8.15.2/8.15.2) with ESMTP id x988pwfN064907 for ; Tue, 8 Oct 2019 10:51:59 +0200 (CEST) (envelope-from freebsd-database@pp.dyndns.biz) Subject: Re: Intermittent connectivity loss with em(4) References: <94B563F6-55C4-46BC-BD79-5CC2AD86E6C1@mail.sermon-archive.info> <43f0decc-d459-4ded-dc46-c249bc8e24c9@pp.dyndns.biz> <094A1786-98A8-4CEF-A036-5809D9705EC8@mail.sermon-archive.info> From: =?UTF-8?Q?Morgan_Wesstr=c3=b6m?= To: FreeBSD Questions Message-ID: <8c532e7a-241d-ce49-27d4-46a587538c85@pp.dyndns.biz> Date: Tue, 8 Oct 2019 10:51:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46nWLd2rmKz4c4D X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-database@pp.dyndns.biz has no SPF policy when checking 2a00:d880:5:1b9::8526) smtp.mailfrom=freebsd-database@pp.dyndns.biz X-Spamd-Result: default: False [1.85 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.69)[-0.689,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; HFILTER_HELO_IP_A(1.00)[keymaster.local]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_SPAM_LONG(0.42)[0.421,0]; HFILTER_HELO_NORES_A_OR_MX(0.30)[keymaster.local]; R_SPF_NA(0.00)[]; DMARC_NA(0.00)[pp.dyndns.biz]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:198203, ipnet:2a00:d880::/32, country:NL]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.08)[asn: 198203(-0.42), country: NL(0.02)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Oct 2019 08:52:10 -0000 On 2019-10-08 07:25, Doug Hardie wrote: > It sounds like your cable modem is not using NAT for the various machines, but is using one local address for both. Hence, it depends on the response to the arp requests which one will receive the packets. In my experience you have to configure cable modems for the local IP addresses of the machines on your network. However, I have only dealt with a couple of cable modem connections. You might want to contact the internet provider and explain the situation to them. They can probably identify the cause. > > -- Doug > That is almost correct. The cable modem is a SagemCom 2864 with tailored firmware for my ISP and it has a setting to switch between NAT/bridge mode. I've put it in bridge mode and the ISP provides 4 public IP-addresses through DHCP. Some kind of arp screwup is my suspicion too although it perplexes me this doesn't happen when I boot the machine on Linux. I've used FreeBSD for 15+ years as my router and have never seen this before. I'll see if I can boot it on OpenBSD later and compare the behaviour. Being able to get more debug info from em(4) somehow might have been useful. The ISP in question is Sweden's ComHem and when it comes to them having competence to resolve this... well, let's not go there... :) > Your choices then to confirm are to run the linux solution which > worked perfectly for an extended period to catch the intermittent > problem or setup a host on one the spare nics and ping a minute to > that host to see if all interfaces drop at the same time or just the > cablemodem interface, that would give you a more realistic view of > kernel / driver / apm issues. > > If you are running routed through your cablemodem, ping a minute to > the cablemodem also, that will test the actual interface. > > Horses for courses, but IMHO you are nearly always better off bridging isp cpe > > Harry. Thank you, Harry. No, Linux isn't an alternative. I run it on my clients but I feel much more comfortable with FreeBSD protecting my network. The Linux iptables/networking learning curve would be to much for me. :) Only what is currently the cable modem interface is experiencing this behaviour. I connect one of the others to my LAN and ssh to the machine that way and I never lose connection through ssh. As I explained earlier I've rotated through all three interfaces and whatever is connected to the cable modem fails. The behaviour is strangely regular. It starts within minutes after boot and then goes through 5-7 minutes of lost connectivity and 5-7 minutes of restored connectivity and just cycles through this pattern. Link LED remains on and activity LED is flashing. I forced the interface to 100Nbit/s for one test but behaviour didn't change. /Morgan