2 votes 2 votes I have doubt 1: Segment sequence number is equal to the first sequence number of byte in TCP . Is it right ? Computer Networks sequencenumber tcp computer-networks + – hem chandra joshi asked Dec 14, 2017 hem chandra joshi 1.8k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Anu007 commented Dec 14, 2017 reply Follow Share In TCP sequence number assigned to only byte , bytes present in segment which are exchanged in TCP, so sequnce number assigned to 1st byte for segment. for next segment sequence number sequnce of 1st segment + number of bytes in 1st segment + 1. 2 votes 2 votes hem chandra joshi commented Dec 14, 2017 reply Follow Share let I want to send 5000 bytes in the packet of 1000 then .plz explain ur statement with this example? 0 votes 0 votes Jatin18 commented Dec 15, 2017 reply Follow Share TCP views data as an unstructured, but ordered, stream of bytes. TCP’s use of sequence numbers reflects this view in that sequence numbers are over the stream of transmitted bytes and not over the series of transmitted segments. The sequence number for a segment is therefore the byte-stream number of the first byte in the segment. Let’s look at an example. Suppose that a process in Host A wants to send a stream of data to a process in Host B over a TCP connection. The TCP in Host A will implicitly number each byte in the data stream. Suppose that the data stream consists of a file consisting of 500,000 bytes, that the MSS is 1,000 bytes, and that the first byte of the data stream is numbered 0.TCP constructs 500 segments out of the data stream. The first segment gets assigned sequence number 0, the second segment gets assigned sequence number 1,000, the third segment gets assigned sequence number 2,000, and so on. Each sequence number is inserted in the sequence number field in the header of the appropriate TCP segment Kurose & Ross 5000 bytes to be send. Let first byte be numbered 0.So your data consist of byte 0, byte 1 ..so on to byte 4999.MSS = 1000 byte. Then 1st segment will contain byte0 to byte999. 2nd segment will contain byte1000 to byte1999 and so on.The first segment gets assigned sequence number 0, the second segment gets assigned sequence number 1,000, the third segment gets assigned sequence number 2,000, and so. MSS is Max segment size(maximum amount of data). want to send 5000 bytes in the packet of 1000 then in the above sentence 'segment' word would be more appropriate than 'packet'.Now if we send segment of 1000 bytes.Firstly we need to find MSS.Generally TCP header is of 20 bytes.So in a segment of 1000 bytes we can send 980 bytes (MSS) of data. 1st segment will contain bytes numbered 0 to 979.2nd segment will contain byte980 to byte1959 and so on.The first segment gets assigned sequence number 0, the second segment gets assigned sequence number 980, the third segment gets assigned sequence number 1960, and so. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Yes thats right. The SEQ no is equal to the SEQUENCE NO of first byte of segment. eg- If there is segment 1 is of 4 bytes and immediately after that we have segment 2 of 8 bytes and after that segment 3 of 5 bytes, then (assuming from 0) the SEQUENCE NO of segment 1 becomes 0. The SEQUENCE NO of segment 2 becomes 4 and SEQUENCE NUMBER of segment 3 becomes 12. rish1602 answered May 6, 2021 rish1602 comment Share Follow See all 0 reply Please log in or register to add a comment.