"Describe the TCP handshake when a connection is first opened."
"What is an ack?"
"How is data passed to TCP from a user process?"
"Design a TCP connection table. How big should the connection table be?"
"Design a (simple) hash function that maps connections into the connection table."
I have not done anything like this in a long time, so it took me a couple of minutes of writing some diagrams on a piece of paper before I responded with XORing the source and destination addresses and ports 32 bits at a time.
"What data structure would you use for TCP throughput?"
I wasn't sure what he meant, so I asked if he wanted something to collect statistics (e.g. total packets or bytes per connection).
"What does an HTTP request look like?"
"What are some HTTP headers?"
"What are HTTP cookies used for"
I said to maintain state and for tracking.
"Are there any other headers that can be used to track state?"
I thought about it for about a minute, then said I couldn't think of any. I had forgotten that authentication headers can track state.
"What were you doing during the time you weren't working?"
I was asked back for an onsite interview about a week later. Since the interview was conducted under an NDA, I can't write about it, but unfortunately, I didn't get the job. There were a couple of things about the interview I wasn't happy about. One was that they gave me mechanical pencils for a written C programming test whose thin points kept breaking. I wish they'd given me wooden pencils instead. The other was that the last person to interview me just left me in the interview room by myself instead of walking me out to the door. I felt a little uneasy walking around the office unescorted, but no one from the interview team or HR was nearby.