From owner-freebsd-net@FreeBSD.ORG Sun Jan 12 14:49:57 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1046871 for ; Sun, 12 Jan 2014 14:49:57 +0000 (UTC) Received: from mail.ijs.si (mail.ijs.si [IPv6:2001:1470:ff80::25]) by mx1.freebsd.org (Postfix) with ESMTP id 5C97316BE for ; Sun, 12 Jan 2014 14:49:57 +0000 (UTC) Received: from amavis-proxy-ori.ijs.si (localhost [IPv6:::1]) by mail.ijs.si (Postfix) with ESMTP id 3f2LSM5PkHzGMxT for ; Sun, 12 Jan 2014 15:49:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ijs.si; h= user-agent:message-id:references:in-reply-to:organization :subject:subject:from:from:date:date:content-transfer-encoding :content-type:content-type:mime-version:received:received :received:received; s=jakla2; t=1389538194; x=1392130195; bh=prr YN4sKQItvfEqEkvAuKjVnC3Dq5U4Sf3GhYLO/ShE=; b=Dn9IMI3vbGH9x87JLiN /9zPKL+CWxfXhiZIH+xBR+MFzswViw0wWCFw4IVQ+q8KodmIWnFkDijoGfN+Z8Pl DSk3snmwD8RpZ0D13w5tcoVVBwxXwUlAAB8lVDKJoNrxDCHDdDw0IX8SdLufPxaK 2YxVpHL834Va8yagBaQ++/tc= X-Virus-Scanned: amavisd-new at ijs.si Received: from mail.ijs.si ([IPv6:::1]) by amavis-proxy-ori.ijs.si (mail.ijs.si [IPv6:::1]) (amavisd-new, port 10012) with ESMTP id d3CawHfRXFZV for ; Sun, 12 Jan 2014 15:49:54 +0100 (CET) Received: from mildred.ijs.si (mailbox.ijs.si [IPv6:2001:1470:ff80::143:1]) by mail.ijs.si (Postfix) with ESMTP for ; Sun, 12 Jan 2014 15:49:53 +0100 (CET) Received: from neli.ijs.si (neli.ijs.si [193.2.4.95]) by mildred.ijs.si (Postfix) with ESMTP id 9D8A5A61 for ; Sun, 12 Jan 2014 15:49:53 +0100 (CET) Received: from sleepy.ijs.si ([2001:1470:ff80:e001::1:1]) by neli.ijs.si with HTTP (HTTP/1.1 POST); Sun, 12 Jan 2014 15:49:53 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 12 Jan 2014 15:49:53 +0100 From: Mark Martinec To: freebsd-net@freebsd.org Subject: Re: Merge ping+ping6 and traceroue+traceroute6 to single =?UTF-8?Q?utilities=3F?= Organization: J. Stefan Institute In-Reply-To: References: <1063008459.20140111160525@serebryakov.spb.ru> <20140111164047.GA97150@edge.bac.lab> <20140111.180057.78714603.sthaug@nethelp.no> Message-ID: <29dbfd1a0f58628972811daff470b832@mailbox.ijs.si> X-Sender: Mark.Martinec+freebsd@ijs.si User-Agent: Roundcube Webmail/0.9.5 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jan 2014 14:49:57 -0000 2014-01-12 10:15, Chris H wrote: >> I use unified ping and traceroute on JunOS daily. It's a blessing not >> to have to specify the address family. > > Disagree. In the current, on FreeBSD, in either case, it's less > keystrokes. > How is ping -6 || ping -4 better? What's the point? Less keystrokes? As has been already said, specifying a -4 or -6 is hardly ever needed. If the target is an IPv4 or IPv6 address there is no need to explicitly specify a protocol family, it is already implied in the address family. Same if a localhost lives in only one address family. Nor is it necessary to specify the PF if one is only interested in basic reachability of a target and does not care to pick any particular PF, interface, source IP address, target IP address, routing table, etc. The only case when one would need to explicitly specify a protocol family is when a target is a DNS name (not an IP address) AND the local side is dual stacked with both address families configured. This situation is *no different* from the current situation where a target is a DNS name resolving to multiple IP addresses (like in case of some multihomed hosts or internet services which rely on DNS for load balancing): if basic service availability is to be checked and one is not picky about interface, IP address, route etc chosen, just specifying a DNS name suffices, otherwise one has to manually specify the target IP address *even now*. How often do you need to use -4 or -6 options in utilities like ssh, telnet, rsync, curl, wget, ... ? Hardly ever, most of the time it just works and does what is needed. At times when it doesn't, there is probably a need to fix the broken network anyway. Imagine the hurdles if there were separate utilities ssh6, telnet6, etc - one would need to check the local and remote address and choose a suitable utility variant. > How will modifying all the some thousands of scripts everyone currently > uses based on the current commands, make it better? It is easy to see how it makes it friendlier for scripts and monitoring tools. Scripting languages like shell and IPv6-challenged PHP which has no access to getaddrinfo(3) and friends currently need to go to great lengths if they want to ping some target. They need to resolve the target name to IP addresses, check to see to which address families these addresses belong, check local host for availability of each protocol family, and based on this pick either ping or ping6 command. Most of such scripts currently just do not care of fall short of doing it properly, which makes them break on IPv6-only hosts, or leave their functionality severely limited. Now we are in 2014, major sites have already switched to dual stack support, some services are only offered over IPv6 (mostly internal currently), some hosts are IPv6-only (and use http proxy or NAT64 to connect to legacy services). It is illusionary to expect the masses of ad-hoc scripts to be adapted. Giving them a modern powerful tool would make things much easier for script writers to do it right, and make sysadmins life easier. Mark