不同型別的區域網ip地址代表什麼?

當你開始學習IP地址時,一開始要知道具體的地址代表什麼以及為什麼這樣做可能會有點混亂。有鑑於此,今天的超級使用者問答帖子幫助好奇的讀者進一步瞭解IP地址。...

不同型別的區域網ip地址代表什麼?

當你開始學習IP地址時,一開始要知道具體的地址代表什麼以及為什麼這樣做可能會有點混亂。有鑑於此,今天的超級使用者問答帖子幫助好奇的讀者進一步瞭解IP地址。

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

圖片由CLUC(Flickr)提供。

問題

超級使用者讀者Flare Cat想知道不同型別的LAN IP地址代表什麼?:

I have seen LAN IP addresses in the following ways/forms:

  • 10.0.0.*
  • 192.168.0.*
  • 192.168.1.*
  • 192.168.2.*
  • 127.0.0.* (this one usually ends with a 1 and I am not sure if it is a LAN address or not, since I normally see it with proxy stuff)

Why are there different forms of LAN IP addresses and what do they represent (mean)?

不同型別的區域網IP地址代表什麼??

答案

超級使用者貢獻者Abraxas為我們提供了答案:

There are many questi*** that deal with this, but here is a crash course on what are called Private IP Addresses, as defined in RFC 1918.

IP addresses were broken up into what are called classes as seen here. This is no longer used (replaced with Classless Inter-Domain Routing, or CIDR for short), but may help in understanding different sizes of networks:

007Ys3FFgy1gpdujhstfqj30hd049t8z

There are a couple of basic distincti*** regarding addresses. You have what are called networks, network addresses, public addresses, private addresses, and subnets.

In short, your computer gets an IP address which resides in a particular IP network. Your computer’s IP address and your network’s address (usually defined in your local router) are private addresses. Private addresses differ from public addresses in that private addresses are not assigned to public networks. For instance, if you ping google.com, you will receive a resp***e from the public address which google.com resolves to. That is a public address. There are some networks which are “special” and do not get assigned publicly; they are called private IP addresses. For more information, read here: What is a Private IP Address?

Here is a list of the private network ranges:

007Ys3FFgy1gpdujj37r7j30hd02r0sw

The easiest way, I think, to visualize this is to imagine the following. Your Internet service provider gives you a single IP address, “50.100.101.154”, for example. This is plugged into the modem/router for your home and is the public interface’s IP address. However, you have more than one device you want on your network, so what your modem/router does is it creates an “internal” network. Say it picks the number “192.168.1.0” for the network and it is a standard netmask (read related links to find out more).

This means that you can plug in devices inside of your router and give them any IP address which fits this pattern: “192.168.1.1-254”. The last octet (space after the last period) is your “available range” of host IP addresses. There are some special IP addresses (network addresses, broadcast addresses, etc.), but if you do not use a “0” or a “255”, you will be fine in most cases.

So, the short answer is, “10.x.x.x, 192.168.x.x, and 172.16-31.x.x” are all IP addresses that you can use in your own home network which will never conflict with public IP addresses. This is important for the following reason:

When you try to go to a website, say google.com, and your browser contacts a DNS server on the Internet and says ‘Where is google.com?’, it gets a resp***e back in the form of an IP address. The resp***e is basically, “If you want to get to google.com, then go to 8.8.8.8.” Your browser then sends a request to “8.8.8.8” and loads whatever page is there.

What if you used “8.8.8.8” for an IP address in your home network? Well, you might have an issue because your router may say, “I know where 8.8.8.8 is, it is right over there!” and then you end up losing access to google.com because you cannot get out of your network and resolve the correct “8.8.8.8” address. Since private IP address ranges are designated for private use only, public websites should never use them and therefore you should never look up a website address (outside of your LAN) which points to one of them.

“127.0.0.1” is a special type of address called your “localhost” address (I will not go in to it here). It does cover the whole 127 range: “127.0.0.0 – 127.255.255.255”. Think of it as a way to give a device its own IP address without anyone or anything else being able to do things with that address.


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-09 22:09
  • 閱讀 ( 49 )
  • 分類:網際網路

你可能感興趣的文章

路由器(router)和轉換(switch)的區別

...路層工作,因此,它被稱為第2層裝置。與中繼器集線器不同,交換機不廣播資料包。相反,它確實儲存並轉發包被交換到適當埠的位置。交換機透過使用以前接收到的資料包,自動調整埠和裝置的MAC地址之間的對映,並將這些...

  • 發佈於 2020-10-26 14:51
  • 閲讀 ( 44 )

ip地址(ip)和mac地址(mac address)的區別

...提供唯一的標識,但這兩個地址根據其狀態和功能而有所不同。當考慮定址的功能層時,MAC地址在資料鏈路層起作用,IP地址在網路層工作。 MAC地址為網路的硬體介面提供唯一標識,而IP地址為網路的軟體介面提供唯一標識。此...

  • 發佈於 2020-11-04 20:17
  • 閲讀 ( 51 )

什麼是dmz?如何在網路上配置dmz?

“DMZ”代表什麼?DMZ意味著非軍事區,但這實際上意味著不同領域的不同事物。 ...

  • 發佈於 2021-03-11 08:47
  • 閲讀 ( 46 )

瞭解ip和mac地址:它們有什麼好處?

...對容易理解。事實上,這和你已經習慣的郵政服務沒什麼不同! ...

  • 發佈於 2021-03-13 11:32
  • 閲讀 ( 53 )

網路101:乙太網、區域網及其工作原理

...的裝置在本地有一個IP地址,但在外部機器看來卻有一個不同的IP地址。要了解其工作原理,請嘗試以下操作: ...

  • 發佈於 2021-03-14 04:20
  • 閲讀 ( 52 )

免費ip地理定位api是一個有價值的網站管理員工具

...化版本。這本書可能有一個國慶節的主題,或者是用完全不同的語言寫成的。 確保交易以特定地區的最佳貨幣進行。 ...

  • 發佈於 2021-03-20 15:06
  • 閲讀 ( 37 )

50個搞笑的wi-fi名字讓你的鄰居印象深刻

...個路由器**商都提供自己獨特的管理面板軟體,有時甚至不同型號的管理面板軟體也會有所不同,但所有這些路由器的總體登入過程幾乎相同。值得一提的是,我使用的是windows10,有一個TP-Link路由器,下面的螢幕截圖就是這樣的...

  • 發佈於 2021-03-23 11:10
  • 閲讀 ( 59 )

區域網和廣域網在聯網方面有什麼區別?

...網際網路不是唯一的廣域網。企業充分利用廣域網來連線不同國家的辦事處。例如,如果一個企業在紐約、東京和悉尼有一個辦事處,它就可以出租自己的廣域網系統,讓他們可以互相交談。 ...

  • 發佈於 2021-03-26 15:03
  • 閲讀 ( 43 )

什麼是區域網?

...網組成,但所跨越的區域比一個城市要大,並且可以透過不同型別的技術連線,包括因特網。當然,CAN是一個由多個區域網組成的網路,這些區域網橫跨一個校園。 不過,如果你真的想把他們都當成廣域網的話,我們沒問題。 ...

  • 發佈於 2021-04-05 05:21
  • 閲讀 ( 59 )

什麼是lan喚醒,如何啟用它?

...,瞭解更多關於喚醒區域網的資訊。 此外,根據程式的不同,只有從現有網路上的計算機發送魔法包時,LAN喚醒才可能工作。如果你的程式不能自動處理區域網喚醒的網路連線,你需要將路由器設定為轉發7號和9號UDP埠,特別是...

  • 發佈於 2021-04-07 11:16
  • 閲讀 ( 57 )
npy0480
npy0480

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦