Re: 5.6, IPv6: is autoconf set by default?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: 5.6, IPv6: is autoconf set by default?

Stuart Henderson
[moved from misc@]

On 2015-01-08, Josh Grosse <[hidden email]> wrote:

> On Thu, Jan 08, 2015 at 03:20:46PM +0000, Florian Obser wrote:
>
>> [...]
>>
>>      eui64   Fill the interface index (the lowermost 64th bit of an IPv6
>>              address) automatically.
>
> But as I understand this, EUI64 isn't about a singular bit.  It's the
> conversion of the 48 bit MAC address into a 64-bit value.
>
> Perhaps the grammer could change for clarity?  I was confused until
> I tested the option.
>
> Index: ifconfig.8
>===================================================================
> RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> retrieving revision 1.249
> diff -u -p -u -p -r1.249 ifconfig.8
> --- ifconfig.8 3 Dec 2014 21:30:30 -0000 1.249
> +++ ifconfig.8 8 Jan 2015 21:23:04 -0000
> @@ -1156,7 +1156,7 @@ Currently configured addresses will not
>  invalid.
>  .It Cm eui64
>  Fill the interface index
> -.Pq the lowermost 64th bit of an IPv6 address
> +.Pq the lowermost 64 bits of an IPv6 address
>  automatically.

I think that's wrong, this isn't the interface index at all.
This seems to make more sense to me - any comments?


Index: ifconfig.8
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.249
diff -u -p -r1.249 ifconfig.8
--- ifconfig.8 3 Dec 2014 21:30:30 -0000 1.249
+++ ifconfig.8 10 Jan 2015 14:05:07 -0000
@@ -1155,9 +1155,8 @@ Disable IPv6 autoconf privacy extensions
 Currently configured addresses will not be removed until they become
 invalid.
 .It Cm eui64
-Fill the interface index
-.Pq the lowermost 64th bit of an IPv6 address
-automatically.
+Set the lowermost 64 bits of an IPv6 address automatically based on
+the interface identifier.
 .It Cm pltime Ar n
 Set preferred lifetime for the address.
 .It Cm tentative


Reply | Threaded
Open this post in threaded view
|

Re: 5.6, IPv6: is autoconf set by default?

Florian Obser-2
On Sat, Jan 10, 2015 at 02:07:49PM +0000, Stuart Henderson wrote:

> [moved from misc@]
>
> On 2015-01-08, Josh Grosse <[hidden email]> wrote:
> > On Thu, Jan 08, 2015 at 03:20:46PM +0000, Florian Obser wrote:
> >
> >> [...]
> >>
> >>      eui64   Fill the interface index (the lowermost 64th bit of an IPv6
> >>              address) automatically.
> >
> > But as I understand this, EUI64 isn't about a singular bit.  It's the
> > conversion of the 48 bit MAC address into a 64-bit value.
> >
> > Perhaps the grammer could change for clarity?  I was confused until
> > I tested the option.
> >
> > Index: ifconfig.8
> >===================================================================
> > RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> > retrieving revision 1.249
> > diff -u -p -u -p -r1.249 ifconfig.8
> > --- ifconfig.8 3 Dec 2014 21:30:30 -0000 1.249
> > +++ ifconfig.8 8 Jan 2015 21:23:04 -0000
> > @@ -1156,7 +1156,7 @@ Currently configured addresses will not
> >  invalid.
> >  .It Cm eui64
> >  Fill the interface index
> > -.Pq the lowermost 64th bit of an IPv6 address
> > +.Pq the lowermost 64 bits of an IPv6 address
> >  automatically.
>
> I think that's wrong, this isn't the interface index at all.
> This seems to make more sense to me - any comments?

I don't think this is entirely correct. eui64 enables IPv6 on an interface
by setting a link local address. For lo0 it also sets ::1.
I'm unsure what eui64 was supposed to do
when IPv6 was on by default and there was no way to disable it.

btw. I'm still trying to figure out what setia6eui64() in ifconfig.c
is trying to achieve, the code after addaf() looks peculiar. If it's
just error checking it looks complicated.

>
>
> Index: ifconfig.8
> ===================================================================
> RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> retrieving revision 1.249
> diff -u -p -r1.249 ifconfig.8
> --- ifconfig.8 3 Dec 2014 21:30:30 -0000 1.249
> +++ ifconfig.8 10 Jan 2015 14:05:07 -0000
> @@ -1155,9 +1155,8 @@ Disable IPv6 autoconf privacy extensions
>  Currently configured addresses will not be removed until they become
>  invalid.
>  .It Cm eui64
> -Fill the interface index
> -.Pq the lowermost 64th bit of an IPv6 address
> -automatically.
> +Set the lowermost 64 bits of an IPv6 address automatically based on
> +the interface identifier.
>  .It Cm pltime Ar n
>  Set preferred lifetime for the address.
>  .It Cm tentative
>
>

--
I'm not entirely sure you are real.

Reply | Threaded
Open this post in threaded view
|

Re: 5.6, IPv6: is autoconf set by default?

Martin Pieuchot-2
On 10/01/15(Sat) 14:54, Florian Obser wrote:

> On Sat, Jan 10, 2015 at 02:07:49PM +0000, Stuart Henderson wrote:
> > [moved from misc@]
> >
> > On 2015-01-08, Josh Grosse <[hidden email]> wrote:
> > > On Thu, Jan 08, 2015 at 03:20:46PM +0000, Florian Obser wrote:
> > >
> > >> [...]
> > >>
> > >>      eui64   Fill the interface index (the lowermost 64th bit of an IPv6
> > >>              address) automatically.
> > >
> > > But as I understand this, EUI64 isn't about a singular bit.  It's the
> > > conversion of the 48 bit MAC address into a 64-bit value.
> > >
> > > Perhaps the grammer could change for clarity?  I was confused until
> > > I tested the option.
> > >
> > > Index: ifconfig.8
> > >===================================================================
> > > RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> > > retrieving revision 1.249
> > > diff -u -p -u -p -r1.249 ifconfig.8
> > > --- ifconfig.8 3 Dec 2014 21:30:30 -0000 1.249
> > > +++ ifconfig.8 8 Jan 2015 21:23:04 -0000
> > > @@ -1156,7 +1156,7 @@ Currently configured addresses will not
> > >  invalid.
> > >  .It Cm eui64
> > >  Fill the interface index
> > > -.Pq the lowermost 64th bit of an IPv6 address
> > > +.Pq the lowermost 64 bits of an IPv6 address
> > >  automatically.
> >
> > I think that's wrong, this isn't the interface index at all.
> > This seems to make more sense to me - any comments?
>
> I don't think this is entirely correct. eui64 enables IPv6 on an interface
> by setting a link local address. For lo0 it also sets ::1.

I'm not sure if we should define how the link local address is
generated.

As for lo0, this is not strictly related to eui64.  It is just that the
kernel automagically set "::1" on it.  Right now it is done the first
time the loopback interface is brought up, but it does not mean it
should/will stay like that.

Reply | Threaded
Open this post in threaded view
|

Re: 5.6, IPv6: is autoconf set by default?

Stuart Henderson
In reply to this post by Florian Obser-2
On 2015/01/10 14:54, Florian Obser wrote:
> I don't think this is entirely correct. eui64 enables IPv6 on an interface
> by setting a link local address. For lo0 it also sets ::1.
> I'm unsure what eui64 was supposed to do
> when IPv6 was on by default and there was no way to disable it.

Historically eui64 was used like this:

ifconfig vlan4 inet6 2001:db8:: eui64

and it would fill in the bottom 64 bits for you, i.e.

2001:db8::f2de:f1ff:fea3:bc17/64

That is still the "normal" use for eui64, prior to it now doing
double-duty as "re-enable ipv6 on this interface and set things up
as they used to be".

> btw. I'm still trying to figure out what setia6eui64() in ifconfig.c
> is trying to achieve, the code after addaf() looks peculiar. If it's
> just error checking it looks complicated.

Related to the above. And oh, that uses the "interface index"
terminology in a printf...

Reply | Threaded
Open this post in threaded view
|

Re: 5.6, IPv6: is autoconf set by default?

Josh Grosse
On Sat, Jan 10, 2015 at 06:09:21PM +0000, Stuart Henderson wrote:

> On 2015/01/10 14:54, Florian Obser wrote:
> > I don't think this is entirely correct. eui64 enables IPv6 on an interface
> > by setting a link local address. For lo0 it also sets ::1.
> > I'm unsure what eui64 was supposed to do
> > when IPv6 was on by default and there was no way to disable it.
>
> Historically eui64 was used like this:
>
> ifconfig vlan4 inet6 2001:db8:: eui64
>
> and it would fill in the bottom 64 bits for you, i.e.
>
> 2001:db8::f2de:f1ff:fea3:bc17/64
>

And this was the use-case I tried to describe (insufficiently)
in my ifconfig.8 patch.  

> That is still the "normal" use for eui64, prior to it now doing
> double-duty as "re-enable ipv6 on this interface and set things up
> as they used to be".
>
> > btw. I'm still trying to figure out what setia6eui64() in ifconfig.c
> > is trying to achieve, the code after addaf() looks peculiar. If it's
> > just error checking it looks complicated.
>
> Related to the above. And oh, that uses the "interface index"
> terminology in a printf...
>