Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields

June 27, 2010

Hal Pomeranz, Deer Run Associates

Tell me what this is:

TCP Header in Lego(TM)

TCP Header in Lego(TM)

If you said, “Hey! That’s a TCP header diagram in Lego(TM)”, or perhaps, “Holy &^%@! That idiot made a TCP header diagram in Lego(TM)!”, then you’re exactly right!  This is another one of those wild, wacky ideas that we dreamed up in the middle of one of my SANS classes (note to the SANS staff: shorter breaks might be a good idea).  I bet my students never thought I’d actually do it.

Of course, you know I couldn’t stop with just doing the TCP header:

IP Header in Lego(TM)

IP Header in Lego(TM)

Now why am I wasting all that space on the building plate in each case?  Why so you can put them together of course:

TCP/IP in Lego(TM)

TCP/IP in Lego(TM)

The use of color here really highlights certain portions of the packet header.  For example, the source and destination addresses and ports really jump out.  But there are some other, more subtle color patterns that I worked in here.  For example, if you look closely you’ll see that I matched the color of the ACK bit with the blue in the ACK number field.  Similarly the colors of the SYN bit and the sequence number match, as do the URG bit and urgent pointer field.

Actually I wish I had a couple of more colors available.  Yes, Lego(TM) comes in dozens of colors these days, but they only make 2×8 blocks (aka one “Lego(TM) Byte”) in six colors: White, Black, Red, Yellow, Blue, and Beige.

Lego(TM) Byte, Nibble, and Bit

Lego(TM) Byte, Nibble, and Bit

So while I tried to use Beige exclusively for size fields, Red for reserved bits, Yellow for checksums, and so on, I ultimately ended up having to use these colors for other fields as well– for example, the yellow sequence number fields in the TCP header.  Maybe I should have just bought a bunch of “nibbles” (2×4 blocks) in other colors and not been so choosy about using full “Lego(TM) Bytes”.

Serious Fun

Cute idea, but is there any practical value?  After a lengthy conversation with my inner child (who is generally more mature than my outer persona), I realized that there was a fun learning game we could make out of all this.  So I labelled all the blocks.  Yes, that’s right. I. Labelled. Every. Single. Block. I even did the individual bits:

TCP Header "Bits" in Lego(TM). Labelled.

TCP Header "Bits" in Lego(TM). Labelled.

So the game becomes learning where all the fields are in the various packet headers so that you can re-create the packet diagrams from piles that look like this:

Lego(TM) blocks waiting to become TCP header diagram

Lego(TM) blocks waiting to become TCP header diagram

Now we can teach students how to decode packet headers by letting them play with Legos(TM).  And that means we can all write off our Lego(TM) collections as a business expense!  How cool is that?

Admit It.  You Can’t Wait To Do It Too!

Project Tools

Project Tools

If you’ve got a hankering to try this out for yourself, it doesn’t take a whole lot.  I way overbought on the Lego front: six green base-plates, and 20 2×8 “Lego(TM) Bytes”, 8 “Nibbles” (2×4 blocks), and 16 “Bits” in each color.  Total cost for the Lego(TM) was around US$100 delivered.

Labelling was accomplished with my P-Touch(TM) labeller.  3/8″ ribbon is precisely the right height to be placed on the side of a Lego(TM) block.  It also helps to have a razor blade type tool to help separate the P-Touch(TM) labels from their backing and apply them to the blocks.

And of course I have to give a shout-out to the late, great Richard Stevens and his biblical tome TCP/IP Illustrated: Vol 1.  If you don’t already own this book, buy it. Seriously.

Final Thoughts

Finally, to all of you who think I need a life, all I have to say is:

Labelled TTL "Lego(TM) Byte"

Labelled TTL "Lego(TM) Byte"

Baby, I’m living the dream!

About these ads

44 Responses to “Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields”

  1. Well done. It’s hard to beat a graphic representation, especially when you get to something as technical as packet headers. Now, onto UDP!

  2. Sara said

    Great! Makes it so easy to get. Used to look at traces all the time and had the hardest time explaining umm, they never acked our syn ack..etc.
    Bookmarking and sharing!

  3. jared said

    Bounced here from boingboing.net

    Great stuff! I’m going to go steal my nephew’s LEGOs and dust off the label maker, so I can have a go at this. Tactile learning is how I roll.

  4. [...] Hal Pomeranz, Deer Run Associates Tell me what this is: If you said, "Hey! That's a TCP header diagram in Lego(TM)", or perhaps, "Holy &^%@! That idiot made a TCP header diagram in Lego(TM)!", then you're exactly right!  This is another one of those wild, wacky ideas that we dreamed up in the middle of one of my SANS classes (note to the S … Read More [...]

  5. Mike Poor said

    Awesome work Hal! Sign me up for a LEGO kit :-)

  6. John Pomeranz said

    Geeky sweetness! But you know, bro, I think that mom’s got the massive childhood Lego(R) collection still stashed in boxes back here in the sultry East. You really should call me the next time your inner child takes control…

  7. Valdis Kletnieks said

    Hal: I’m terribly afraid you’re going to do something rash like an IPv6 version. :)

  8. Hank said

    Guess I’m going to have to duck the landlord for another month; worth it.

    http://amzn.to/91oPsu

  9. If you had flattr I would definitely add this to my monthly donation list.

  10. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control FieldsAJ: Not game related, but really cute. [...]

  11. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control FieldsAJ: Not game related, but really cute. [...]

  12. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields « …July 21, 2010 – Hmm. I smell an interview question. [...]

  13. if only my teacher did this, learning wouldn’t be so boring, that bad :p

  14. Daniele said

    Great teaching!!! :)

  15. leonward said

    Pure genius! Love it.
    Do you mind if I use the image in some PPT (with credit associated of course)?

  16. Ben Harris said

    BrickLink lists Lego bytes in 17 colours adding brown, dark blue, dark gray, green, light bluish gray, light gray, light yellow, Maersk blue, orange, sand green, and transparent clear to your list.

    http://www.bricklink.com/catalogItem.asp?P=3007

    [ It's possible I need a life too. ]

  17. damowe said

    Very nice and illustrative work :). Thanks for the idea.

  18. [...] TCP and IP Headers in Legos – via Boing Boing [...]

  19. BrickLink? How did I not know of this?

    Oh my. /me drools…

  20. I don’t mind if people use these images (with attribution). Please, be my guest.

  21. Hey, before everybody goes berserk, we need an RFC describing the scheme and specifying the colors. Interoperability would be adversely affected by implementations using different colors for checksums, for example.

  22. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control FieldsAJ: Not game related, but really cute. [...]

  23. Jorge said

    You should upgrade to IPv6 :-)
    Cheers

  24. mlage said

    And to think when I taught high speed Internet I only used Mega Blocks to display and show the layering of the OSI model… also tough to get the right color schemes!

  25. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields [...]

  26. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control FieldsAJ: Not game related, but really cute. [...]

  27. smallduck said

    or to go a little more overboard with this, you could have 9 green boards to exactly represent the 576 byte minimum IPv4 packet (i think, they’re 32x32peg square right?), then assemble the IP & TCP headers at the top of the first board. you could (sacrilegiously) cut the first board up to allow one to still separate the 2 assembled header blocks

  28. [...] 2010 05:49:21 +0000 HDC >> Cisco VPN for Mac OS X 10.6 Mon, 26 Jul 2010 04:10:28 +0000 Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields « … Thu, 22 Jul 2010 05:30:05 +0000 iPhone 3G crippled by software update Tue, 20 Jul 2010 05:22:49 [...]

  29. [...] TCP/IP headers using Legos – awesomely geeky! I’d be tempted to spray paint some of the Legos to increase the color options. [...]

  30. poowee said

    how about http & https headers :->

  31. Shawn said

    In a similar frame of mind, here’s an interesting video using Legos to explain the issues related to Net Neutrality.

  32. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields | R…. [...]

  33. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields (via Hacker News) [...]

  34. [...] Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields [...]

  35. Reblogged this on Beep Boop and commented:
    Fore those of you who are into networking and Lego.

  36. [...] Computer Networking 101 — studying what a TCP/IP packet looks like. Can be a little like watching paint dry. That’s why I love this: a hands-on approach to looking at the headers in both protocols: https://righteousit.wordpress.com/2010/06/27/practical-visual-three-dimensional-pedagogy-for-internet… [...]

  37. F. Hekland said

    Make a ping packet, send it in the mail to someone else who has implemented TCP/IP using lego and snail mail. Ping time of days :-O

  38. Sam WIlson said

    Love the ping idea. We need an RFC along the lines of 1149. We’d need extra protocol units (compose the packet completely out of Lego(TM) Bits rather than Bytes or Nybbles?) but that shouldn’t be hard. Who’s going to build codecs out of Mindstorms?

  39. F. Hekland said

    Didn’t think of the Mindstorms codec, but that’s an excellent idea. Could go from PC to PC where the only human interaction is the postal service and packet insertion/extraction for the codec. Alternatively, if you want to ping another computer in-house, have no human interaction by making a Mindstorms robot carry the packet around ;-)

    (I remember 1149 was actually implemented by some blokes in my home town (http://www.blug.linux.no/rfc1149/) :-D )

  40. […] my other favorite was an explanation of networking and packets using legos, Practical, Visual, Three-Dimensional Pedagogy for Internet Protocol Packet Header Control Fields – does it get more […]

  41. Moneer said

    If you put together a kit and sell it on the internet for $20-$30, I’ll buy one!

    There is a great business idea…

Comments are closed.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: