From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 3 17:59:30 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87A80106564A for ; Tue, 3 Jan 2012 17:59:30 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 502C28FC08 for ; Tue, 3 Jan 2012 17:59:30 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so19025599obb.13 for ; Tue, 03 Jan 2012 09:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=hQE+4v34jFvKkW4UcrXgn27OixM3MXm/9VukXnTPWSs=; b=inhKacs9CpRpXW34GX+n1ZPh1lF1/pbQA3anYbzoRqjZwbIioCWmKC71Kt+H9IXV00 KL2XC2SNmUo2BLLuxhjlqoqPLQCoJf+BHSz6i+I935OU8pTYkFKsoHt9pF+YO+jEh2jZ cjglTkxyvKSQRh0Wg/NPjv/8t3yGXrN9PDzRY= MIME-Version: 1.0 Received: by 10.182.46.68 with SMTP id t4mr29164190obm.41.1325613569754; Tue, 03 Jan 2012 09:59:29 -0800 (PST) Received: by 10.182.152.6 with HTTP; Tue, 3 Jan 2012 09:59:29 -0800 (PST) In-Reply-To: <2092634439.782373.1325609539518.JavaMail.root@erie.cs.uoguelph.ca> References: <04a201ccca33$fe6115a0$fb2340e0$@fisglobal.com> <2092634439.782373.1325609539518.JavaMail.root@erie.cs.uoguelph.ca> Date: Tue, 3 Jan 2012 09:59:29 -0800 Message-ID: From: Garrett Cooper To: Rick Macklem Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Dave Robison , Devin Teske , Devin Teske , Mohacsi Janos Subject: Re: [ANN] host-setup 4.0 released X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2012 17:59:30 -0000 On Tue, Jan 3, 2012 at 8:52 AM, Rick Macklem wrote: > David Teske wrote: >> > -----Original Message----- >> > From: Mohacsi Janos [mailto:mohacsi@niif.hu] >> > Sent: Tuesday, January 03, 2012 3:59 AM >> > To: Devin Teske >> > Cc: freebsd-hackers@freebsd.org; Dave Robison; Devin Teske >> > Subject: Re: [ANN] host-setup 4.0 released >> > >> > Hi Devin, >> > =A0 =A0 I had a look at the code. It is very nice, >> >> Thank you. >> >> >> > however there are same missing >> > elements: >> > =A0 =A0 - IPv6 support >> >> Open to suggestions. >> >> Maybe adding a "ipaddr6" below "ipaddr" in the interface configuration >> menu. >> >> Also, do you happen to know what the RFC number is for IPv6 address >> format? I >> need to know all the special "features" (for example, I know you can >> specify >> "::1" for localhost, but can you simply omit octets at-will? e.g., >> ::ff:12:00::: >> ?) >> > The basics are in RFC4291, but I think that inet_pton(3) knows how to > deal with it. (I think "::" can be used once to specify the longest # > of 16bit fields that are all zeros.) > > After inet_pton() has translated it to a binary address, then the macros > in sys/netinet6/in6.h can be used to determine if the address is a loopba= ck, etc. > > I'm no ip6 guy by any means, so others, please correct/improve on this, a= s required. '::' can also be omitted as a form of compression (unless it's '::'). An example of IPv6 compression follows: '::' is the same as the following, uncompressed: '0000:0000:0000:0000:0000:0000' (assuming I got my double octets right) There are a lot more RFCs one can pore over to try and determine how IPv6 addressing works, but bottom line is (as I discovered): 1. Square brackets aren't necessary, except when you need to distinguish a port from an IPv6 address. 2. Compression is nice. 3. There's a rule of thumb for how to determine addresses, prefixing, etc (I never fully figured out the rules). 4. Prefixing the IPv6 address with fe80: generally means it's an IPv4 -> IPv6 address (IIRC). Other than that, I get lost because there isn't an IPv6 for dummies book (:P) out yet, the documents I've found in the past have been less than helpful, and the RFCs are usually outdated, or I have to jump through 3-4 RFCs to maybe get the information I need. Cheers, -Garrett