Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPv6 zero compression

When using zero-compression on the following IPv6 address

2001:0DB8:0000:CD30:0000:0000:0000:0000/60

Why is this not correct:

2001:DB8::CD30::/60

... while this is:

2001:DB8:0:CD30::/60
like image 903
seberik Avatar asked Apr 10 '26 09:04

seberik


1 Answers

Zero compression can only be made once. The reason for this is, that the IPv6 address is not unique any more otherwise.

Take your example 2001:DB8::CD30::/60 will it expand to

2001:0DB8:0000:0000:0000:CD30:0000:0000/60

or

2001:0DB8:0000:0000:CD30:0000:0000:0000/60

or

2001:0DB8:0000:CD30:0000:0000:0000:0000/60

...?

If only one "::" is used, the result will always be unique as there is only one possible fixed number of zeros to be inserted.

like image 161
MrTux Avatar answered Apr 12 '26 01:04

MrTux



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!