Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do we say the IP protocol in TCP/IP suite is connectionless?

Why is the IP called a connectionless protocol? If so, what is the connection-oriented protocol then?

Thanks.

Update - 1 - 20:21 2010/12/26

I think, to better answer my question, it would be better to explain what "connection" actually means, both physically and logically.

Update - 2 - 9:59 AM 2/1/2013

Based on all the answers below, I come to the feeling that the 'connection' mentioned here should be considered as a set of actions/arrangements/disciplines. Thus it's more an abstract concept rather than a concrete object.

Update - 3 - 11:35 AM 6/18/2015

Here's a more physical explanation:

  • IP protocol is connectionless in that all packets in IP network are routed independently, they may not necessarily go through the same route, while in a virtual circuit network which is connection oriented, all packets go through the same route. This single route is what 'virtual circuit' means.

  • With connection, because there's only 1 route, all data packets will arrive in the same order as they are sent out.

  • Without connection, it is not guaranteed all data packets will arrive in the same order as they are sent out.

Update - 4 - 9:55 AM 2016/1/20/Wed

One of the characteristics of connection-oriented is that the packet order is preserved. TCP use a sequence number to achieve that but IP has no such facility. Thus TCP is connection-oriented while IP is connection-less.

like image 632
smwikipedia Avatar asked Dec 26 '10 11:12

smwikipedia


People also ask

What do you mean by IP is connectionless protocol?

Internet Protocol (IP) is a connectionless protocol that manages addressing data from one point to another, and fragments large amounts of data into smaller, transmittable packets.

Which of the TCP IP protocols is connectionless?

UDP is also a transport-layer protocol and is an alternative to TCP. It provides a connectionless data transmission service between applications.

Is TCP connectionless protocol?

User Datagram Protocol (UDP) is a connectionless protocol used for less complex transmissions, TCP is the more complex protocol, used for connection-oriented transmissions based on its stateful design incorporating data stream services and reliable transmission.

Why is IP said to be an unreliable and connectionless protocol?

The IP layer provides an unreliable, connectionless delivery system. The reason why it is unreliable stem from the fact the protocol does not provide any functionality for error recovering for datagrams that are either duplicated, lost or arrive to the remote host in another order than they are send.


4 Answers

The basic idea is pretty simple: with IP (on its own -- no TCP, UDP, etc.) you're just sending a packet of data. You simply send some data onto the net with a destination address, but that's it. By itself, IP gives:

  1. no assurance that it'll be delivered
  2. no way to find out if it was
  3. nothing to let the destination know to expect a packet
  4. much of anything else

All it does is specify a minimal packet format so you can get some data from one point to another (e.g., routers know the packet format, so they can look at the destination and send the packet on its next hop).

TCP is connection oriented. Establishing a connection means that at the beginning of a TCP conversation, it does a "three way handshake" so (in particular) the destination knows that a connection with the source has been established. It keeps track of that address internally, so it can/will/does expect more packets from it, and be able to send replies to (for example) acknowledge each packet it receives. The source and destination also cooperate to serial number all the packets for the acknowledgment scheme, so each end knows whether packets it sent were received at the other end. This doesn't involve much physically, but logically it involves allocating some memory on both ends. That includes memory for metadata like the next packet serial number to use, as well as payload data for possible re-transmission until the other side acknowledges receipt of that packet.

like image 122
Jerry Coffin Avatar answered Nov 16 '22 00:11

Jerry Coffin


TCP/IP means "TCP over IP".

TCP
--
IP
  • TCP provides the "connection-oriented" logic, ordering and control
  • IP provides getting packets from A to B however it can: "connectionless"

Notes:

  • UDP is connection less but at the same level as TCP
  • Other protocols such as ICMP (used by ping) can run over IP but have nothing to do with TCP

Edit:

  • "connection-oriented" mean established end to end connection. For example, you pick up the telephone, call someone = you have a connection.

  • "connection-less" means "send it, see what happens". For example, sending a letter via snail mail.a

So IP gets your packets from A to B, maybe, in any order, not always eventually. TCP sorts them out, acknowledges them, requests a resends and provides the "connection"

like image 28
gbn Avatar answered Nov 16 '22 01:11

gbn


Connectionless means that no effort is made to set up a dedicated end-to-end connection, While Connection-Oriented means that when devices communicate, they perform handshaking to set up an end-to-end connection.

IP is an example of the Connectionless protocols , in this kind of protocols you usually send informations in one direction, from source to destination without checking to see if the destination is still there, or if it is prepared to receive the information .

Connectionless protocols (Like IP and UDP) are used for example with the Video Conferencing when you don't care if some packets are lost , while you have to use a Connection-Oriented protocol (Like TCP) when you send a File because you want to insure that all the packets are sent successfully (actually we use FTP to transfer Files).

Edit :

In telecommunication and computing in general, a connection is the successful completion of necessary arrangements so that two or more parties (for example, people or programs) can communicate at a long distance. In this usage, the term has a strong physical (hardware) connotation although logical (software) elements are usually involved as well.

The physical connection is layer 1 of the OSI model, and is the medium through which the data is transfered. i.e., cables

The logical connection is layer 3 of the OSI model, and is the network portion. Using the Internetwork Protocol (IP), each host is assigned a 32 bit IP address. e.g. 192.168.1.1

like image 26
Mohamad Alhamoud Avatar answered Nov 15 '22 23:11

Mohamad Alhamoud


TCP is the connection part of TCP/IP. IP's the addressing.

Or, as an analogy, IP is the address written on the envelope, TCP is the postal system which uses the address as part of the work of getting the envelope from point A to point B.

like image 33
Marc B Avatar answered Nov 16 '22 00:11

Marc B