tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: IPv6 socket behaviour different to IPv4?



On 04/06/2014 12:30, Darren Reed wrote:
But when I configure "fd00::1" or "1::1" as an IPv6 address, I would
expect that the system should be able to recognise that there is no
desire on my part to change the address should a conflict arise but
I can't see any way for the kernel to divine that when it is just given
an IP address.

Why do you have this desire?
If any address is on-link, DAD needs to be performed.

Put yourself in an IPv6 only world...

Not relevant to the discussion, the same logic also applies to IPv4 although this requires a good userland daemon like say dhcpcd.

In an IPv4 world, if I put "10.1.1.1 netbsd" in my hosts file and
manually assign 10.1.1.1 to any network interface, then I will
always be able to connect to 10.1.1.1 and thus "netbsd".

I said a good userland daemon, not manual assignment :)


In your /etc/hosts file, you have an entry in it for an IPv6 address
to be assigned to your hostname and no other line with your hostname.

As soon as you disconnect from the network, you can no longer do
"ssh hostname".

And this is a problem how exactly? `ssh localhost` still works.
Sounds more like a local name resolution issue than an address availability one.

Rinse and repeat by replacing "hostname" with a static IP address that
you have assigned to a network interface.

I'm still not entirely sure what your use case is or why you believe it's important to talk to an address on a non functioning interface (ie, it's down or no carrier) If you want the same behavioral traits as IPv4 then at a guess you would need to make IN6_IFF_NODAD assignable from userland (currently it's rejected).
I'm not entirely sure that's a good idea though.

Roy


Home | Main Index | Thread Index | Old Index