FAQ
We are trying to figure out how Go should handle zone specifiers in
IPv6 addresses (the %foo in ffff:eeee::1234%foo).

It is unclear to me whether these are important enough to put in the
main net package, or if instead we should make a parallel go.net/ipv6
package that you would be forced to use if you need them.

What do people actually use these for? How often do they come up? In
what contexts? Real experiences are best.

Thanks very much.
Russ

--

Search Discussions

  • David Anderson at Dec 7, 2012 at 3:56 am
    They come up for me when doing either ad-hoc networking and VM
    configuration, both of which I do frequently. In both cases, IPv6
    autoconfigures a link-local address, which is awesome as I can just jack in
    the cable and immediately talk to stuff, without having to set anything up
    (assuming I know the peer's MAC address, which in these cases I do).

    At work, I have a p2p ethernet link between my laptop dock and my desktop,
    and I use link-local addresses to set up Synergy between the machines.
    Neither machine needs any particular configuration, as the link-local
    address exists intrinsically when the interface comes up. The only catch is
    that I need to specify the zone when setting up SSH tunnels and the like,
    since routing breaks down with link-local addresses. In that sense, I use
    zone specifiers daily.

    This isn't the 95% use case for IPv6, however. Most networks, you'd
    autoconfigure a global address, at which point the kernel deals with
    interface selection.

    If zones can be added to the stdlib package without too much pain, I'd like
    having a one stop shop for setting up connections. Being able to pass
    whatever was specified as --address to net.Dial, rather than having to
    import another package and switch on whether it decides that something
    special is happening, that would be nice. Otherwise, most sysadmin-friendly
    programs would have to import the go.net package.

    If it adds too much pain to the net package, well, I'd live with it, but it
    would make me mildly sad.

    Hope this helps a little,
    - Dave



    On Thu, Dec 6, 2012 at 7:33 PM, Russ Cox wrote:

    We are trying to figure out how Go should handle zone specifiers in
    IPv6 addresses (the %foo in ffff:eeee::1234%foo).

    It is unclear to me whether these are important enough to put in the
    main net package, or if instead we should make a parallel go.net/ipv6
    package that you would be forced to use if you need them.

    What do people actually use these for? How often do they come up? In
    what contexts? Real experiences are best.

    Thanks very much.
    Russ

    --

    --
  • Kyle Lemons at Dec 8, 2012 at 2:42 am
    The only time I've ever seen them is in the context of the default
    /etc/hosts on OS X.
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost

    I don't exactly remember how it came up (I want to say in conjunction with
    one of the many forays I've made into go ircds or something), but I've had
    a (non-Go) client connect to me with that address and tell me the IP it
    thinks I have, which I was then unable to parse. I solved it at the time
    by just manually dialing ::1 and not letting it resolve "localhost" itself,
    but it would've been nice for either net.ParseIP or net/ipv6.ParseIP to
    have handled it.

    On Thu, Dec 6, 2012 at 10:33 PM, Russ Cox wrote:

    We are trying to figure out how Go should handle zone specifiers in
    IPv6 addresses (the %foo in ffff:eeee::1234%foo).

    It is unclear to me whether these are important enough to put in the
    main net package, or if instead we should make a parallel go.net/ipv6
    package that you would be forced to use if you need them.

    What do people actually use these for? How often do they come up? In
    what contexts? Real experiences are best.

    Thanks very much.
    Russ

    --

    --
  • Kyle Lemons at Dec 8, 2012 at 2:46 am

    On Fri, Dec 7, 2012 at 9:42 PM, Kyle Lemons wrote:

    The only time I've ever seen them is in the context of the default
    /etc/hosts on OS X.
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost

    I don't exactly remember how it came up (I want to say in conjunction with
    one of the many forays I've made into go ircds or something), but I've had
    a (non-Go) client connect to me with that address and tell me the IP it
    thinks I have, which I was then unable to parse. I solved it at the time
    by just manually dialing ::1 and not letting it resolve "localhost" itself,
    but it would've been nice for either net.ParseIP or net/ipv6.ParseIP to
    have handled it.
    Hmm, that last clause is hard to parse.
    "... it would have been nice to have had library support, whether it be in
    net.ParseIP or in something like a go.net/ipv6 package."
    On Thu, Dec 6, 2012 at 10:33 PM, Russ Cox wrote:

    We are trying to figure out how Go should handle zone specifiers in
    IPv6 addresses (the %foo in ffff:eeee::1234%foo).

    It is unclear to me whether these are important enough to put in the
    main net package, or if instead we should make a parallel go.net/ipv6
    package that you would be forced to use if you need them.

    What do people actually use these for? How often do they come up? In
    what contexts? Real experiences are best.

    Thanks very much.
    Russ

    --

    --
  • Anssi Porttikivi at Dec 8, 2012 at 6:59 pm
    You need them to address any link-local addresses. There is no way to know which interface should be used for forwarding towards a link-local address, unless you either specify source address that can be used to deduce an interface/link, or you use a link specifier. Theoretically there is no issue if you only have one interface, but your typical Windows box with IPv6 has half a dozen interfaces listed...

    --
  • Mikio Hara at Jan 26, 2013 at 4:07 am

    On Fri, Dec 7, 2012 at 12:33 PM, Russ Cox wrote:

    What do people actually use these for? How often do they come up? In
    what contexts? Real experiences are best.
    It requires to make IP control plane stuff such as routing, signaling
    protocols. It might be useful not only for talking to infrastructures but
    for apps that want to make on-link p2p or sync features, for example,
    we can see Apple TimeMachine uses IPv6 link-local unicast connections
    if it's possible.

    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedDec 7, '12 at 3:33a
activeJan 26, '13 at 4:07a
posts6
users5
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase