Addressing Notation 尋址符號 <<
Previous Next >> IPv4 Address Classes IPv4地址類別
Network and Host Addresses 網絡和主機地址
An IPv4 network address is further divided into two portions based upon the subnet mask: the network portion and the host portion. A subnet mask is a series of numbers used for routing traffic within a subnetwork. When a subnet mask is used to define the network portion, anywhere there is a binary “11111111” (or 255 in decimal) used, this area is considered part of the network portion. When a binary “00000000” (0 in decimal) is used, this represents the host portion of the address. The host represents a single device on the network, such as your computer or phone.
IPv4網絡地址根據子網掩碼進一步分為兩部分:網絡部分和主機部分。子網掩碼是用於在子網內路由流量的一系列數字。當使用子網掩碼定義網絡部分時,在任何使用二進制“ 11111111”(或十進制255)的地方,該區域均被視為網絡部分的一部分。當使用二進制“ 00000000”(十進制為0)時,它表示地址的主機部分。主機代表網絡上的單個設備,例如您的計算機或電話。
The following two tables show the network and host portions of IP addresses.
以下兩個表顯示了IP地址的網絡部分和主機部分。
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 |
In the example above, we see that our IP address is 10.1.2.3, and it has a class A subnet mask of 255.0.0.0. (We will discuss subnet classes in more detail later in this module). If this subnet mask is converted to binary, we see is written as eight 1s, followed by 24 0s, giving us 255.0.0.0 in decimal notation. Therefore, wherever we see a 255 in a subnet mask, we know we are seeing the network portion defined. So, for this example, our specific host is 10.1.2.3 and our network address would be 10.0.0.0.
在上面的示例中,我們看到我們的IP地址為10.1.2.3,它的A類子網掩碼為255.0.0.0。 (在本模塊的後面,我們將
更詳細地討論子網類)。如果將此子網掩碼轉換為二進制,我們將看到它寫成八個1,然後是24 0,十進製表示為255
.0.0.0。因此,無論何時在子網掩碼中看到255,我們都知道看到了定義的網絡部分。因此,對於此示例,我們的特
定主機為10.1.2.3,我們的網絡地址為10.0.0.0。
EXAMPLE
例子
If a network has an IP address of 192.168.1.2, and the subnet mask of 255.255.255.0, we can identify the network and host portions of both addresses. To determine the network portion of the IP address, examine the subnet mask for which octets hold the value 255. In this case, the subnet mask has 255 in the first, second, and third octet. This means that the network portion of the IP address is the first, second, and third octet, as shown in the chart below. The remaining octet (the fourth octet) is the host portion of the address.
如果網絡的IP地址為192.168.1.2,子網掩碼為255.255.255.0,我們可以識別這兩個地址的網絡和主機部分。
要確定IP地址的網絡部分,請檢查其八位位組的子網掩碼為255的子網掩碼。在這種情況下,該子網掩碼在第一個,
第二個和第三個八位位組中具有255。這意味著IP地址的網絡部分是第一個,第二個和第三個八位位組,如下圖所示
。剩餘的八位位組(第四個八位位組)是地址的主機部分。
|
Network Portion |
Host Portion |
IP Address: 192.168.1.2 |
192.168.1 |
2 |
Subnet Mask: 255.255.255.0 |
255.255.255 |
0 |
Addressing Notation 尋址符號 <<
Previous Next >> IPv4 Address Classes IPv4地址類別