Network and Host Addresses 網絡和主機地址 <<
Previous Next >> IPv4 Data Flows IPv4數據流
IPv4 Address Classes IPv4地址類別
As you can see, when the subnet mask has a 255 in it, it is defining the network portion of the address. In class A addresses, the first octet defines the network, and the last three define the host. In class B addresses, the first two octets define the network, the last two define the host. In class C addresses, the first three octets define the network, the last one defines the host.
如您所見,當子網掩碼中包含255時,它定義了地址的網絡部分。 在A類地址中,第一個八位位組定義網絡,最後三個八位位組定義主機。 在B類地址中,前兩個八位位組定義網絡,後兩個定義主機。 在C類地址中,前三個八位位組定義網絡,最後一個八位位組定義主機。
Subnet masks are used to define the specific network we are referencing. A standard class A subnet mask of 255.0.0.0 is used for all networks where the first octet starts with a number between 1 and 126. Recall from the subnet table below, our network was 10.0.0.0.
子網掩碼用於定義我們要引用的特定網絡。 255.0.0.0的標準A類子網掩碼適用於所有第一個八位位組以1到126之間的數字開頭的網絡。從下面的子網表中回想一下,我們的網絡為10.0.0.0。
IP address (in decimal) |
10 |
1 |
2 |
3 |
IP address (in binary) |
00001010 |
00000001 |
00000010 |
00000011 |
Subnet mask (in decimal) |
255 |
0 |
0 |
0 |
Subnet mask (in binary) |
11111111 |
00000000 |
00000000 |
00000000 |
|
Network bits |
Host bits |
Host bits |
Host bits |
Therefore, this address fits into the class A category. In this course, we only deal with “classful” subnet masks — the ones that only contain values of 255 and 0. In future courses, you may see other subnet masks used to further break apart the networks.
因此,該地址屬於A類類別。 在本課程中,我們僅處理“有類”子網掩碼-僅包含255和0的值。在以後的課程中,您可能會看到其他子網掩碼用於進一步拆分網絡。
Address Class |
Value in First Octet |
Classful Mask (Dotted Decimal) |
Classful Mask (Prefix Notation) |
Class A |
1 – 126 |
255.0.0.0 |
/8 |
Class B |
128 – 191 |
255.255.0.0 |
/16 |
Class C |
192 – 223 |
255.255.255.0 |
/24 |
As you can see in the address classes table, class A references networks with the first octet having a value of 1-126, class B references 128-191, class C references 192-223. There is also a special address called the loopback address, which is 127.0.0.1. The entire range of 127.x.x.x is reserved to support this loopback address. A loopback address is an IP reserved to reference the computer on which you are currently working. Every computer knows to answer up for itself when a reference to 127.0.0.1 is given. This is also known as as the “localhost.”
如您在地址類別表中看到的,類別A引用第一個八位位組的值是1-126的網絡,類別B引用128-191,類別C引用192-223。 還有一個稱為回送地址的特殊地址,即127.0.0.1。 保留127.x.x.x的整個範圍以支持此環回地址。 回送地址是保留的IP,用於引用您當前正在使用的計算機。 當給出對127.0.0.1的引用時,每台計算機都知道會自己回答。 這也稱為“本地主機”。
To route your traffic over the Internet, you are required to have a publically routable IP address. These addresses are globally managed by the Internet Corporation for Assigned Names and Numbers (ICANN). If you desire to have one of these addresses, you must purchase them for use to ensure no one else has that specific number. For most users, this is done for you by your Internet service provider (ISP), but if you have a need for numerous public IP addresses, you can buy a block of them from ICANN.
要通過Internet路由流量,您需要具有可公開路由的IP地址。 這些地址由互聯網名稱與數字地址分配機構(ICANN)全局管理。 如果您希望擁有這些地址之一,則必須購買它們以確保沒有其他人擁有該特定號碼。 對於大多數用戶而言,這是由Internet服務提供商(ISP)為您完成的,但是如果您需要大量的公共IP地址,則可以從ICANN購買其中的一部分。
Private IP addresses, on the other hand, can be used by anyone without any prior coordination. This is because private IP addresses are not routable over the Internet and are only used inside your local area network. For example, at your home, you may have five computers hooked up to your switch and those machines are all using private IP addresses. When you make a request to go outside the network, like to visit a college’s website, your router performs a network address translation (NAT) that allows your private IP address to be converted into a public IP address and a port, which then makes the request on your behalf. There is a specific range of IP addresses that are reserved as private for internal use (by you and others).
另一方面,任何人都可以使用私有IP地址,而無需事先協調。 這是因為專用IP地址無法通過Internet路由,而只能在局域網內使用。 例如,在您的家裡,您可能有五台計算機連接到交換機,而這些計算機都使用專用IP地址。 當您發出訪問網絡的請求(例如訪問大學的網站)時,路由器會執行網絡地址轉換(NAT),該轉換可將您的私有IP地址轉換為公共IP地址和端口,從而使 代表您提出要求。 有一個特定範圍的IP地址保留為私有(供您和他人使用)供內部使用。
Address Class |
Private Address Range |
Default Subnet Mask |
Class A |
10.0.0.0 – 10.255.255.255 |
255.0.0.0 |
Class B |
172.16.0.0 – 172.31.255.255 |
255.255.0.0 |
Class C |
192.168.0.0 – 192.168.255.255 |
255.255.255.0 |
For class A, the range of 10.0.0.0 to 10.255.255.255 are all private addresses. This provides 16.7 million addresses for use. Next, we have class B, which uses the range of 172.16.0.0 to 172.31.255.255. For class C, the range is 192.168.0.0 to 192.168.255.255. For class C, the most common of private IP scopes in use, the subnet mask is 255.255.255.0. This means if you choose 192.168.1.0 for your network, you would have 254 usable IP addresses. You would have this many usable IP addresses because the network is selected using the subnet mask, so only one octet is available for the host portion (there are 256 choices, but the first one (.0) is for the network address, and the last one (.255) is for the broadcast address).
learn by doing
對於A類,範圍10.0.0.0到10.255.255.255都是私有地址。 這提供了1,670萬個地址供使用。 接下來,我們有B類,其使用範圍為172.16.0.0到172.31.255.255。 對於C類,範圍是192.168.0.0到192.168.255.255。 對於C類(最常用的專用IP範圍),子網掩碼為255.255.255.0。 這意味著,如果您為網絡選擇192.168.1.0,則將有254個可用IP地址。 您將擁有這麼多可用的IP地址,因為使用子網掩碼選擇了網絡,因此主機部分只能使用一個八位位組(有256個選擇,而第一個(.0)是網絡地址,並且 最後一個(.255)是廣播地址)。
通過實踐學習
For each IP address and subnet mask given below, identify the correct address class.
對於下面給出的每個IP地址和子網掩碼,請確定正確的地址類別。
|
Address class |
IP address: 172.16.0.1
Subnet mask: 255.0.0.0
|
|
IP address: 192.168.1.1
Subnet mask: 255.255.0.0
|
|
IP address: 10.0.1.1
Subnet mask: 255.255.255.0
|
|
IP address: 10.3.2.1
Subnet mask: 255.255.0.0
|
|
A network IP address of 192.168.1.1 and a subnet mask of 255.255.255.0 is an example of a class address.
我得到這個了嗎
網絡IP地址192.168.1.1和子網掩碼255.255.255.0是一個類的示例
-
地址。
任何計算機的“ localhost”都使用回送地址。 環回IP地址是
。
Network and Host Addresses 網絡和主機地址 <<
Previous Next >> IPv4 Data Flows IPv4數據流
Copyright © All rights reserved | This template is made with by Colorlib