TCP/IP design and breakdown

Hey guys how are you all?
I was hoping that someone may be able to explain a bit about the TCP header and how all the sections work in relation to one another. At university it has been requested that I look at the problem where binary code is received to a machine and what happens afterwards with regards to processing and validation then pointing the code to the correct application. I have been studying TCP for a week now but am struggling to find information that I can understand when it come to which order the 10 sections are processed. My tutor agrees that this is correct in my way of thinking but I may be too fresh in this game to understand TCP for now.

Any help at all is as always greatly appreciated!

Thanks guys!

Ray

Replies

  • durga ch
    durga ch
    hey


    So now what all happens when you send the data:

    1. Application layer –encapsulates the data in an application header and sends it down to the below layer.

    2. In TCP/IP the next layer which receives this packet is the transport layer. Transport here doesnot need to mean in moving data across in internet,Transport is more of process to process and logical connection it rather implies the way the current box connects to the other box , implies sockets, session’s establishment whereas IP is the one which connects devices to devices. For eg: you have opened a webpage taking its data from an application server,how will the server know to which process running in your computer the response needs to be sent back?? tcp makes this connectivity possible. TCP pads its own header to this already encapsulated data, hence the TCP segments, the data field is this encapsulated packet.
    The TCP segment is basically header+data

    TCP header itself is of 10 feilds as below and size may vary between 20 to 60bytes

    1.Source port - 2 bytes
    2.destination port - 2 bytes
    3.SEQ NUM-4 bytes
    4.ACK NUM- 4 bytes
    5.HLEN-1 word
    6.RESERVED-6bits
    7.CONTROL-6bits
    8.WINDOW SIZE-2 bytes
    9.CHECKSUM-2 bytes
    10.URGENT POINTERS-2bytes

    here's example problem from book Forouzan

    TCP header( in hex)=05320017 00000001 000000000 500207FF 00000000
    since each hex = 4 bits , we need to first split the above hex as such
    05 32 00 17 00 00 00 01 00 00 00 00 50 02 07 FF 00 00 00 00

    source port is 2 bytes take 05 32 = 1330
    next 2 bytes as destination address 00 17 == 23 (default TCP port)
    next 4 bytes as sequence number 00 00 00 01 ==1
    next 4 bytes as ack 00 00 00 00 == 0
    next 4 bits as HLEN 5 ==5 -- this indicates number of sets of 4 bytes which makes the header lenght = 20bytes..
    next 6 bits are reserved i.e.0 =0000and 2 bits from hex 0
    next 6 bits are control bits = remaining 2 bits from hex 0 and 4 bits of 2
    next 2 bytes indicate the window length 07 FF == 2047 bytes
    Checksum 2 bytes 00 00 = 0
    Urgent pointer 2bytes 00 00 =0

    Hope this helps
  • deucalion0
    deucalion0
    Thanks very much for your help, this does help, I do appreciate your time with breaking this down and explaining all that I will study what you have wrote until it makes sense in my head!

    Many thanks!

    Ray

You are reading an archived discussion.

Related Posts

A MATLAB routine, DeltaRule, to train a single artificial neuron using the delta rule is available. This routine fits a simple neural model to class (0/1) data. The resulting model...
Hi i'm doing my final yr BTech. A major IT company is visiting my campus next week. My brother works as an analyst in that co. Now if i say...
Can you please help me in this about topic?
Sachin Tendulkar became the first batsman to score a double century in One-Day Internationals😁, accomplishing the feat in the second one-dayer against South Africa in Gwalior on Wednesday. The master...
i m a third year electronics and telecomm. student .i want notes on the subject neural network and fuzzy logic .can anyone help?