Demystifying the CNI by Writing One From Scratch