Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

RFC 3330 states,

127.0.0.0/8 - 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 127.0.0.1/32 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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.