From owner-freebsd-stable@FreeBSD.ORG Fri Nov 2 19:49:58 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91EE316A421; Fri, 2 Nov 2007 19:49:58 +0000 (UTC) (envelope-from bh@izb.knu.ac.kr) Received: from izb.knu.ac.kr (izb.knu.ac.kr [155.230.157.93]) by mx1.freebsd.org (Postfix) with ESMTP id 05FEB13C4B6; Fri, 2 Nov 2007 19:49:57 +0000 (UTC) (envelope-from bh@izb.knu.ac.kr) Received: by draba.izb.knu.ac.kr (Postfix, from userid 59) id 8B8443EA8; Sat, 3 Nov 2007 01:47:02 +0900 (KST) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on draba.izb.knu.ac.kr X-Spam-Level: X-Spam-Status: No, score=-16.5 required=15.1 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VERIFIED autolearn=disabled version=3.2.3 X-Spam-Comment: DKIM? See http://www.google.com/search?btnI&q=RFC+4871 Received: from izb.knu.ac.kr (localhost.izb.knu.ac.kr [127.0.0.1]) by draba.izb.knu.ac.kr (Postfix) with ESMTP id 7D93C3EA7; Sat, 3 Nov 2007 01:46:58 +0900 (KST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=izb.knu.ac.kr; h=subject: from:reply-to:to:cc:in-reply-to:references:content-type:date: message-id:mime-version:content-transfer-encoding; q=dns/txt; s= s1024; bh=Jo7yGDNE0qWWRlBvL8MGF7QEaIg=; b=Knu8V8ZY1L16SxWvcvPUca SfoupDo3C4cCHRji4sEP8RcxwUHbHJxCAIBK7uZfgC1fbEczI2rCyHKJuT0ZpD2Y hJRr2lrqa7EJxPCWTz3r+pgmnrgb8Sb7Jw/w+eD85cJsRkuCDZfx4LCvn3iqlRjL drAnW1eslZKMR1tnS2yFI= Received: from viola.izb.knu.ac.kr (unknown [IPv6:2002:9be6:9d5d:2:20b:6aff:fe56:969f]) by draba.izb.knu.ac.kr (Postfix) with ESMTP id 64B913EA5; Sat, 3 Nov 2007 01:46:58 +0900 (KST) Received: from [IPv6:2002:9be6:9d5d:2:20b:6aff:fe56:969f] (viola.izb.knu.ac.kr [IPv6:2002:9be6:9d5d:2:20b:6aff:fe56:969f]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Issuer "鄭聖美" (verified OK)) (Authenticated sender: bh.rfc4871@viola.izb.knu.ac.kr) by viola.izb.knu.ac.kr (Postfix) with ESMTP id 008825E13; Sat, 3 Nov 2007 01:46:58 +0900 (KST) From: Byung-Hee HWANG To: Hajimu UMEMOTO In-Reply-To: References: <1194015907.1422.14.camel@viola.izb.knu.ac.kr> Content-Type: text/plain Organization: InZealBomb Date: Sat, 03 Nov 2007 01:46:57 +0900 Message-Id: <1194022017.1032.12.camel@viola.izb.knu.ac.kr> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org, bind-users@isc.org Subject: [SOLVED] (Was: Re: [FreeBSD 7.0-BETA1] strange behavior in hostname resolving order) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bh@izb.knu.ac.kr List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2007 19:49:58 -0000 Dear Mr. UMEMOTO, On Sat, 2007-11-03 at 00:58 +0900, Hajimu UMEMOTO wrote: > Hi, > > >>>>> On Sat, 03 Nov 2007 00:05:07 +0900 > >>>>> Byung-Hee HWANG said: > > bh> To Whom It May Concern: (Cc'ed bind-users@isc.org) > > bh> Usually i prefer 6to4(stf(4)) to 6over4(gif(4)) because some > bh> tunnel providers like to limit bandwidth too musch. So until my > bh> upstream ISP give me native ipv6 addresses (it's take long time maybe), > bh> i'm going to use 6to4 instead of 6over4 continuous. > > bh> Here is my shot using 6to4: > > bh> bh@viola:~> uname -a > bh> FreeBSD viola.izb.knu.ac.kr 7.0-BETA1 FreeBSD 7.0-BETA1 #0: > bh> Fri Nov 2 12:13:10 KST 2007 > bh> root@viola.izb.knu.ac.kr:/usr/obj/usr/src/sys/GENERIC i386 > > bh> bh@viola:~> ifconfig rl0 | grep 2002 > bh> inet6 2002:9be6:9d5d:2:20b:6aff:fe56:969f prefixlen 64 autoconf > > bh> bh@viola:~> ping6 -c 5 mx.jp.freebsd.org. > bh> PING6(56=40+8+8 bytes) > bh> 2002:9be6:9d5d:2:20b:6aff:fe56:969f --> 2001:218:422:1::15 > bh> 16 bytes from 2001:218:422:1::15, icmp_seq=0 hlim=49 time=225.297 ms > bh> 16 bytes from 2001:218:422:1::15, icmp_seq=1 hlim=49 time=224.591 ms > bh> 16 bytes from 2001:218:422:1::15, icmp_seq=2 hlim=49 time=237.175 ms > bh> 16 bytes from 2001:218:422:1::15, icmp_seq=3 hlim=49 time=230.540 ms > bh> 16 bytes from 2001:218:422:1::15, icmp_seq=4 hlim=49 time=224.681 ms > > bh> --- mx.jp.freebsd.org ping6 statistics --- > bh> 5 packets transmitted, 5 packets received, 0.0% packet loss > bh> round-trip min/avg/max/std-dev = 224.591/228.457/237.175/4.889 ms > > bh> bh@viola:~> traceroute6 mx.jp.freebsd.org. > bh> traceroute6 to mx.jp.freebsd.org (2001:218:422:1::15) from > bh> 2002:9be6:9d5d:2:20b:6aff:fe56:969f, 64 hops max, 12 byte packets > bh> 1 2002:9be6:9d5d:2:250:4dff:fe00:5df3 1.541 ms 0.949 ms 1.154 ms > bh> [......] > bh> 23 v6.imgsrc.co.jp 264.635 ms 226.812 ms 232.207 ms > bh> 24 castle.jp.FreeBSD.org 427.683 ms 219.659 ms 222.862 ms > bh> bh@viola:~> > > bh> And from now on, i would give you one question. Why is 7.0-BETA1 > bh> different from another -RELEASE in hostname resolving order? AFAIK, at > bh> least on 6.2-RELEASE, the order is first IPv6 and then IPv4. However, > bh> 7.0-BETA1 try to lookup in first IPv4 than IPv6. Here is the evidence: > > bh> bh@setaria:~> uname -srm > bh> FreeBSD 6.2-RELEASE-p8 i386 > bh> bh@setaria:~> telnet mx.jp.freebsd.org 25 > bh> Trying 2001:218:422:1::15... > bh> Connected to mx.jp.freebsd.org. > bh> Escape character is '^]'. > bh> [......] > bh> bh@setaria:~> ssh -v mx.jp.freebsd.org. > bh> debug1: Connecting to mx.jp.freebsd.org. [2001:218:422:1::15] > bh> ^C > bh> > bh> And > > bh> bh@viola:~> uname -srm > bh> FreeBSD 7.0-BETA1 i386 > bh> bh@viola:~> telnet mx.jp.freebsd.org 25 > bh> Trying 210.226.20.15... > bh> Connected to mx.jp.freebsd.org. > bh> Escape character is '^]'. > bh> [......] > bh> bh@viola:~> ssh -v mx.jp.freebsd.org. > bh> debug1: Connecting to mx.jp.freebsd.org. [210.226.20.15] > bh> ^C > > bh> What happended? Is there anyone to dislike IPv6 in src committers? > bh> Please let me know the correct answer to this puzzle ;; > > The Default Address Selection is turned on by default after > 6.2-RELEASE was out. According to RFC 3484, the default policy is as > follows: > > Prefix Prec Label > ::1/128 50 0 > ::/0 40 1 > 2002::/16 30 2 > ::/96 20 3 > ::ffff:0.0.0.0/96 10 4 > > It means that communicating with native IP address is preferred over > 6to4 address when source address and destination adddress are not 6to4 > address. > > If you want not to treat 6to4 address as special, you can omit the > line of 2002::/16 by putting the following lines into your > /etc/ip6addrctl.conf: > > ::1/128 50 0 > ::/0 40 1 > ::/96 20 3 > ::ffff:0.0.0.0/96 10 4 > > Then, run `/etc/rc.d/ip6addrctl restart'. > > Please refer the ip6addrctl(8) manpage and RFC 3484 for detail. Now i can understand the puzzle, thanks for the guidance. Your answer has been useful and is greatly appreciated. Byung-Hee -- "He's a responsible man in his own way." -- Michael Corleone, "Chapter 25", page 363