{"id":855,"date":"2024-12-18T03:37:20","date_gmt":"2024-12-18T00:37:20","guid":{"rendered":"https:\/\/itgen.itbumper.com\/?page_id=855"},"modified":"2024-12-18T03:56:20","modified_gmt":"2024-12-18T00:56:20","slug":"0060_cisco-ipv6_transofmation","status":"publish","type":"page","link":"https:\/\/itgen.itbumper.com\/?page_id=855","title":{"rendered":"0060_Cisco: IPv6_Transofmation"},"content":{"rendered":"<p><span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"0:2\">Don<\/span>&#8216;t <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"3:10\">worry<\/span><span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"13:1\">,<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"15:3\">it<\/span> doesn&#8217;t <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"19:8\">look<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"28:7\">easy<\/span><span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"35:1\">,<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"37:2\">but<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"40:3\">it<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"44:3\">is.<\/span><\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#IPv6 ADDRESS TRANSORMATION\n#\n#IPv6 address types:\n#\t-global unicast\n#\t-unique local\n#\t-link local\n#\t-multicast\n#\t-others\n\n#IPv6\n\n#\tBinary\/Base 2\/0b\n#\t\tUses: 0 and 1\n\n#\tDecimal\/Base 10\/0d\n#\t\tUses: 0,1,2,3,4,5,6,7,8,9\n\n#\tHexadecimal\/Base 16\/0x\n#\t\tUses:  0,1,2,3,4,5,6,7,8,9, A, B, C, D, E,F\n#\t\tMeans: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n#Examples for the practice:\n\n#Example 1:\n#\t0b11011011 = 0x?\n#     ____\t\t\t&lt;---Convert each 4 bit group to decimal\n#\t\t| ____\n#\t\t|   |\n#\t\t|\t0d11\t&lt;---Convert each decimal to hexadecimal\n#\t   0d13\t |\t\t&lt;---Convert each decimal to hexadecimal\n#\t\t|\t0xb\t   \\\n#      oxd\t\t   - = oxdb\n\n#Example 2:\n#\t0b00101111 = 0x?\n#     ____\t\t\t&lt;---Split to 2 groups 4 bits each\n#\t\t| ____\n#\t\t|   |\n#\t\t|\t0d15\t&lt;---Convert each decimal to hexadecimal\n#\t   0d2\t |\t\t&lt;---Convert each decimal to hexadecimal\n#\t\t|\t0xf\t   \\\n#      ox2\t\t   - = ox2f\n\n\n#Example 3:\n#\t0b10000001 = 0x?\n#     ____\t\t\t&lt;---Convert each 4 bit group to decimal\n#\t\t| ____\n#\t\t|   |\n#\t\t|\t0d1\t&lt;---Convert each decimal to hexadecimal\n#\t   0d8\t |\t\t&lt;---Convert each decimal to hexadecimal\n#\t\t|\t0x1\t   \\\n#      ox8\t\t   - = ox81\n\n\n#Example 4:\n#\t0xec\t=ob?\n#\t  ||\t&lt;---Split\n#\t  | \\ \n#\t  |\t 12\t&lt;---Convert each value to decimal\n#\t  14  |\t&lt;---Convert each value to decimal\n#\t   |  1100 &lt;---Convert each value to binary\n#\t  1110 \t   &lt;---Convert each value to binary\n#\t0b11101100\n\n#Example 5:\n#\t0x2b\tob=?\n#\t  ||\n#\t  |\t\\\t\n#\t 0x2 0xb\n#\t  |   \\\n#\t 0d2  od11\n#\t  |     \\\n#   0b0010  0b1011\n#\tob00101011\n\n#Example 6:\n#\t0xd7\tob=?\n#\t  ||\n#\t  |\t\\\t\n#\t 0xd 0x7\n#\t  |   \\\n#\t 0d13  od7\n#\t  |     \\\n#   0b1101  0b0111\n#\tob11010111\n\n\n\n# IPv6 is 128 bits (You are become anut if you try to use binary or decimal format\/ The solition is to use hexadecimal format)\n#\t2001:0DB8:5917:EABD:6562:17EA:C92D:59DB\n#\t  1\t   2    3    4    5    6    7    8\t\t# 8 blocks, each block=16 bits\n#\n#\tMask\t\/64\n#\tFirst portion (1-4 blocks) \t= net address\n#\tSecond portion (5-8 blocks)\t= host address\n\n#RULES:\n#\t1. Leading 0`s can be removed\n#\t\t2001:0DB8:000A:001B:20A1:0020:0080:34BD\n#\t\t2001:DB8:A:1B:20A1:20:80:34BD\n\t\n#\t2. Consecutive quarters of all 0`s can be replaced with double colon (::)\n#\t\t2001:0DB8:0000:0000:0000:0000:0080:34DB\n#\t\t2001:DB8::80:34DB\n\n#\t3. Consecutive quarters of 0`s can only be abbreviated once in IPv6 address\n#\t\t2001:0000:0000:0000:20A1:0000:0000:34BD\t\t\n#\t\t2001::20A1:0:0:34BD\n\n#GLOBAL UNICAST ADDRESS\n#\tIPV6 address will recieve \/48 blocks\n#\tIPv6 subnets use a \/64 prefix length\n#That means an enterprise has 16 bits to use to make subnets\n#The remaining 64 bits can be used for hosts\n#\n#\t2001:0DB8:8B00:0001:0000:0000:0000:0001 \/64\n#\t--------------\n#\t\t  |\t\t   ---- \n#\t\t  |          |  -------------------\n#\t\t  |\t\t\t |\t\t\t|\n#\t\t  |\t\t\t |  host portion of the address (64 bits interface identifier)\n#\t\t  |\t\t\t |\n#\t\t  |\t  subnet identifier (16 bits used by the interprise to make various subnets\n#\t\t  |\n#\t48 bits global routing prefix aasignet by the ISP\n\n\n#How to find the IPv6 prefix?\n#Example 1:\n#\t\t2001:0DB8:8B00:0001:0000:0000:0000:0001 \/56\n#\t\t 16   32   48  4400\t&lt;--each block has 16 bits, to get 56bits=48bits+4bits+4bits\n#\t\t2001:0DB8:8B00:00|01:0000:0000:0000:0001 \/56\t# after | (56 bits, all bits become 0)\n#\t\t2001:0DB8:8B00:0000::\/56\n\n#Example 2: When the network prefix is odd\n#\t\t2001:0DB8:8B00:0001:FB89:017B:0020:0011 \/93\n#\t\t 16\t  32   48   64   80 |STOP HERE AND SPLIT 017B\n#\n#\t\t017B\n#\t\t||||\n#\t\t444 -B CONVERT TO DECIMAL, 0xB=0d11, THEN CONVERT TO BINARY, 0d11=0b1011. \n# \t\t\t TO GET 93, WE NEED ONLY 1 BIT, CHANGE 0b1011 --&gt; 0b1000\n#\t\t\t CONVERT TO DECIMAL ob1000=0d8\n#\t\t\t CONVERT TO HEXADECIMAL\t0d8=0x8\n#\t\t2001:DB8:8B00:1:FB89:178:: \/93\n\n\n\n\n#Modified EUI-64\n#EUI-64 is a method of converting a MAC address (48 bits) in to 64 bits interface identifier\n#The interface identifier can then become the &quot;host portion&quot; of a \/64 IPv6 address\n\n#HOW TO CONVERT THE MAC ADDRESS\n#\t1. Devide the MAC address in half\n#\t\t1234567890AB --&gt; 123456 | 7890AB\n#\t2. Insert FFE in the middle\n#\t\t123456FFFE7890AB\n#\t3. Invert the 7-th bit  (if 0, make 1; if 1 make 0)\n#\t\t1234 56FF FE78 90AB\n#\t\t||\n#\t\t44 &lt;--break the second 4. in binary 2 is 0010. \n#\t\t\t\t\t\t\t\t\t\t\t\t ||||\n#\t\t\t\t\t\t\t\t\t\t\t\t 5678\t&lt;-The 7-th bit is 1, make it 0, and the result is 0000\n#\t\t1034 56FF FE78 90AB\n\n#Example 1\n#\t\t782B CBAC 0867\n#\t\t782BCB AC0867\t\t-SPLIT IN HALF\n#\t\t782BCBFF FEAC0867\t-ADD FFFE IN THE MIDDLE\n#\t\t |\n#\t\t1000\t\t\t\t-CONVERT 8 TO BINARY\n#\t\t||||\n#\t\t5678\t\t\t\t-THE 7-th BIT IS 0, CONVERT IT TO 1, AND IT WILL BECOME TO 1010\n#\t\t\t\t\t\t\t-1010 - CONVERT TO DECIMAL = 10, CONVERT IT TO HEXADECIMAL = A\n#\t\t7A2BCFF FEAC0867\n\n#Example 2\n#\t\t00FF 6BA6 F456\n#\t\t00FF6B A6F456\t\t-SPLIT IN HALF\n#\t\t00FF6BFF FEA6F456\t-ADD FFFE IN THE MIDDLE\n#\t\t |\n#\t\t0000\t\t\t\t-CONVERT 8 TO BINARY\n#\t\t||||\n#\t\t5678\t\t\t\t-THE 7-th BIT IS 0, CONVERT IT TO 1, AND IT WILL BECOME TO 0010\n#\t\t\t\t\t\t\t-0010 - CONVERT TO DECIMAL = 2, CONVERT IT TO HEXADECIMAL = 2\n#\t\t02FF6BFF FEA6F456\n\n\n#WHY INVERT THE 7-th BIT?\n#\tUAA - assigned by the manufacterer\n#\tLAA\t- aasigned localy by an admin\n#\n#\tU\/L bit - Universal \/ Local bit\n#\tU\/L set to 0 = UAA\n#\tU\/L set to 1 = LAA\n#\n#\tMore information eui-64.packetlife.net\t#\n\n \n\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Don&#8216;t worry, it doesn&#8217;t look easy, but it is.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/855"}],"collection":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=855"}],"version-history":[{"count":3,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/855\/revisions"}],"predecessor-version":[{"id":862,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/855\/revisions\/862"}],"wp:attachment":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}