Discussion:
ACK for a TCP segment that is fragmented at IP level
Sushrut Mair
2014-06-05 11:13:11 UTC
Permalink
Hi,

I am trying to send some data that is fragmented at IP level. Here is my
code snippet for the same:

fg=fragment((IP(src=ipsrc,dst=ipdst)/TCP(sport=srcp,dport=dstp,flags="PA",seq=last_packets_seqnum,ack=last_packets_acknum)/('a'*2048)),16)

srcp,dstp,ipsrc,ipdst are all valid and correct. So are last_packets_seqnum
(sequence number) and last_packets_acknum (acknowledgement number). All of
these are filled in after a successfull 3 way tcp connection setup
handshake (again verified via wireshark).

Here are my queries:
- I see the packets go out successfully in wireshark but they do not
reach the destination. I am not sure why. I dont see any errors in
wireshark or the script run.
- Another query is that if I am to close this tcp connection gracefully,
I will need the sequence num and the acknowledgement num of the last packet
in this connection. If I am sending out 'fg' above via sr1(), will I
receive the ACK from the server for the TCP segment that was reassembled at
the destination from these fragments?

Rgds,
Sushrut.

Continue reading on narkive:
Loading...