From owner-freebsd-net@freebsd.org Thu Nov 21 21:31:10 2019 Return-Path: Delivered-To: freebsd-net@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 76EC01CB6E3 for ; Thu, 21 Nov 2019 21:31:10 +0000 (UTC) (envelope-from vit@otcnet.ru) Received: from mail.otcnet.ru (mail.otcnet.ru [194.190.78.3]) by mx1.freebsd.org (Postfix) with ESMTP id 47Jt646Gfzz3yGk for ; Thu, 21 Nov 2019 21:31:08 +0000 (UTC) (envelope-from vit@otcnet.ru) Received: from MacBook-Gamov.local (unknown [195.91.148.145]) by mail.otcnet.ru (Postfix) with ESMTPSA id 3663F8B614 for ; Fri, 22 Nov 2019 00:31:01 +0300 (MSK) Subject: Re: FreeBSD as multicast router From: Victor Gamov To: freebsd-net@freebsd.org References: <201911190049.xAJ0n474026871@mail.karels.net> <649ee28c-d5fa-c44b-44f7-e6020bdc5afd@otcnet.ru> Organization: OstankinoTelecom Message-ID: <07757b31-f912-2ef4-8a8f-f055b8e46e54@otcnet.ru> Date: Fri, 22 Nov 2019 00:31:00 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <649ee28c-d5fa-c44b-44f7-e6020bdc5afd@otcnet.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47Jt646Gfzz3yGk X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of vit@otcnet.ru designates 194.190.78.3 as permitted sender) smtp.mailfrom=vit@otcnet.ru X-Spamd-Result: default: False [-5.48 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.otcnet.ru]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; DMARC_NA(0.00)[otcnet.ru]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-3.28)[ip: (-8.64), ipnet: 194.190.78.0/24(-4.32), asn: 50822(-3.45), country: RU(0.01)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:50822, ipnet:194.190.78.0/24, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 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, 21 Nov 2019 21:31:10 -0000 Looks like everything is OK, but multicast routed if S,G specified in JOIN only. Is it a FreBSD-specific limitation? Also `netstat -gs` reports about some errors: ===== IPv4 multicast forwarding: 973725 multicast forwarding cache lookups 15 multicast forwarding cache misses 498297 upcalls to multicast routing daemon 0 upcall queue overflows (!!!) 16459 upcalls dropped due to full socket buffer 0 cache cleanups 15 datagrams with no route for origin 0 datagrams arrived with bad tunneling 0 datagrams could not be tunneled 475659 datagrams arrived on wrong interface 0 datagrams selectively dropped 0 datagrams dropped due to queue overflow 0 datagrams dropped for being too large ===== On 19/11/2019 11:05, Victor Gamov wrote: > On 19/11/2019 03:49, Mike Karels wrote: >>> Hi All >> >>> Still trying to run FreeBSD-box as multicast router :-) >> >>> FreeBSD upgraded to 11.3-STABLE #1 r354778. netstat pacth by Mike Karels >>> manually applied and netstat -gs looks OK now. >> >>> Latest pimd version 3.0beta1 downloaded from git and configured. While >>> configure it report following: >> >>> ===== >>> ------------------ Summary ------------------ >>>    pimd version 3.0-beta1 >>>     Prefix................: /usr/local >>>     Sysconfdir............: /usr/local/etc >>>     Localstatedir.........: /usr/local/var >>>     C Compiler............: cc -g -O2 >> >>> Optional features: >>>     Kernel register encap.: no >>>     Kernel (*,G) support..: no >>>     Kernel MAX VIFs.......: 32 >>>     Memory save...........: no >>>     RSRR (experimental)...: no >>>     Exit on error.........: yes >>> ===== >> >>> What does "Kernel (*,G) support..: no" means? >> >> >>> Then my test multicast network configured (again) >>>           --------------------          ---------- >>> -vlan298-| FreeBSD PIM router |-vlan299-| client | >>>          |208.34/29   205.2/29|         |205.5/29| >>>           --------------------          ---------- >> >> >>> Two multicast generated by FreeBSD-router: one (232.232.9.43) sended >>> from vlan299 and another (232.232.88.173) from vlan298 both with TTL=20 >> >>> Pimd started with following config: >>> ===== >>> phyint vlan299 enable ttl-threshold 20 >>> phyint vlan298 enable ttl-threshold 20 >>> rp-address 10.200.205.2 232.232.0.0/16 >>> ===== >> >> If the threshold is 20 and the TTL is 20, does that mean that the TTL is >> just high enough, or is it at the cutoff?  I'd try lowering the threshold >> and/or increasing the TTL to see which it is.  If the TTL is 20 on the >> incoming side, it would be 19 on the outgoing side. > > ttl-threshold changed to 10 in pimd.conf.  `netstat -g` reports > Thresh=10 now. > > Locally FreeBSD-router generated multicast vlan299 comes to receiver > with ttl=20. And it's OK. > > Locally FreeBSD-router generated multicast vlan298 does not comes to > receiver. > > Multicast generated from another sender on vlan298 comes to router with > TTL=20 but never comes to receiver via vlan299 > >>> Now client is requesting multicast which router is sending from vlan299 >>> and client successfully receiving it.  But when client is requests >>> multicast sending (by router) from vlan298 it doesn't receive it. >> >> >>> My first question: (in theory) is router must send multicast to client >>> in this situation? >> >> In theory yes, modulo TTL and other checks. > > I will reconfigure my test network to use dedicated FreeBSD-box as > multicast router with two only multicast interfaces to get more clear > info from `netstat -gs` > > > Also pimd periodically reports following > ===== > Kernel busy, retrying (1/3) routing socket read in one sec > ===== > > Is it OK? > > > And more about pimd.  It creates register_vif0 on startup.  I assume it > uses this interface (not reported by `ifconfig`) to route all multicast > via.  But `netstat -g` reports this interface with threshold=1.  Is it OK? -- CU, Victor Gamov