I'm doing a network project.

I first create a tcp socket, which is a merely a placeholder.

Then I send tcp many packets by libnet. ISN is captured through tcp 3-way handshake and seq number after is calculated by myself.

Since I don't send packets through system socket, the client/server will keep sending zero length packets indicating next sequence number it expects when receive packets from peer each. This is due to standard.

This can work. But the problem is that speed is slow comparing using udp in the same network.

So I'm wondering, what router will do if it receive packets with different seq numbers, e.g, the 1st packets ISN, the 2nd one seq1(seq>ISN), and 3rd one ISN.

Will router/firewall route everything it meet or will drop packets due do wrong tcp seq number.

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Commented Feb 21, 2018 at 18:05

1 Answer 1


A router is a layer 3 device, it only cares about the IP packet. TCP is a layer 4 protocol and as such it is "invisible" to a router. TCP sequence checking is up to the local IP stack.

What a firewall decides to do is entirely up to the firewall and the stateful checks it performs. Reasonably, it shouldn't drop out-of-sequence TCP packets but simply forward them. However, if multiple ISNs are received on a socket, the firewall should detect and filter this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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