[ANN] host-setup 4.0 released

Garrett Cooper yanegomi at gmail.com
Tue Jan 3 17:59:30 UTC 2012


On Tue, Jan 3, 2012 at 8:52 AM, Rick Macklem <rmacklem at uoguelph.ca> wrote:
> David Teske wrote:
>> > -----Original Message-----
>> > From: Mohacsi Janos [mailto:mohacsi at niif.hu]
>> > Sent: Tuesday, January 03, 2012 3:59 AM
>> > To: Devin Teske
>> > Cc: freebsd-hackers at freebsd.org; Dave Robison; Devin Teske
>> > Subject: Re: [ANN] host-setup 4.0 released
>> >
>> > Hi Devin,
>> >     I had a look at the code. It is very nice,
>>
>> Thank you.
>>
>>
>> > however there are same missing
>> > elements:
>> >     - 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 loopback, etc.
>
> I'm no ip6 guy by any means, so others, please correct/improve on this, as 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


More information about the freebsd-hackers mailing list