![]() |
| | #1 |
| Registered User Join Date: Nov 2003
Posts: 109
| confused with TCP and 3 way hand shake I am not sure that I have undrestood a TCP concection or not . can u plz correct my mistakes . station A(requester) wants to send one byte data , it sends segment1 then recieves segment2 and send segment3 and so on is it right to say? segment1 : syn-flag=1,ACK-flag=0, seqnr. = m,acknr.=not important ------> segment2: <--------- syn=1, ack=1, seqnr. = n, acknr. = m + 1 segment3: syn=0,ack=1, acknr. = n + 1,seqnr.=not important ------> segment4: syn=0,ack=1, seqnr. = p, acknr. = q, 1 byte data ------> segment5: <--------- syn=0,ack=1, seqnr. = q, acknr. = p + 1 segment6: syn=0,fin=1, ack=1, seqnr. = s, acknr. = t ------> segment7: <----- syn=fin=0,ack=1,acknr.=s+1,seqnr.= not important segment8: <--------- syn=0,fin=1, ack=1,seqnr. = t, acknr. = s + 1 segment9: syn=fin=0,ack=1,acknr.=t+1,seqnr.=notimportant -----> and also in a TCP packet , what is 13th byte is Hlen(data offset) somthing linke legth in UDP ? length(UDP)=UDP header + UDP data //(in byte) is Hlen=(TCP Header + TCP Data)/4 ?????? it is just 4 bytes , is it like IP lenght that the NO. is divided by 4 ? thank you |
| arian is offline | |
| | #2 | |
| ~viaxd() Join Date: Aug 2003
Posts: 246
| it looks correct, as for the tcp header: Quote:
__________________ :wq | |
| viaxd is offline | |
| | #3 |
| Registered User Join Date: Nov 2003
Posts: 109
| is there different form of TCP connection ? for example if station A sends data and station B just sends ACK in a session , can I say : station A(requester) wants to send 1 byte data to station B . 3-way hand shake : (1)-segment1:requester sends a packet with SYN flag = 1 ACK flag = 0 seq-NO = m ACK-no = not important (2)-segment2:requester recieves a packet with SYN flag = 0 ACK flag = 1 seq-NO = not important ACK-no = m+1 (3)-segment3:requester sends a packet with SYN flag = 0 ACK flag = 0 seq-no = not important ACK-no = not important segment4:then A sends 1byte data in a new packet with SYN flag = 0 ACK flag = 0 seq-no = p ACK-no = not important segmen5:recieved ACK SYN flag = 0 ACK flag = 1 seq-no = not important ACK-no = p+1 segment6:after sending 1 byte station A requests to close the connection Fin flag = 1 SYN flag = 0 ACK flag = 0 Seq-no = s ACK-no = not important segment7: Fin flag = 0 SYN flag = 0 ACK flag = 1 Seq-no = not important ACK-no = s+1 ----------------------------------and If I want to send a packet that has no option , is padding necessary ? can I put my data after urgent pointer ? THANK YOU |
| arian is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|