Options

Stumped by IPv6 question

egrizzlyegrizzly Member Posts: 533 ■■■■■□□□□□
The question asked to convert ::ffff:AC11:AC11 to IPv4. Of course it's almost a total hex conversion matter.

but I converted AC11 to

1010 1100 0001 0001

which in decimal means 10 12 1 1

It turns out this was not the answer. The answer was ::ffff:172.17.172.17. How in the name of Jazmine did they pull
that out of ::ffff:AC11:AC11? Anyway, if you've mastered hex conversion/IPv6 please feel free to join this party. Thanks
B.Sc (Info. Systems), CISSP, CCNA, CCNP, Security+

Comments

  • Options
    sadfjlfdo24sadfjlfdo24 Banned Posts: 59 ■■□□□□□□□□
    ::ffff:AC11:AC11

    A=10, B=11, C=12, D=13, E=14, F=15

    ::ffff: 10*16^3+12*16^2+1*16^1+1*16^0 : 10*16^3+12*16^2+1*16^1+1*16^0 = ::ffff: and decimal part is 44049:44049

    AC11 = 44049 in decimal = 1010110000010001 in binary

    ::ffff:1010110000010001:1010110000010001 break the last part into ipv4 chunks -> ::ffff:1010 1100 : 0001 0001 : 1010 1100 : 0001 0001
    -> ::ffff:10101100:00010001:10101100:00010001

    00010001 in binary = 1*2^4+0*2^3+0*2^2+0*2^1+1*2^0=17 in decimal
    10101100 in binary = 1*2^7+0*2^6+1*2^5+0*2^4+1*2^3+1*2^2+0*2^1+0*2^0=172 in decimal

    So you get :ffff:172.17.172.17
  • Options
    TrifidwTrifidw Member Posts: 281
    The v4 addresses are groups of 2 v6 numbers, FF being decimal 255. If using your way, there would be no way to produce a number above 15.15.15.15.

    Remember
    dec bin hex

    0 = 0000 = 0
    1 = 0001 = 1
    2 = 0010 = 2
    3 = 0011 = 3
    4 = 0100 = 4
    5 = 0101 = 5
    6 = 0110 = 6
    7 = 0111 = 7
    8 = 1000 = 8
    9 = 1001 = 9
    10 = 1010 = A
    11 = 1011 = B
    12 = 1100 = C
    13 = 1101 = D
    14 = 1110 = E
    15 = 1111 = F
    16 = 1 0000 = 10
  • Options
    egrizzlyegrizzly Member Posts: 533 ■■■■■□□□□□
    Well, may there be more Tri in your Fi. thanks, ur a true friend.
    ::ffff:AC11:AC11

    A=10, B=11, C=12, D=13, E=14, F=15

    ::ffff: 10*16^3+12*16^2+1*16^1+1*16^0 : 10*16^3+12*16^2+1*16^1+1*16^0 = ::ffff: and decimal part is 44049:44049

    AC11 = 44049 in decimal = 1010110000010001 in binary

    ::ffff:1010110000010001:1010110000010001 break the last part into ipv4 chunks -> ::ffff:1010 1100 : 0001 0001 : 1010 1100 : 0001 0001
    -> ::ffff:10101100:00010001:10101100:00010001

    00010001 in binary = 1*2^4+0*2^3+0*2^2+0*2^1+1*2^0=17 in decimal
    10101100 in binary = 1*2^7+0*2^6+1*2^5+0*2^4+1*2^3+1*2^2+0*2^1+0*2^0=172 in decimal

    So you get :ffff:172.17.172.17
    B.Sc (Info. Systems), CISSP, CCNA, CCNP, Security+
  • Options
    sadfjlfdo24sadfjlfdo24 Banned Posts: 59 ■■□□□□□□□□
    Just so you know, Tri's method is better because on the exam there is no way you should be doing hex to dec to bin conversion. I simply explained the math to you. Use that table:

    dec bin hex
    0 = 0000 = 0
    1 = 0001 = 1
    2 = 0010 = 2
    3 = 0011 = 3
    4 = 0100 = 4
    5 = 0101 = 5
    6 = 0110 = 6
    7 = 0111 = 7
    8 = 1000 = 8
    9 = 1001 = 9
    10 = 1010 = A
    11 = 1011 = B
    12 = 1100 = C
    13 = 1101 = D
    14 = 1110 = E
    15 = 1111 = F
    16 = 1 0000 = 10


    1=0001
    1=0001
    C=1100
    A=1010


    A C 1 1
    1010 1100 0001 0001
    ->1010 1100 0001 0001:1010 1100 0001 0001 -> 1010 1100:0001 0001:1010 1100:0001 0001 ->
    172.17.172.17
  • Options
    theodoxatheodoxa Member Posts: 1,340 ■■■■□□□□□□
    AC11:AC11

    Apparently, they are taking each byte (2 Hex Characters) and converting it to decimal:

    A = 10
    C = 12

    AC = (10 * 16) + 12 = 172
    11 = (1 * 16) + 1 = 17

    172.17.172.17
    R&S: CCENT CCNA CCNP CCIE [ ]
    Security: CCNA [ ]
    Virtualization: VCA-DCV [ ]
  • Options
    phonicphonic Member Posts: 82 ■■□□□□□□□□
    While you should certainly know the rules for conversion, when answering test questions it's always good to look for an easy shortcut to get the correct answer or at least to eliminate some obviously incorrect ones. What I mean by this is that you should be able to answer that question correctly by only converting one byte of the IPv6 address - specifically the easiest one.

    Trying to do the math for AC is going to be harder, more time consuming and more prone to error for most people (case in point). However, you should be able to almost instantly know that 11 in hex = 17 in decimal (16*1+1). That is going to be the value for the second and fourth octet (ie: ?.17.?.17). And since 172.17.172.17 is the only choice where those values are present, you know that has to be the correct answer.

    Whenever I've had to do difficult tests, I've always looked for simple ways to answer the question correctly without having to necessarily come up with the full answer. This way I could spend the extra time on the more tricky questions. Just make sure you are doing the simple part correctly :D.
  • Options
    theodoxatheodoxa Member Posts: 1,340 ■■■■□□□□□□
    phonic wrote: »
    While you should certainly know the rules for conversion, when answering test questions it's always good to look for an easy shortcut to get the correct answer or at least to eliminate some obviously incorrect ones. What I mean by this is that you should be able to answer that question correctly by only converting one byte of the IPv6 address - specifically the easiest one.

    Trying to do the math for AC is going to be harder, more time consuming and more prone to error for most people (case in point). However, you should be able to almost instantly know that 11 in hex = 17 in decimal (16*1+1). That is going to be the value for the second and fourth octet (ie: ?.17.?.17). And since 172.17.172.17 is the only choice where those values are present, you know that has to be the correct answer.

    Whenever I've had to do difficult tests, I've always looked for simple ways to answer the question correctly without having to necessarily come up with the full answer. This way I could spend the extra time on the more tricky questions. Just make sure you are doing the simple part correctly :D.

    Speaking of that...you can quickly eliminate the 2 that start with 10 (0A) and 1 that starts with 44 (2C) since they are way too small. That leaves 3 possible correct answers:

    161 (A1)
    172 (AC)
    193 (C1)
    R&S: CCENT CCNA CCNP CCIE [ ]
    Security: CCNA [ ]
    Virtualization: VCA-DCV [ ]
  • Options
    phonicphonic Member Posts: 82 ■■□□□□□□□□
    Yes, exactly.

    Furthermore, it's simple elimination(s) like this that can often either give you an answer or at least bring the possible choices down to a more easily guessed two in the event that you have absolutely no idea how to get the correct answer yourself.
  • Options
    egrizzlyegrizzly Member Posts: 533 ■■■■■□□□□□
    11 in hex = 17 in decimal (16*1+1). Where did you get the 16. I've grasped the solution provided by Trifi but show me your angle though.
    phonic wrote: »
    While you should certainly know the rules for conversion, when answering test questions it's always good to look for an easy shortcut to get the correct answer or at least to eliminate some obviously incorrect ones. What I mean by this is that you should be able to answer that question correctly by only converting one byte of the IPv6 address - specifically the easiest one.

    Trying to do the math for AC is going to be harder, more time consuming and more prone to error for most people (case in point). However, you should be able to almost instantly know that 11 in hex = 17 in decimal (16*1+1). That is going to be the value for the second and fourth octet (ie: ?.17.?.17). And since 172.17.172.17 is the only choice where those values are present, you know that has to be the correct answer.

    Whenever I've had to do difficult tests, I've always looked for simple ways to answer the question correctly without having to necessarily come up with the full answer. This way I could spend the extra time on the more tricky questions. Just make sure you are doing the simple part correctly :D.
    B.Sc (Info. Systems), CISSP, CCNA, CCNP, Security+
  • Options
    sadfjlfdo24sadfjlfdo24 Banned Posts: 59 ■■□□□□□□□□
    The 16 comes from 1*16^1+1*16^0 = 16*1+1=17

    A hex is simply 16^n,16^(n-1),..,16^2,16^1,16^0
  • Options
    phonicphonic Member Posts: 82 ■■□□□□□□□□
    egrizzly wrote: »
    11 in hex = 17 in decimal (16*1+1). Where did you get the 16. I've grasped the solution provided by Trifi but show me your angle though.

    That comes from understanding how hex works and thinking in a base-16 way. Both of which are imperative to be able to do IPv6.

    Here's a simple way to try and understand how it works:

    First, think about how decimal (base-10) numbers work. These are what you deal with on a day-to-day basis. You have 0,1,2,3,4,5,6,7,8 and 9. You could also think about it like 01, 02, 03 and so on. The right-most digit represents the value of 0-9 (which is 10 different values). And once you reach 09, the next increment is going to be 10. The process repeats and you then go from 19 to 20. So the right-most digit shows you the values of 0-9 (ie: 0-9 * 1) while the 'tens place' digit will show you the number of tens (0-9 * 10). The same logic applies to the hundreds, thousands, etc. I know that this sounds very simple, and it is, but remember that we think in base-10 all the time, so the process behind how this works is something that we don't even bother to think about - it just comes naturally. When you see the number 74, you don't think "7*10 + 4*1", you just think 74.

    Now look at base-16. The same logic applies, but instead of 10 possible values per place (0-9), you have 16 (0-F). So the first right-most digit is going to be valued between 0-15, which is represented by 0-F. So the order of digits is 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. And just like going from 09->10, you would go from 0F->10. But remember, that unlike 10 in decimal equaling 1*10, in base-16 that is 1*16. That is why 11 in hex is equal to 17.

    It gets a bit more complicated with larger numbers. Just as the 'tens' digit is now valued at 16, the 'hundreds' digit would be valued at 256, because that is 16*16. In decimal, it's 10*10=100.

    Again, the biggest difficulty is that this is a completely different way of thinking and goes against what we've been doing all our life. Especially when the numbers look identical. I imagine it's similar to English speakers trying to learn Russian and needing to overcome the differences in the alphabets and how some letters are pronounced differently.

    Make sense?
  • Options
    CCNA_RicCCNA_Ric Member Posts: 9 ■□□□□□□□□□
    First convert to binary, then convert the binary into decimal, no calculator required (or unnecessary multiplication which will just waste time on an exam), I think you almost had the correct process, except when converting to decimal you use 8 bits to get your decimal number, for example:

    AC11:AC11 in binary is

    10101100 00010001: 10101100 00010001 converted to decimal is:

    10101100 = 128 + 32 + 8 + 4 = 172
    00010001 = 16 + 1 = 17
    10101100 = 128 + 32 + 8 + 4 = 172
    00010001 = 16 + 1 = 17

    therefore AC11:AC11 in decimal is 172.17.172.17


    Watch this video:

    Hexadecimal to Decimal - EASY! - YouTube

    I believe this is the absolute easiest method available, all calculations can be done in your head.
Sign In or Register to comment.