Sometimes the most elementary of questi*** yield teachable moments; read on as we delve into how a single digit change between 127.0.0.0 to 127.0.0.1 offers a chance to look at network topology.
今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。
超級使用者閱讀器Disa對環回IP很好奇:
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我們能從這張桌子上挑出什麼樣的資訊?
兩個超級使用者貢獻者加入進來幫助解開這個謎團。首先,Mmmc提供了以下簡明概述:
No. You cannot use them both. And they are not both loopback adresses.
127.0.0.1 is a loopback address 127.0.0.2 is a loopback address 127.0.0.3 is a loopback address and so on
127.0.0.0 is a network address. Together with mask 255.0.0.0 it gives you a hint that whole class A of addresses starting with 127.*.*.* will contain loopback addresses.
然後,YLearn提供了一般命名約定的更廣泛概述,以及如何考慮它們:
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 destinati*** (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
...這意味著即使變數也有擴充套件的屬性和函式。這就是為什麼可以將搜尋設定為變數,並最終得到一個結果陣列的原因。 ...
...請關注以下三個方面:Express、Express+和Streaming Stick。但是有什麼區別呢?我們來看看。 ...
您已經學習瞭如何建立網站並閱讀了jQuery指南。下一步是什麼?為你的網站建立一個密碼保護區對於保證你的東西的安全是至關重要的。幸運的是,這比你想象的要容易! ...
...料,而模板則促進了這一點。我們已經寫過JSON在過去是什麼,所以如果你不確定的話就去讀一下。 ...
...識別慢速連線,或者如果您遇到資料包丟失。 你用的是什麼作業系統也不重要。開啟終端或命令提示符視窗,就可以在macOS、Linux或任何版本的Windows上使用ping。 相關:你應該知道的10個有用的Windows命令 如何使用ping 我們將在這...
...。 動態埠轉發:使用ssh伺服器作為代理 相關:VPN和代理有什麼區別? 還有“動態埠轉發”,其工作原理類似於代理或VPN。SSH客戶機將建立一個SOCKS代理,您可以配置要使用的應用程式。所有透過代理髮送的流量都將透過SSH伺服...