Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Windows PC that is running a TCP server on port 9000. I also have an FPGA which is directly connected to the PC via a 10G port. The FPGA can send ethernet frames to establish and maintain a TCP connection with the server, and that's it. That is, the FPGA can send an initial SYN, respond to the SYN-ACK, etc.

However, I suspect a bit of handshaking is necessary for the server to even acknowledge the initial FPGA SYN. What is the minimal handshaking necessary before the FPGA can establish a TCP connection with the TCP server?

share|improve this question
You suspect? How about a wireshark pcap with the lines, and you asking, what is this before the SYN? It could just be an ARP, especially if they haven't talked before. – NickW May 16 '13 at 16:28
Are you trying to hand-roll your own TCP stack? – mfinni May 16 '13 at 16:31
I'm programming the FPGA, so I can't apriori use WireShark. Also, I'd like to keep things as minimal as possible. – Randomblue May 16 '13 at 16:32
This question is not a duplicate and should be reopened. This question is about what has to happen on 10G Ethernet before a TCP connection can be established -- that is, it's about how TCP is implemented over Ethernet. It is not like the duplicate question which is about what happens after those pre-requisites are complete and is about TCP itself. – David Schwartz May 16 '13 at 21:49
David - although I do believe that you're correct, I'd still vote to close, because building my own minimal (and thus incomplete/incorrect) TCP stack is not something a sane systems admin would ever do. – mfinni May 17 '13 at 0:34
up vote 0 down vote accepted

Maybe I'm missing something but the "minimal handshaking necessary" to establish a TCP session is the TCP 3-way handshake:

  1. SYN-->

  2. <--SYN ACK

  3. -->ACK

share|improve this answer
Would an ARP be necessary to bind IP <-> MAC ? He does say before.. – NickW May 16 '13 at 16:47
I'm probably misunderstanding the question but in order to establish a TCP session the TCP 3-way handshake has to occur. In order for that to happen an IP address to MAC address resolution has to occur via ARP. An Ethernet frame is a "vehicle" for higher layer protocols, like TCP. You can't establish a TCP session without using TCP, hence why it's called a TCP session and hence why it's called the TCP 3-way handshake. – joeqwerty May 16 '13 at 17:09
Maybe the OP is not talking about a TCP session. For a TCP session to be established you have to be using TCP. If you're not using TCP then it's not a TCP session... it's something else. – joeqwerty May 16 '13 at 17:10
@joeqwerty: I'm asking about what comes before the TCP handshake. You alluded to ARP, and would like to know if MAC address resolution through ARP is the only thing that needs to be done before the TCP handshake. – Randomblue May 16 '13 at 18:56
Yes. When you're talking about communication via the TCP/IP protocol suite on an Ethernet network an IP address to MAC address resolution has to occur via ARP before a TCP session can be established. The hosts involved in the session need to determine each other's hardware address (the MAC address) in order for the Ethernet frames to be able to be sent from one host to another and vice versa in order for the TCP session to be established. – joeqwerty May 16 '13 at 19:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.