Bug 2362

Summary: TCP closes the connection once it reaches the maximum value of the sequence number field
Product: ns-3 Reporter: Hany <hany.assasa>
Component: internetAssignee: Tommaso Pecorella <tommaso.pecorella>
Status: NEW ---    
Severity: enhancement CC: hany.assasa, ns-bugs
Priority: P5    
Version: ns-3.25   
Hardware: PC   
OS: Linux   
Attachments: Script file to demonstrate the problem

Description Hany 2016-04-01 13:02:10 EDT
Created attachment 2363 [details]
Script file to demonstrate the problem

Hello,

I noticed that TCP sets its FIN flag once it reaches the maximum value of the sequence number (2^32-1) instead of wrapping back again to 0 and keeping the TCP session alive. 

The problem can be demonstrated in the attached example where I have two static nodes connected with a P2P Link having a small propagation delay of 3ns and onoff application with a high data rate of 4Gbps. After 18 seconds of simulation time, the TCP sender reaches the upper bound of its sequence number and closes the connection. Here is the command line to run the script:

./waf --run "test_tcp_p2p --dataRate=4Gbps --applicationType=onoff --simulationTime=100"