Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

RFC 3330 states, - This block is assigned for use as the Internet host loopback address. A datagram sent by a higher level protocol to an address anywhere within this block should loop back inside the host. This is ordinarily implemented using only for loopback, but no addresses within this block should ever appear on any network anywhere.

Okay, here's what I know.

Datagrams are UDP PDU's (Layer 3).

Segments are TCP PDU's (Layer 3).

Packets are IP PDU's (Layer 2).

Frames are Layer 1 PDU's.

(Using TCP/ IP Model for reference)

Ping uses ICMP which, from what I understood, is a Layer 2 (Internet) protocol. According to RFC 3330, "A datagram sent by a higher level protocol to [a loopback address] should loop back inside the host."

Now, is RFC 3330 using "datagram" in a general manner, as a generic PDU, and not specifically referring to a UDP PDU?

If not, how is it that ping, using the ICMP protocol, is sending a datagram (Layer 3 PDU) to the loopback address when, if I'm not mistaken, it should be sending a packet (Layer 2/ Internet PDU)? Doesn't ping bypass the Transport layer (thus it does not need TCP or UDP ports, but rather, uses raw sockets)?

share|improve this question
up vote 1 down vote accepted

Datagram is traditionally interpreted as a packet belonging to an unreliable service which would include IP, ICMP, UDP etc. However its also sometimes used to describe any general packet - for eg "TCP Datagram".

Since ICMP is a network layer protocol, it won't go beyond the Internet Layer. If you were accessing the web server on your machine using the loopback address, it will go till the application layer. The tcp/ip protocol remains the same whether you use a loopback ip address or otherwise.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .