IPv6 EUI 64 bit-flip chart

TWXTWX Posts: 259Member
Figured I'd share, since I did not see it in the Odom ICND1 100-101 book...

the bit-flip is annoying in EUI 64 IPv6 address generation. It doesn't require bitwise math though, if one can remember that it's the second-most-significant hexadecimal digit in the most-significant host hex-quartet, and one number can only become another number, and they're paired. It can be charted as follows:
 0 <=> 2
 1 <=> 3
 4 <=> 6
 5 <=> 7
 8 <=> A
 9 <=> B
 C <=> E
 D <=> F

Literally, that's it. If the MAC address is AAAA.1111.1111, the 64 bit host would be A8AA:11FF:FE11:1111. If the MAC address is 0712:3456:789A the host would be 0512:34FF:FE56:789A.

Say it to yourself... zero-two. one-three. four-six. five-seven. eight-Aaaa. nine-Bee. Cee-Eee. Dee-Eff.

Then practice writing it out a dozen times. Don't even need dashes or arrows.
0 2
1 3
4 6
5 7
8 A
9 B
C E
D F

Comments

  • EdTheLadEdTheLad Posts: 2,112Member
    Crazy concept, flip the 2nd least significant bit in the most significant byte, with means +2 or -2 to the low nibble.
    Don't bother passing your CCNA unless you can understand binary and hex.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • volfkhatvolfkhat Posts: 944Member ■■■■■■■□□□
    TWX wrote: »
    Say it to yourself... zero-two. one-three. four-six. five-seven. eight-Aaaa. nine-Bee. Cee-Eee. Dee-Eff.

    Is this legit??
    lol

    Wow.. this is pretty cool;
    you literally Cut Straight Through the complexity/mystery of "the bit-flip".

    I'm gonna call this the 'TWX Table' :]

    If i may add on:
    I find it easier to WRITE out your table "in Squares of 4"... instead of the way you do it.

    So... first:
    0

    Then,
    0
    1

    then,
    0 2
    1

    Then,
    0 2
    1 3

    (forms your 1st Square)

    then,
    4

    then,
    4
    5

    then,
    4 6
    5

    then,
    4 6
    5 7

    (forms your 2nd Square)
    ...

    And so forth.

    See what i mean? the table builds itself quite easily.
    Excellent Effort, my friend!
  • volfkhatvolfkhat Posts: 944Member ■■■■■■■□□□
    Or,
    if i just copy/paste from your original post...
    here are the 4 Squares:
    [B]0 2
    1 3
    [SIZE=1]---[/SIZE]
    [/B][SIZE=5][SIZE=4]4 6
    5 7[/SIZE]
    [/SIZE][B][SIZE=1]---[/SIZE]
    8 A
    9 B
    [SIZE=1]---[/SIZE]
    [/B][SIZE=4]C E
    D F[/SIZE]
    
  • james43026james43026 Posts: 303Member
    Honestly the easiest way to look at EUI-64 bit flipping, is that it is always the 7th bit starting from LSB, it is simply inverted, with a zero representing a Universally unique MAC address, such as one assigned to a manufacturer from IANA, and a 1 representing that it is a locally unique MAC address.
  • EdTheLadEdTheLad Posts: 2,112Member
    Byte significance follows bit significance, leftmost is MSB. So it's the 2nd bit of the MSB.
    Ethernet frames are transmitted with MSByte first, while within the byte, the least significant bit is first.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • volfkhatvolfkhat Posts: 944Member ■■■■■■■□□□
    james43026 wrote: »
    Honestly the easiest way to look at EUI-64 bit flipping...

    Disagreed.

    The easiest way is to use TWX's table.

    Now, with a simple glance, one can easily tell what the 'flipped' value should be.

    He completely took the math out of the equation.
    This is AWESOME.
  • TWXTWX Posts: 259Member
    volfkhat wrote: »
    Is this legit??
    lol

    Wow.. this is pretty cool;
    you literally Cut Straight Through the complexity/mystery of "the bit-flip".

    I'm gonna call this the 'TWX Table' :]

    I am flattered. I would not be surprised if other generations of enterprising network engineers have already concocted the same solution, but I'll take it as a compliment!
    If i may add on:
    I find it easier to WRITE out your table "in Squares of 4"... instead of the way you do it.

    (snipped for brevity)

    See what i mean? the table builds itself quite easily.
    Excellent Effort, my friend!

    Hey, as far as I'm concerned, anything that makes it easier is welcome. There's enough stuff on the exams that there's no sense in spending time doing things the hard way.
  • TWXTWX Posts: 259Member
    EdTheLad wrote: »
    Crazy concept, flip the 2nd least significant bit in the most significant byte, with means +2 or -2 to the low nibble.
    Don't bother passing your CCNA unless you can understand binary and hex.

    I can do the math, I count binary on my fingers from time to time (and boy do the people around me get mad when I get to four!), but why would I bother to do the math in this particular instance when I don't have to? I can apply the time during the exam I would have spent doing the math to working on problems that actually need more thought.

    0 is 0000
    1 is 0001
    2 is 0010
    3 is 0011

    0000 always becomes 0010
    0001 always becomes 0011
    0010 always becomes 0000
    0011 always becomes 0001

    This represents perfectly as
    0 2
    1 3
    
  • volfkhatvolfkhat Posts: 944Member ■■■■■■■□□□
    Ignore the Naysayers.

    You found a VERY practical trick.

    In fact,
    I can now "flip the bit" by counting with my fingers (on one Hand).

    And, i can do it in less than 10 seconds!!
    lol
  • TWXTWX Posts: 259Member
    The thing I don't get is why the EUI64 committee felt that they needed to flip the bit in the first place, or why they felt they needed to insert ##FF:FE## in the middle. They didn't do enough math to the MAC address' starting value to make it casually undecipherable and by using a full 64 bits they forced the host quantity to 2^64 on a given network, which is an ungodly number of addresses to have in a single segment!

    If they had limited it to 48 bits that would have given us 16 bits for subnetting below the ISP's handoff and the customer's range.
  • volfkhatvolfkhat Posts: 944Member ■■■■■■■□□□
    I agree with you on "flipping the bit".
    Absolutely ZERO clue Why they decided that (but, then again... i'm No mathematician).

    But adding the FFFE was a no-brainer.
    The more bits you can throw in... the higher the theoretical limit.

    IPv4 uses 4 octets.
    but IPv6 uses 8 'octets' (not the correct term, but for the sake of clarity... call them octets).

    If the FFFE had not been used... then IPv6 would only be 7 octets in size.
    So, they threw in an extra octet (FFFE) to get it to a nice round Power of 2 :]

    And again, the more Bits you use... the Higher the # of unique addresses.
    (hope that helps a little)
  • EdTheLadEdTheLad Posts: 2,112Member
    An IPv6 address is 16 octets, FFFE is 2 byte, the eui-64 calculation is the host portion of a 128 bit ipv6 address.
    This is what happens if you avoid the maths and learn tricks.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • volfkhatvolfkhat Posts: 944Member ■■■■■■■□□□
    EdTheLad wrote: »
    This is what happens if you avoid the maths and learn tricks.

    Wrong again.
    This is what happens when you avoid Textbook-definitions... perhaps.
    But TWX's MATH Table... is spot on.
    (so just get Over it).


    As for your correction of 16 octets... thanks for sharing.
    You are 100% correct.

    I should have called them what they were: 8 hexadecimal groupings.
    But then again... TWX is a noob... and i didnt want to go on a long-winded post.

    But here i am... having to clarify it, regardless.
    Fun stuff icon_rolleyes.gif
  • TWXTWX Posts: 259Member
    *grin*

    The instructor that I had explained that there was no officially-agreed term yet for the between-colon groupings. He liked to call them Hexadecimal quartets, since there were four hex digits. One could refer to them as the first hexadecimal quartet through the eighth hexadecimal quartet easily enough. It's not as easy to type as octet, but given that octet was coined to refer to the eight bits defined between periods in IPv4 the term doesn't lend itself to the IPv6 world well.

    "Hexdectet", "hexadectet", "sexdectet", or "sexadectet" would probably be the actual grammatically correct term, but those are even more awkward and probably would be avoided by those that are easily embarrassed.

    A trick that made thinking about IPv6 easier for me was to convert IPv4 numbers from decimal into hex. the broadcast address 255.255.255.255 in decimal can just as easily be represented as FF.FF.FF.FF or FFFFFFFF, or to apply IPv6 nomenclature to it, FFFF:FFFF. That helps show the true scale of IPv6 compared to IPv4, 32 bit versus 128 bit width.
  • volfkhatvolfkhat Posts: 944Member ■■■■■■■□□□
    volfkhat wrote: »
    IPv4 uses 4 octets.
    but IPv6 uses 8 'octets' (not the correct term, but for the sake of clarity... call them octets).

    UPDATE:
    Okay, i have been pressured into having to correct myself. So here goes:
    IPv4 is represented as 4 octets.
    but IPv6 is represented as 8 hexadecimal groupings.

    For instance,
    an IPv4 address might be:
    192.168.1.100

    an IPv6 address might be:
    2001:0db8:85a3:0000:0000:8a2e:0370:7334


    This IPv6 might seem a bit intimidating... but don't fret.
    Just pretend that the COLONS --> :
    are simply PERIODS --> .

    So really, this IPv6 address could be written as:
    2001 . 0db8 . 85a3 . 0000 . 0000 . 8a2e . 0370 . 7334

    and Just like that... this IPv6 address starts to look a lot more manageable :]

    TWX,
    obviously this Comparison is a simplistic way to start understanding IPv6.... but it definitely helped me wrap my mind around the whole IPv6 structure/representation.

    I hope it helps :]
  • TWXTWX Posts: 259Member
    What would be really useful for the study of IPv6 would be if my damn ISP would provide it in the first place...

    I actually used a web-based random-generator script to pick a unique-local "FD##" range, then made it a little less of a PITA by removing some of the randomness so it was manageable. Been using /48, /56, and /64 to cut it up, and have only been using link-local router-to-router, with loopback interfaces defined and advertised through the routing protocols as a means to connect to each router without having to use a physical interface IPv6 address. It feels a little weird not having routable IP addresses on the point-to-point links but it's nice that the hosts on the user networks can't address intermediate routers in a string of multiple routers, if I understand how routing protocols in IPv6 work at least.
Sign In or Register to comment.