When establish a tcp connection,what if TCP use initial sequence number as a fixed number?

Consider why a connection may get duplicate sequence numbers normally.

Consider why a connection may get duplicate sequence numbers normally. Then consider how the receiving system would handle a packet with a "duplicate" sequence number (because the transmitting system started reusing sequence numbers in packets it is using try to re-establish a connection). *Edit: * OP says: but when re-establish the connection,the transmitting system will send a segment with SYN code bit set(and the sequence number be set 1 of course),won't that(SYN code bit set) inform the receiving system it is a new connection trying to be established?

See wiki for Transmission_Control_Protocol,it says that "Only the first packet sent from each end should have this flag(SYN) set. " But packets get lost and delayed and arrive out of order. You can't simply say everything arriving after the packet with the SYN flag is new.

Lets say some of the old packets are delayed and arrive after establishment of a new connection. How do you distinguish whether a packet with sequence number #10 is from the old connection or new one? The worse case scenario is that it's from the old connection and the receiving system accepts it as from the new connection.

When the real new connection packet #10 arrives, it's ignored as an unnecessary retranmission. The stream is corrupted without any indication of it. http://www.tcpipguide.com/free/t_TCPConnectionEstablishmentSequenceNumberSynchroniz.htm ... The problem with starting off each connection with a sequence number of 1 is that it introduces the possibility of segments from different connections getting mixed up.

Suppose we established a TCP connection and sent a segment containing bytes 1 through 30. However, there was a problem with the internetwork that caused this segment to be delayed, and eventually, the TCP connection itself to be terminated. We then started up a new connection and again used a starting sequence number of 1.As soon as this new connection was started, however, the old segment with bytes labeled 1 to 30 showed up.

The other device would erroneously think those bytes were part of the new connection. ... This is but one of several similar problems that can occur.... The other issue with a predictable initial sequence number, such as starting at 1 every time, is that the predictability presents a vulnerability: A malicious person could write code to analyze ISNs and then predict the ISN of a subsequent TCP connection based on the ISNs used in earlier ones. This represents a security risk, which has been exploited in the past (such as in the case of the famous Mitnick attack).

To defeat this, implementations now use a random number in their ISN selection process. Mitnick attack - http://www.cas.mcmaster.ca/wiki/index.php/The_Mitnick_attack.

See wiki for Transmission_Control_Protocol,it says that "Only the first packet sent from each end should have this flag(SYN) set. " – DiveInto Jan 24 at 3:18 Thanks so much for your quality answer,but sorry for my persistence,the scenario you give shows that the receiving system may mistakenly regard the old connection's packet is from the new connection,so a system crash and restart can confuse a remote system into believing that the old packet is from the new connection,but it still doesn't explain how it can confuse a remote system into believing that the old connection remained open,actually in the scenario you give,I think the receiving system clearly knows that the old connection is dead. Again I appreciate your answer,thanks so much ^_^.

– DiveInto Jan 24 at 13:15 @Diveinto - I've been considering this, & the only thing I can think of is that the initial syn packet from the reconnection could be seen as a dupe. However, I can't find documentation to back this up. The closest I found was figure 10 of faqs.

Org/rfcs/rfc793. Html: "When the SYN arrives at line 3, TCP B, being in a synchronized state, and the incoming segment outside the window, responds with an acknowledgment indicating what sequence it next expects to hear (ACK 100)." No indication of what happends if the segemnt is inside the window.

– Bert F Jan 25 at 12:23.

It's far worse than that though anyway - being predictable with sequence numbers makes spoofing and injecting an order of magnitude easier.

In fact I know the worse side,I just don't know why that makes the receiving system think the old connection is still open. – DiveInto Jan 24 at 3:19.

After restart, if the first TCP connection is towards the same remote system, and since the sequence number will again be 1 - consider what that will cause.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions