A 15-year-old student has a rapid onset of fever, chills, and headache along with signs of confusion and hallucinations. He displays nuchal stiffness and photophobia. The indications from Brudzinski and Kernig are encouraging. The key diagnostic procedure is: