Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Practice build · Networks and protocols

Build your own TCP/IP Stack

A user-space network stack on a Linux TAP device: Ethernet, ARP, IPv4, ICMP and finally TCP.

  • Advanced
  • About 30–60 h
  • 4 checkpoints
  • 2 tutorials · C

Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.

Choose a tutorial

Why build it

Writing the stack turns packet captures from noise into a story. You will see why handshakes, sequence numbers and retransmissions exist.

Before you start: Needs Linux with root to create a TAP device (a VM is fine).

You will be able to

  • Read and write raw Ethernet frames on a TAP device.
  • Answer ARP requests and ICMP echo (ping).
  • Implement the TCP state machine for connection setup and teardown.
  • Debug a protocol implementation with Wireshark or tcpdump.

Skills it exercises

Recommended on Network Engineer.

Checkpoints

How you know you are there

Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.

  1. Checkpoint 1Self-check

    Frames

    Done when: Your program reads Ethernet frames from a TAP interface and prints their source, destination and EtherType.

  2. Checkpoint 2Self-check

    ARP and ping

    Done when: arping and ping from the host to your stack's address get replies, with checksums verified in Wireshark.

  3. Checkpoint 3Self-check

    TCP handshake

    Done when: nc on the host completes a three-way handshake with your stack, and the capture shows correct sequence and acknowledgement numbers.

  4. Checkpoint 4Self-check

    Data and teardown

    Done when: curl gets a response from a tiny HTTP server running on your stack, and the connection closes cleanly with FIN and ACK.

Stretch goals

  • Retransmission with timeouts.
  • Flow control with the receive window.
  • UDP and a tiny DNS client on top.
Follow a tutorial

Step-by-step guides

Pick one in a language you know (tutorial languages: C). They open on the author’s site.

Where to go next

Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.

Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.