[Cerowrt-devel] ipv6 confusion with source specific gateways.

Chuck Anderson cra at WPI.EDU
Wed Nov 26 22:21:14 EST 2014


On Tue, Nov 25, 2014 at 11:11:17PM -0800, Dave Taht wrote:
> Some days I just lose it with prefix math. Or maybe we have a bug.

Prefix math, there is no bug.

> So here is a default gateway. So far as I know it is getting a /56
> actually, not a /60, but it is requesting a /60 and thus distributing
> a source specific route to that /60.

Looks like a /60.

> default from :: via fe80::201:5cff:ee62:b646 dev ge00  proto static  metric 1024
> # should I even have a default route at all?
> default from 2001:558:6045:e9:44a9:4a25:ece9:55c3 via
> fe80::201:5cff:ee62:b646 dev ge00  proto static  metric 1024
> # my uplink, looks sane
> 
> default from 2601:c:ce00:9d0::/60 via fe80::201:5cff:ee62:b646 dev
> ge00  proto static  metric 1024
> # and see that /60...
> 
> # and then there is the default ipv6 address assignements on cero.
> 
> 2601:c:ce00:9d1::/64 dev gw10  proto kernel  metric 256  expires 326362sec
> 
> Now, where my brain crashes: shouldn't 2601:c:ce00:9d1::/64 actually
> be something like
> 
> 2601:c:ce00:9d01::/64 not, 2601:c:ce00:9d1::/64?

No, it is correct.  The /60 is:

2601:c:ce00:9d0::/60

which is really this when expanded out (zero-pad each : section):

2601:000c:ce00:09d0::/60


Now the 60 bit prefix is:

2601:000c:ce00:09dX:XXXX:XXXX:XXXX:XXXX

where X is the part which can be assigned to your LANs.  The first X
is a 4-bit nibble that was assigned "1" by Cero creating a /64 subnet
prefix, leaving the remaining 64 bits for your Interface IDs...



More information about the Cerowrt-devel mailing list