Operations with IPv6 addresses - a short excursion

Introduction

This article is a translation of a specific section describing basic operations on IPv6 addresses from the CCNA 200-301 Volume 1 tutorial by Wendell Odom.





Shortening IPv6 addresses

Basic rules:





  • Two colons in a row are 2 or more address hextets followed by zeros.





  • Their "::" can be used only once for the entire IPv6 address.



    You can do this 3124::DEAD:CAFE:0:0:0



    or that 3124:0:0:DEAD:CAFE::



    , but you cannot do this 3124 :: DEAD: CAFE ::





    For example: 210F :: CCCC: 0: 0: D - we count, we have 210F - the first hextet, then a double colon, then CCCC: 0: 0: D - this is another 4 hextets, for a total of 5 hextets. So in total there are 8 hextets in the IPv6 address, then 8-5 = 3 missing hextets, fill them in with zeros and get 210F: 0000: 0000: 0000: CCCC: 0000: 0000: 000D





  • If there are zeros in front of letters (hex) or numbers, in addition to zero in the hextet, then they can be truncated.





  • If zeros come after letters (hex) or numbers, we leave them, otherwise, after the reverse process, we will get a different address.

    For example: ABCD:0020



    - in abbreviated form looks like ABCD:20



    , and ABCD:2000



    - is not abbreviated .





Let's look at a few examples:





Given





Reduced





2340: 0000: 0010: 0100: 1000: ABCD: 0101: 1010





2340: 0: 10: 100: 1000: ABCD: 101: 1010





30A0: ABCD: EF12: 3456: 0ABC: B0B0: 9999: 9009





30A0: ABCD: EF12: 3456: ABC: B0B0: 9999: 9009





2222:3333:4444:5555:0000:0000:6060:0707





2222:3333:4444:5555:0:0:6060:707





3210:0000:0000:0000:0000:0000:0000:0000





3210::





210F:0000:0000:0000:CCCC:0000:0000:000D





210F::CCCC:0:0:D





34BA:000B:000B:0000:0000:0000:0000:0020





34BA:B:B::20





FE80:0000:0000:0000:DEAD:BEFF:FEEF:CAFE





FE80::DEAD:BEFF:FEED:CAFE





FE80:0000:0000:0000:FACE:BAFF:FEBE:CAFE





FE80::FACE:BAFF:FEBE:CAFE





IPv6-

, : 2000:1234:5678:9ABC:1234:5678:9ABC:1111/64. IPv6 =128, 64 - - 4 8, , 2000:1234:5678:9ABC - , 1234:5678:9ABC:1111 - .





: 2000:1234:5678:9ABC:0000:0000:0000:0000/64, : 2000:1234:5678:9ABC::/64





:

















2340:0:10:100:1000:ABCD:101:1010/64





2340:0:10:100:0000:0000:0000:0000/64





2340:0:10:100::/64





30A0:ABCD:EF12:3456:ABC:B0B0:9999:9009/64





30A0:ABCD:EF12:3456:0000:0000:0000:0000/64





30A0:ABCD:EF12:3456::/64





2222:3333:4444:5555::6060:707/64





2222:3333:4444:5555:0000:0000:0000:0000/64





2222:3333:4444:5555::/64





3210::ABCD:101:1010/64





3210:0000:0000:0000:0000/64





3210:0:0:0:0/64





:





: 2000:1234:5678:9ABC:1234:5678:9ABC:1111/56

16 , 8 128 , 16*8 = 128, = 8 .

, 3 4-, 3*16+8=56 .





: 2000:1234:5678:9A00:0000:0000:0000:0000/56

: 2000:1234:5678:9A00::/56





, , , =56 , 9A 2 , . : 9A00, , 009, .





:













34BA:B:B:0:5555:0:6060:707/80





34BA:B:B:0:5555::/80





3124::DEAD:CAFE:FF:FE00:1/80





3124:0:0:DEAD:CAFE::/80





2BCD::FACE:BEFF:FEBE:CAFE/48





2BCD:0000:0000::/48





3FED:F:E0:D00:FACE:BAFF:FE00:0/48





3FED:F:E0::/48





210F:A:B:C:CCCC:B0B0:9999:9009/40





210F:A:0::/40





34BA:B:B:0:5555:0:6060:707/36





34BA:B:0::/36





3124::DEAD:CAFE:FF:FE00:1/60





3124:0:0:DEA0::/60





2BCD::FACE:1:BEFF:FEBE:CAFE/56





2BCD:0000:0000:FA00::/56





IPv6- MAC-

: 2001:DB8:1:1::/64

MAC: B8:0C:BE:EF:CA:FE, 3 : B80C.BEEF.CAFE





MAC-

: FFFE, : B80C:BEFF:FEEF:CAFE





, 2 - B8, , (HEX) .





B8 , : 1011 1000, . 7- (1 0 0 1) : 1011 1010, HEX-, BA (B=1011, A=1010). - B8 BA : BA0C:BEFF:FEEF:CAFE, : 2001:DB8:1:1:BA0C:BEFF:FEEF:CAFE





:









MAC-













2001:DB8:1:1::/64





0013.ABAB.1001





2001:DB8:1:1:0213:ABFF:FEAB:1001





 





2001:DB8:1:1::/64





AA13.ABAB.1001





2001:DB8:1:1:A813:ABFF:FEAB:1001





AA=1010 1010=1010 1000, 1010=A, 1000=8





2001:DB8:1:1::/64





000.BEEF.CAFE





2001:DB8:1:1:020C:BEFF:FEEF:CAFE





 





2001:DB8:1:1::/64





B80C.BEEF.CAFE





2001: DB8: 1: 1: BA0C: BEFF: FEEF: CAFE





B8 = 1011 1000 = 1011 1010, BA





2001: DB8: FE: FE :: / 64





0C0C.ABAC.CABA





2001: DB8: FE: FE: 0E0C: ABFF: FEAC: CABA





0C = 0000 1100 = 0000 1110.0E





2001: DB8: FE: FE :: / 64





0A0C.ABAC.CABA





2001: DB8: FE: FE: 080C: ABFF: FEAC: CABA





0A = 0000 1010 = 0000 1000.08








All Articles