From owner-freebsd-questions@freebsd.org Tue Dec 20 05:05:59 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2622C893D7 for ; Tue, 20 Dec 2016 05:05:59 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id B61CE1BA8 for ; Tue, 20 Dec 2016 05:05:59 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 24C164800A; Tue, 20 Dec 2016 00:05:59 -0500 (EST) Received: from fledge.watson.org (doug@localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.15.2/8.15.2) with ESMTP id uBK55w1T025343; Tue, 20 Dec 2016 00:05:58 -0500 (EST) (envelope-from doug@fledge.watson.org) Received: from localhost (doug@localhost) by fledge.watson.org (8.15.2/8.15.2/Submit) with ESMTP id uBK55wag025340; Tue, 20 Dec 2016 00:05:58 -0500 (EST) (envelope-from doug@fledge.watson.org) Date: Tue, 20 Dec 2016 00:05:58 -0500 (EST) From: doug Reply-To: doug@safeport.com To: Anton Yuzhaninov cc: freebsd-questions@freebsd.org Subject: Re: anyone know what 'ping: sendto: Can't assign requested" means In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (fledge.watson.org [127.0.0.1]); Tue, 20 Dec 2016 00:05:58 -0500 (EST) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 05:06:00 -0000 On Mon, 19 Dec 2016, Anton Yuzhaninov wrote: > On 12/06/16 13:33, DTD wrote: >> >> So the question comes down to under what conditions does ping give the >> 'sendto: >> Can't assign requested address' error. I have not been able to get that to >> happen outside of a jailed environment. > > Outside jails this error happens when you ping address from 127.0.0.0/8 (but > not 127.0.0.1) > > :~> ping 127.0.0.2 > PING 127.0.0.2 (127.0.0.2): 56 data bytes > ping: sendto: Can't assign requested address Sorry to be dense but I do not understand the comment. I have a LAN with a few hosts: 192.168.2.1 (ISP gateway) tardis.boltsys.com (192.168.2.22) lilac.boltsys.com (192.168.2.44) zeus.boltsys.com (192.168.2.45) thor.boltsys.com (192.168.2.104) 192.168.2.105 hphub.boltsys.com (192.168.2.106) 192.168.2.107 gaia.boltsys.com (192.168.2.110) gsscc.boltsys.com (192.168.2.111) odin.boltsys.com (192.168.2.112) aether.boltsys.com (192.168.2.113) chaos.boltsys.com (192.168.2.117) pontos.boltsys.com (192.168.2.118) 192.168.2.120 192.168.2.125 artemis.boltsys.com (192.168.2.102) The jail host is chaos, jails are gaia, gsscc, and pontos. Without showing examples of all the pings, what I have is that any jail can ping the other jails and the host but can not ping any other host in 192.168.2.0/24, e.g., using gaia: em0: flags=8843 metric 0 mtu 1500 options=4219b ether c8:9c:dc:eb:ab:fb inet 192.168.2.110 netmask 0xffffffff broadcast 192.168.2.110 media: Ethernet autoselect (100baseTX ) status: active lo0: flags=8049 metric 0 mtu 16384 options=600003 lo1: flags=8049 metric 0 mtu 16384 options=600003 inet 127.0.1.1 netmask 0xffffffff gaia:~> ping -c 1 gsscc PING gsscc.boltsys.com (192.168.2.111): 56 data bytes 64 bytes from 192.168.2.111: icmp_seq=0 ttl=64 time=0.025 ms -- gaia:~> ping -c 1 pontos PING pontos.boltsys.com (192.168.2.118): 56 data bytes 64 bytes from 192.168.2.118: icmp_seq=0 ttl=64 time=0.021 ms --- gaia:~> ping -c 1 artemis PING artemis.boltsys.com (192.168.2.102): 56 data bytes ping: sendto: Can't assign requested address pinging localhost works gaia:~> ping -c 1 localhost PING localhost (127.0.1.1): 56 data bytes 64 bytes from 127.0.1.1: icmp_seq=0 ttl=64 time=0.027 ms and (obviously) gaia:~> ping -c 1 microosoft.com PING microosoft.com (52.178.167.109): 56 data bytes ping: sendto: Can't assign requested address Does not. So either that's the way it is suppost to work or there is a 9.3 bug. I assume I could use chaos as a gateway and use NAT via pf/ipfw but thats not worth the effort in the production systems, I can just ping from the host. So my question stands. I can not find out what that error means and do not know how to reproduce it outside of a jail.