Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jan 2012 09:59:29 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        freebsd-hackers@freebsd.org, Dave Robison <daver@vicor.com>, Devin Teske <dteske@vicor.com>, Devin Teske <devin.teske@fisglobal.com>, Mohacsi Janos <mohacsi@niif.hu>
Subject:   Re: [ANN] host-setup 4.0 released
Message-ID:  <CAGH67wS7QuqXXAa22yP%2BawDR52yLPBzfvRC3_=_mGR3DtGA2eQ@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 3, 2012 at 8:52 AM, Rick Macklem <rmacklem@uoguelph.ca> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wS7QuqXXAa22yP%2BawDR52yLPBzfvRC3_=_mGR3DtGA2eQ>