12/5/2023 0 Comments Nxfilter 127.0.0.1![]() What is the difference between these loopback addresses (I assume 127.0.0.1 - 127.0.0.255?) and "real" (maybe non-loopback is the better word?) IP addresses?Īll IP addresses are "real". Some operating systems have the loopback interface as an interface you can see and manipulate like any other interface (Linux and the common lo interface versus ones like eth0, etc.), and some make the loopback interface invisible (Windows). So, operating systems can present a "loopback" interface to applications, which internally will take incoming traffic and basically copy it to the interface's output buffer without handing it to a device driver that talks to a physical NIC - hence "loopback". Interfaces do not have to be backed by physical hardware, an operating system can provide a driver that looks like a network interface to an application, but is really something else. ![]() IP addresses are assigned to interfaces, not computers, etc. Like what software/hardware says, "StoneThrow's PC, you're assigned 72.212.216.41, so your C programs are allowed to call bind() with that address"? I think the gist of my questions is I'm trying to understand how IP address assignment/availability works in the context of a single PC. Why do so many networking tutorials use of 127.0.0.1 instead of "non-loopback" addresses? (I don't mean to generalize, but I have found this to be largely true).Can one network card only have one IP address?.Is 72.212.216.41 something that's tightly-coupled to my network card and immutable? Or can some software process change it?.Who gave my network card the address 72.212.216.41?.what governs whether the IP address 72.212.216.41 is available on that particular PC for the C code to function correctly? On a given PC, what governs whether an IP address is available to the C bind() function?Į.g in the following code snippet (adapted from here):.What is the difference between these loopback addresses (I assume 127.0.0.1 - 127.0.0.255?) and "real" (maybe non-loopback is the better word?) IP addresses?.My questions (I know multiple questions per post are frowned upon, but I hope these questions are logically grouped enough that it's justified asking these questions together): (That explanation was probably really bad, revealing my shaky understanding) I have a shaky understanding that these "loopback" addresses are some OS feature that makes these "virtual addresses" and allows them to act as if they are real network addresses. Similarly, in my Udemy Docker & Kubernetes course, the instructor creates a Node.js web server that listens at 127.0.0.1 port 3000. a TCP listener does a bind() to a 127.0.0.x address. Over the years I've written various little TCP/UDP sender/receiver projects - mostly simple hello-world-level code, in order to learn the mechanics of sending/receiving data over TCP or UDP.īut almost all the examples I've referenced tend to use 127.0.0.x as the receiver's address. I have this gap in my understanding of networking that I've always had a hard time crossing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |