What is the difference between 0.0.0.0 and a loopback IP address?












18















From the book Computer Network:




The IP address 0.0.0.0, the lowest address, is used by hosts when they
are being booted. It means ‘‘this network’’ or ‘‘this host.’’



... All addresses of the form 127.xx.yy.zz are reserved for loopback
testing. Packets sent to that address are not put out onto the wire; they are processed locally and treated as incoming packets. This allows packets to be sent to the host without the sender knowing its number, which is useful for testing.




If I am correct, a loopback IP address refers to the current host.



What is the difference between 0.0.0.0 and a loopback IP address then?










share|improve this question

























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 13 at 15:04
















18















From the book Computer Network:




The IP address 0.0.0.0, the lowest address, is used by hosts when they
are being booted. It means ‘‘this network’’ or ‘‘this host.’’



... All addresses of the form 127.xx.yy.zz are reserved for loopback
testing. Packets sent to that address are not put out onto the wire; they are processed locally and treated as incoming packets. This allows packets to be sent to the host without the sender knowing its number, which is useful for testing.




If I am correct, a loopback IP address refers to the current host.



What is the difference between 0.0.0.0 and a loopback IP address then?










share|improve this question

























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 13 at 15:04














18












18








18


3






From the book Computer Network:




The IP address 0.0.0.0, the lowest address, is used by hosts when they
are being booted. It means ‘‘this network’’ or ‘‘this host.’’



... All addresses of the form 127.xx.yy.zz are reserved for loopback
testing. Packets sent to that address are not put out onto the wire; they are processed locally and treated as incoming packets. This allows packets to be sent to the host without the sender knowing its number, which is useful for testing.




If I am correct, a loopback IP address refers to the current host.



What is the difference between 0.0.0.0 and a loopback IP address then?










share|improve this question
















From the book Computer Network:




The IP address 0.0.0.0, the lowest address, is used by hosts when they
are being booted. It means ‘‘this network’’ or ‘‘this host.’’



... All addresses of the form 127.xx.yy.zz are reserved for loopback
testing. Packets sent to that address are not put out onto the wire; they are processed locally and treated as incoming packets. This allows packets to be sent to the host without the sender knowing its number, which is useful for testing.




If I am correct, a loopback IP address refers to the current host.



What is the difference between 0.0.0.0 and a loopback IP address then?







ip ipv4 subnet ip-address loopback






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 13 at 3:54









Aaron Hall

1032




1032










asked Feb 11 at 15:38









TimTim

665518




665518













  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 13 at 15:04



















  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 13 at 15:04

















Comments are not for extended discussion; this conversation has been moved to chat.

– Ron Maupin
Feb 13 at 15:04





Comments are not for extended discussion; this conversation has been moved to chat.

– Ron Maupin
Feb 13 at 15:04










2 Answers
2






active

oldest

votes


















36














The statement:




The IP address 0.0.0.0 [...] means ‘‘this network’’ or ‘‘this host.’’




is misleading. It is not a "or" but "This host on this network."



From RFC1122:




{ 0, 0 }



             This host on this network.  MUST NOT be sent, except as
a source address as part of an initialization procedure
by which the host learns its own IP address.



The loopback address (actually any address in the 127.0.0.0/8 network) is explained in the same RFC this way:




{ 127, any }



             Internal host loopback address.  Addresses of this form
MUST NOT appear outside a host.



So both a loopback address and the all zero address can be referred as "this host", but they have in fact very different usages:




  • the 0.0.0.0 address can be observed on a network, but only during the DHCP/BOOTP process, and only as a source address.



  • any address in the 127.0.0.0/8 can not be viewed anywhere on the network, and can only be used for:




    • testing the TCP/IP stack of the host.


    • two applications on the same host to communicate together.





A 127.X.X.X address is attached to a loopback interface. Such an interface has no underlying layer attached (i.e. it is not attached to a link layer). The packet is processed and responded to in the Internet layer. So there's really no way for this packet to reach anything outside the host.



But a packet sent from 0.0.0.0 is processed normally by the network stack, except that there's no routing decision, it is bound to the interface that is initializing, so it's sent out of this interface and goes through the link layer (which can be something else than Ethernet), then on the network.






share|improve this answer


























  • So in other words , 0.0.0.0 from host's point of view is "self". 127 address is not a reference to a host, but more of a simulation of an external host (even though it's not in fact external). Is that correct ? The RFC also states "a datagram whose source address does not define a single host -- e.g., a zero address, a loopback address" So if I understand correctly, unlike other addresses, they aren't meant to mean an external host on the network, but serve as reference for different things - self and sort of "test" host.

    – Sergiy Kolodyazhnyy
    Feb 13 at 10:40











  • Your quote is from the ICMP part. It states that an ICMP unreachable cannot be sent to a 0 address. Such an ICMP response would have to be sent to the 0 address which would violate the rule "MUST NOT be sent, except as a source address ". Also the 0 address can not be used except as part of a BOOTP/DHCP process which is broadcast in nature, so there's no point in sending an ICMP error message for a broadcast.

    – JFL
    Feb 13 at 10:58











  • @SergiyKolodyazhnyy edited the answer

    – JFL
    Feb 13 at 11:28



















11















If I am correct, a loopback IP address refers to the current host.




No. Traffic sent to a loopback address loops back inside the host. You can send traffic to a loopback address as the destination address and then read it. This is useful in testing.




What is the difference between 0.0.0.0 and a loopback IP address then?




Addresses in the 0.0.0.0/8 network cannot be used as destination addresses. The only practical use is as a source address when a host doesn't have an address and is asking something like a DHCP server to assign it an address.





There is the IANA IPv4 Special-Purpose Address Registry that lists out all the special address blocks, and it has links to the RFCs that define each of those blocks.






share|improve this answer
























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 17 at 17:10












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "496"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fnetworkengineering.stackexchange.com%2fquestions%2f56845%2fwhat-is-the-difference-between-0-0-0-0-and-a-loopback-ip-address%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









36














The statement:




The IP address 0.0.0.0 [...] means ‘‘this network’’ or ‘‘this host.’’




is misleading. It is not a "or" but "This host on this network."



From RFC1122:




{ 0, 0 }



             This host on this network.  MUST NOT be sent, except as
a source address as part of an initialization procedure
by which the host learns its own IP address.



The loopback address (actually any address in the 127.0.0.0/8 network) is explained in the same RFC this way:




{ 127, any }



             Internal host loopback address.  Addresses of this form
MUST NOT appear outside a host.



So both a loopback address and the all zero address can be referred as "this host", but they have in fact very different usages:




  • the 0.0.0.0 address can be observed on a network, but only during the DHCP/BOOTP process, and only as a source address.



  • any address in the 127.0.0.0/8 can not be viewed anywhere on the network, and can only be used for:




    • testing the TCP/IP stack of the host.


    • two applications on the same host to communicate together.





A 127.X.X.X address is attached to a loopback interface. Such an interface has no underlying layer attached (i.e. it is not attached to a link layer). The packet is processed and responded to in the Internet layer. So there's really no way for this packet to reach anything outside the host.



But a packet sent from 0.0.0.0 is processed normally by the network stack, except that there's no routing decision, it is bound to the interface that is initializing, so it's sent out of this interface and goes through the link layer (which can be something else than Ethernet), then on the network.






share|improve this answer


























  • So in other words , 0.0.0.0 from host's point of view is "self". 127 address is not a reference to a host, but more of a simulation of an external host (even though it's not in fact external). Is that correct ? The RFC also states "a datagram whose source address does not define a single host -- e.g., a zero address, a loopback address" So if I understand correctly, unlike other addresses, they aren't meant to mean an external host on the network, but serve as reference for different things - self and sort of "test" host.

    – Sergiy Kolodyazhnyy
    Feb 13 at 10:40











  • Your quote is from the ICMP part. It states that an ICMP unreachable cannot be sent to a 0 address. Such an ICMP response would have to be sent to the 0 address which would violate the rule "MUST NOT be sent, except as a source address ". Also the 0 address can not be used except as part of a BOOTP/DHCP process which is broadcast in nature, so there's no point in sending an ICMP error message for a broadcast.

    – JFL
    Feb 13 at 10:58











  • @SergiyKolodyazhnyy edited the answer

    – JFL
    Feb 13 at 11:28
















36














The statement:




The IP address 0.0.0.0 [...] means ‘‘this network’’ or ‘‘this host.’’




is misleading. It is not a "or" but "This host on this network."



From RFC1122:




{ 0, 0 }



             This host on this network.  MUST NOT be sent, except as
a source address as part of an initialization procedure
by which the host learns its own IP address.



The loopback address (actually any address in the 127.0.0.0/8 network) is explained in the same RFC this way:




{ 127, any }



             Internal host loopback address.  Addresses of this form
MUST NOT appear outside a host.



So both a loopback address and the all zero address can be referred as "this host", but they have in fact very different usages:




  • the 0.0.0.0 address can be observed on a network, but only during the DHCP/BOOTP process, and only as a source address.



  • any address in the 127.0.0.0/8 can not be viewed anywhere on the network, and can only be used for:




    • testing the TCP/IP stack of the host.


    • two applications on the same host to communicate together.





A 127.X.X.X address is attached to a loopback interface. Such an interface has no underlying layer attached (i.e. it is not attached to a link layer). The packet is processed and responded to in the Internet layer. So there's really no way for this packet to reach anything outside the host.



But a packet sent from 0.0.0.0 is processed normally by the network stack, except that there's no routing decision, it is bound to the interface that is initializing, so it's sent out of this interface and goes through the link layer (which can be something else than Ethernet), then on the network.






share|improve this answer


























  • So in other words , 0.0.0.0 from host's point of view is "self". 127 address is not a reference to a host, but more of a simulation of an external host (even though it's not in fact external). Is that correct ? The RFC also states "a datagram whose source address does not define a single host -- e.g., a zero address, a loopback address" So if I understand correctly, unlike other addresses, they aren't meant to mean an external host on the network, but serve as reference for different things - self and sort of "test" host.

    – Sergiy Kolodyazhnyy
    Feb 13 at 10:40











  • Your quote is from the ICMP part. It states that an ICMP unreachable cannot be sent to a 0 address. Such an ICMP response would have to be sent to the 0 address which would violate the rule "MUST NOT be sent, except as a source address ". Also the 0 address can not be used except as part of a BOOTP/DHCP process which is broadcast in nature, so there's no point in sending an ICMP error message for a broadcast.

    – JFL
    Feb 13 at 10:58











  • @SergiyKolodyazhnyy edited the answer

    – JFL
    Feb 13 at 11:28














36












36








36







The statement:




The IP address 0.0.0.0 [...] means ‘‘this network’’ or ‘‘this host.’’




is misleading. It is not a "or" but "This host on this network."



From RFC1122:




{ 0, 0 }



             This host on this network.  MUST NOT be sent, except as
a source address as part of an initialization procedure
by which the host learns its own IP address.



The loopback address (actually any address in the 127.0.0.0/8 network) is explained in the same RFC this way:




{ 127, any }



             Internal host loopback address.  Addresses of this form
MUST NOT appear outside a host.



So both a loopback address and the all zero address can be referred as "this host", but they have in fact very different usages:




  • the 0.0.0.0 address can be observed on a network, but only during the DHCP/BOOTP process, and only as a source address.



  • any address in the 127.0.0.0/8 can not be viewed anywhere on the network, and can only be used for:




    • testing the TCP/IP stack of the host.


    • two applications on the same host to communicate together.





A 127.X.X.X address is attached to a loopback interface. Such an interface has no underlying layer attached (i.e. it is not attached to a link layer). The packet is processed and responded to in the Internet layer. So there's really no way for this packet to reach anything outside the host.



But a packet sent from 0.0.0.0 is processed normally by the network stack, except that there's no routing decision, it is bound to the interface that is initializing, so it's sent out of this interface and goes through the link layer (which can be something else than Ethernet), then on the network.






share|improve this answer















The statement:




The IP address 0.0.0.0 [...] means ‘‘this network’’ or ‘‘this host.’’




is misleading. It is not a "or" but "This host on this network."



From RFC1122:




{ 0, 0 }



             This host on this network.  MUST NOT be sent, except as
a source address as part of an initialization procedure
by which the host learns its own IP address.



The loopback address (actually any address in the 127.0.0.0/8 network) is explained in the same RFC this way:




{ 127, any }



             Internal host loopback address.  Addresses of this form
MUST NOT appear outside a host.



So both a loopback address and the all zero address can be referred as "this host", but they have in fact very different usages:




  • the 0.0.0.0 address can be observed on a network, but only during the DHCP/BOOTP process, and only as a source address.



  • any address in the 127.0.0.0/8 can not be viewed anywhere on the network, and can only be used for:




    • testing the TCP/IP stack of the host.


    • two applications on the same host to communicate together.





A 127.X.X.X address is attached to a loopback interface. Such an interface has no underlying layer attached (i.e. it is not attached to a link layer). The packet is processed and responded to in the Internet layer. So there's really no way for this packet to reach anything outside the host.



But a packet sent from 0.0.0.0 is processed normally by the network stack, except that there's no routing decision, it is bound to the interface that is initializing, so it's sent out of this interface and goes through the link layer (which can be something else than Ethernet), then on the network.







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 13 at 11:27

























answered Feb 11 at 15:55









JFLJFL

12.2k11442




12.2k11442













  • So in other words , 0.0.0.0 from host's point of view is "self". 127 address is not a reference to a host, but more of a simulation of an external host (even though it's not in fact external). Is that correct ? The RFC also states "a datagram whose source address does not define a single host -- e.g., a zero address, a loopback address" So if I understand correctly, unlike other addresses, they aren't meant to mean an external host on the network, but serve as reference for different things - self and sort of "test" host.

    – Sergiy Kolodyazhnyy
    Feb 13 at 10:40











  • Your quote is from the ICMP part. It states that an ICMP unreachable cannot be sent to a 0 address. Such an ICMP response would have to be sent to the 0 address which would violate the rule "MUST NOT be sent, except as a source address ". Also the 0 address can not be used except as part of a BOOTP/DHCP process which is broadcast in nature, so there's no point in sending an ICMP error message for a broadcast.

    – JFL
    Feb 13 at 10:58











  • @SergiyKolodyazhnyy edited the answer

    – JFL
    Feb 13 at 11:28



















  • So in other words , 0.0.0.0 from host's point of view is "self". 127 address is not a reference to a host, but more of a simulation of an external host (even though it's not in fact external). Is that correct ? The RFC also states "a datagram whose source address does not define a single host -- e.g., a zero address, a loopback address" So if I understand correctly, unlike other addresses, they aren't meant to mean an external host on the network, but serve as reference for different things - self and sort of "test" host.

    – Sergiy Kolodyazhnyy
    Feb 13 at 10:40











  • Your quote is from the ICMP part. It states that an ICMP unreachable cannot be sent to a 0 address. Such an ICMP response would have to be sent to the 0 address which would violate the rule "MUST NOT be sent, except as a source address ". Also the 0 address can not be used except as part of a BOOTP/DHCP process which is broadcast in nature, so there's no point in sending an ICMP error message for a broadcast.

    – JFL
    Feb 13 at 10:58











  • @SergiyKolodyazhnyy edited the answer

    – JFL
    Feb 13 at 11:28

















So in other words , 0.0.0.0 from host's point of view is "self". 127 address is not a reference to a host, but more of a simulation of an external host (even though it's not in fact external). Is that correct ? The RFC also states "a datagram whose source address does not define a single host -- e.g., a zero address, a loopback address" So if I understand correctly, unlike other addresses, they aren't meant to mean an external host on the network, but serve as reference for different things - self and sort of "test" host.

– Sergiy Kolodyazhnyy
Feb 13 at 10:40





So in other words , 0.0.0.0 from host's point of view is "self". 127 address is not a reference to a host, but more of a simulation of an external host (even though it's not in fact external). Is that correct ? The RFC also states "a datagram whose source address does not define a single host -- e.g., a zero address, a loopback address" So if I understand correctly, unlike other addresses, they aren't meant to mean an external host on the network, but serve as reference for different things - self and sort of "test" host.

– Sergiy Kolodyazhnyy
Feb 13 at 10:40













Your quote is from the ICMP part. It states that an ICMP unreachable cannot be sent to a 0 address. Such an ICMP response would have to be sent to the 0 address which would violate the rule "MUST NOT be sent, except as a source address ". Also the 0 address can not be used except as part of a BOOTP/DHCP process which is broadcast in nature, so there's no point in sending an ICMP error message for a broadcast.

– JFL
Feb 13 at 10:58





Your quote is from the ICMP part. It states that an ICMP unreachable cannot be sent to a 0 address. Such an ICMP response would have to be sent to the 0 address which would violate the rule "MUST NOT be sent, except as a source address ". Also the 0 address can not be used except as part of a BOOTP/DHCP process which is broadcast in nature, so there's no point in sending an ICMP error message for a broadcast.

– JFL
Feb 13 at 10:58













@SergiyKolodyazhnyy edited the answer

– JFL
Feb 13 at 11:28





@SergiyKolodyazhnyy edited the answer

– JFL
Feb 13 at 11:28











11















If I am correct, a loopback IP address refers to the current host.




No. Traffic sent to a loopback address loops back inside the host. You can send traffic to a loopback address as the destination address and then read it. This is useful in testing.




What is the difference between 0.0.0.0 and a loopback IP address then?




Addresses in the 0.0.0.0/8 network cannot be used as destination addresses. The only practical use is as a source address when a host doesn't have an address and is asking something like a DHCP server to assign it an address.





There is the IANA IPv4 Special-Purpose Address Registry that lists out all the special address blocks, and it has links to the RFCs that define each of those blocks.






share|improve this answer
























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 17 at 17:10
















11















If I am correct, a loopback IP address refers to the current host.




No. Traffic sent to a loopback address loops back inside the host. You can send traffic to a loopback address as the destination address and then read it. This is useful in testing.




What is the difference between 0.0.0.0 and a loopback IP address then?




Addresses in the 0.0.0.0/8 network cannot be used as destination addresses. The only practical use is as a source address when a host doesn't have an address and is asking something like a DHCP server to assign it an address.





There is the IANA IPv4 Special-Purpose Address Registry that lists out all the special address blocks, and it has links to the RFCs that define each of those blocks.






share|improve this answer
























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 17 at 17:10














11












11








11








If I am correct, a loopback IP address refers to the current host.




No. Traffic sent to a loopback address loops back inside the host. You can send traffic to a loopback address as the destination address and then read it. This is useful in testing.




What is the difference between 0.0.0.0 and a loopback IP address then?




Addresses in the 0.0.0.0/8 network cannot be used as destination addresses. The only practical use is as a source address when a host doesn't have an address and is asking something like a DHCP server to assign it an address.





There is the IANA IPv4 Special-Purpose Address Registry that lists out all the special address blocks, and it has links to the RFCs that define each of those blocks.






share|improve this answer














If I am correct, a loopback IP address refers to the current host.




No. Traffic sent to a loopback address loops back inside the host. You can send traffic to a loopback address as the destination address and then read it. This is useful in testing.




What is the difference between 0.0.0.0 and a loopback IP address then?




Addresses in the 0.0.0.0/8 network cannot be used as destination addresses. The only practical use is as a source address when a host doesn't have an address and is asking something like a DHCP server to assign it an address.





There is the IANA IPv4 Special-Purpose Address Registry that lists out all the special address blocks, and it has links to the RFCs that define each of those blocks.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 11 at 15:43









Ron MaupinRon Maupin

68.3k1369126




68.3k1369126













  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 17 at 17:10



















  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Ron Maupin
    Feb 17 at 17:10

















Comments are not for extended discussion; this conversation has been moved to chat.

– Ron Maupin
Feb 17 at 17:10





Comments are not for extended discussion; this conversation has been moved to chat.

– Ron Maupin
Feb 17 at 17:10


















draft saved

draft discarded




















































Thanks for contributing an answer to Network Engineering Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fnetworkengineering.stackexchange.com%2fquestions%2f56845%2fwhat-is-the-difference-between-0-0-0-0-and-a-loopback-ip-address%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅