IP connectionless and HTTP use TCP

Guys,
I did not get the concept that IP datagrams that are used over internet to transfer messages is connectionless service and HTTP use TCP(connection oriented) service.

My confusion is
Does HTTP use IP datagrams or not ?
If yes, then it is using connection-less service.

If no, then which packets does it use ?

Please reply...thanx in advance

Replies

  • silverscorpion
    silverscorpion
    Well, it's all about layers. There are different layers in a network, and each of the above protocols work in a different layer.

    So, HTTP works on the application layer, TCP in the transport layer and IP in the network layer or the internet layer.

    Each layer passes data to its adjacent layer. So, HTTP packets are sent to the transport layer, and TCP sends that data to the internet layer.

    It can also happen in the reverse order, viz., from internet layer to transport layer to application layer. ie., ip => tcp => http.

    In effect, HTTP is a connectionless service, even though TCP is connection-oriented.

    It can be confusing at first.. But, try to get the big picture. I hope the answer is clear. Do ask any doubts you might have.
  • Munguti
    Munguti
    Each layer in the osi model has a name for its data otherwise called a PDU(Protocal Data Unit). The names for this are
    Physical-Bits
    Data-Frames
    Network-packets or datagrams
    Transport-segment
    all the remaining upper layers have their PDU's refered to as simply data. Hope this clears the problem.

    since PDU for layer 3 are also called packets/datagrams so HTTP may use packets or datagrams since that is the same thing but it uses TCP and not UDP for its layer 4 protocol
  • Sachin Jain
    Sachin Jain
    silverscorpion
    In effect, HTTP is a connectionless service, even though TCP is connection-oriented.
    I think i should study more about these theoretically and then i will ask.
    Can you please suggest me some website or book name to refer to for clearing this doubt.
  • Munguti
    Munguti
    silverscorpion
    In effect, HTTP is a connectionless service, even though TCP is connection-oriented.
    silverscorpion a service is connectionless or connection oriented based on the layer 4 protocol used i.e whether it use UDP or TCP at the transport layer. Since HTTP uses TCP port 80 it is therefore necessarily conection-oriented.
  • silverscorpion
    silverscorpion
    Munguti
    silverscorpion a service is connectionless or connection oriented based on the layer 4 protocol used i.e whether it use UDP or TCP at the transport layer. Since HTTP uses TCP port 80 it is therefore necessarily conection-oriented.
    Well, I didnt know that. But in that case, I have a doubt. HTTP uses TCP alright.. But HTTP doesn't establish dedicated connections between client and server for the whole session, right? For each file to be transferred, new requests are made to the server, right?

    So, just because HTTP uses a connection-oriented service, does that make http too connection-oriented?
  • Munguti
    Munguti
    silverscorpion
    Well, I didnt know that. But in that case, I have a doubt. HTTP uses TCP alright.. But HTTP doesn't establish dedicated connections between client and server for the whole session, right? For each file to be transferred, new requests are made to the server, right?

    So, just because HTTP uses a connection-oriented service, does that make http too connection-oriented?
    But if there is an error in the data received doesnt HTTP request retransmission. If it were connectionless errors would be dropped by the receiver as is the case when streaming live tv or radio and you see glitches in your screen or static in the voice. This means its reliable

    And doesnt HTTP use sequences on the packets received, such that though they may travel through various paths they will eventually be put in their correct order and presented to the receiver as they were in the sender

    silverscorpion
    dedicated connections between client and server for the whole session, right?
    I think dedicated connections would be used in UDP since all packets must arrive in order and as they were sent, again using the example of the live streaming, if packets were to travel different paths wouldnt that mean they might arrive at different times, and who would have the time to arrange them in their correct order without delaying and distorting the live broadcast.

You are reading an archived discussion.

Related Posts

I vividly remember the day when I went to that bookstore. "Crossword" was newly opened in my city. I, along with my 3 friends went there. And boy, we were...
ScanCorner aims to solve the problem faced by many people who have the 'hard copies' of their photographs and want to convert them into high quality digital images. The startup...
hi guys' can we test a 555 timer ic using cro,probes and function generator? if so ,how?
hi, anyone who can give me the IS code 2116 - 1980. its very urgent pls
hey can anyone help me in using java 3-d...I am already using java1.6 ... even after installation I am not able to use it..what next after installation??how to use it...