Mis vahe on vahemikus 127.0.0.0 ja 127.0.0.1?

Sisukord:

Mis vahe on vahemikus 127.0.0.0 ja 127.0.0.1?
Mis vahe on vahemikus 127.0.0.0 ja 127.0.0.1?

Video: Mis vahe on vahemikus 127.0.0.0 ja 127.0.0.1?

Video: Mis vahe on vahemikus 127.0.0.0 ja 127.0.0.1?
Video: Prolific USB Windows 8.1 and Windows 10 driver issue resolved - Robojax - YouTube 2024, Aprill
Anonim
 Mõnikord annab kõige elementaarsem küsimus küsimustele õpetatavaid hetki; loe edasi, kui me uhkeldame, kuidas ühe numbri vahekaugus 127.0.0.0 kuni 127.0.0.1 pakub võimalust vaadata võrgu topoloogiat.
Mõnikord annab kõige elementaarsem küsimus küsimustele õpetatavaid hetki; loe edasi, kui me uhkeldame, kuidas ühe numbri vahekaugus 127.0.0.0 kuni 127.0.0.1 pakub võimalust vaadata võrgu topoloogiat.

Tänane küsimuste ja vastuste seanss jõuab meile viisakalt SuperUserini - Stack Exchange'i ja kogukonnapõhiste Q & A veebisaitide rühmitusse.

Küsimus

SuperUseri lugeja Disa on huvitav loopback IP-ide kohta:

I know that both are loopback IPs, but they have another ip mask.

What’s the difference between them? Can they be used interchangeably?

=========================================================================== IPv4 routes =========================================================================== Active routes: Destination Mask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.6 26 […] 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306

Millist teavet saame sellelt tabelilt välja tõmmata?

Vastus

Kaks SuperUseri toetajat hüppasid, et aidata salapära lahendada. Esiteks pakub Mmmc seda lühidalt ülevaadet:

No. You cannot use them both. And they are not both loopback adresses.

127.0.0.1

on loopback aadress

127.0.0.2

on loopback aadress

127.0.0.3

on loopback-aadress ja nii edasi

127.0.0.0

on võrguaadress. Koos maskiga 255.0.0.0 annab teile vihje, et kogu A-klassi aadressid algavad

127.*.*.*

sisaldab loopback aadresse.

Seejärel pakub YLearn laiemat ülevaadet üldiste nimede nimetamisest ja sellest, kuidas neid mõelda:

What is shown in the screenshot is a routing table from a computer. The routing table is just a “roadmap” that tells a computer/router where to go to get to other devices on the network.

In some ways this is similar to how we navigate in real life.

The first column provides the list of known destinations (where can I go) and the second column indicates how specific the destination (I can go to Canada or I can go to Uncle John’s house in Canada). Without getting into great detail, the “higher” the mask value, the more specific the destination. So a value of 0.0.0.0 covers going to any device and a value of 255.255.255.255 specifies an individual device.

The third column specifies where traffic should go next to get to the destination (if you are going to Canada, you need to start by getting on Main Street) and the fourth column indicates which path out of the device should be used to get to the destination (from home you may only have your driveway but from the Walmart parking lot you may have several “exits” to choose from).

Finally, the metric gives the computer a way to choose the best path if there are multiple routes to the destination (you can go out either the north or east exit from the parking lot to get to Canada, but the east one is a faster).

So to answer the original question, no you can’t use 127.0.0.0 and 127.0.0.1 interchangeably. The difference shown here is that there exists two routes – a general route to any device using 127.x.y.z and a very specific route to host 127.0.0.1 (which is in 127.0.0.0), both of which use the 127.0.0.1 interface

Kas teil on seletamiseks midagi lisada? Helistage kommentaarides. Kas soovite lugeda rohkem vastuseid teistelt tech-savvy Stack Exchange'i kasutajatelt? Tutvu täieliku arutelu teemaga siit.

Soovitan: