11 · Introducing the TCP_IP Internet Layer, IPv4 Addressing, and Subnets認識 TCP/IP 網際網路層、IPv4 定址與子網路

IPv4 Address RepresentationIPv4 位址表示法

Every device must be assigned a unique address to communicate on an IP network. This includes hosts or endpoints (such as PCs, laptops, printers, web servers, smartphones, and tablets), as well as intermediary devices (such as routers and switches).

每部裝置都必須被指派一個唯一的位址,才能在 IP 網路上通訊。這包含主機或端點(例如 PC、筆記型電腦、印表機、網頁伺服器、智慧型手機和平板電腦),以及中介裝置(例如路由器和交換器)。

Physical street addresses are necessary to identify the locations of specific homes and businesses so that mail can reach them efficiently. In the same way, logical IP addresses are used to identify the location of specific devices on an IP network so that data can reach those network locations. Every host connected to a network or the internet has a unique IP address that identifies it. Structured addressing is crucial to route packets efficiently. Learning how IP addresses are structured and how they function in the operation of a network provides an understanding of how IP packets are forwarded over networks using TCP/IP.

實體街道地址是必要的,用以識別特定住宅與商業場所的位置,讓郵件能有效送達。同樣地,邏輯 IP 位址用來識別 IP 網路上特定裝置的位置,讓資料能夠送達那些網路位置。每部連接到網路或網際網路的主機都有一個能識別它的唯一 IP 位址。結構化的定址方式對於有效率地繞送封包至關重要。了解 IP 位址如何建構、如何在網路運作中發揮作用,有助於理解 IP 封包如何透過 TCP/IP 在網路間轉送。

An IPv4 address is a 32-bit number, is hierarchical, and consists of two parts:

IPv4 位址是一個 32 位元的數字,具有階層性,並由兩個部分組成:

  • The network address portion (network ID): Network ID is the portion of an IPv4 address that uniquely identifies the network in which the device with this IPv4 address resides. The network ID is important because most hosts on a network can communicate only with devices in the same network. If the hosts need to communicate with devices with interfaces assigned to some other network ID, a network device—a router or a multilayer switch—can route data between the networks.網路位址部分(網路 ID): 網路 ID 是 IPv4 位址中用來唯一識別該位址所在網路的部分。網路 ID 之所以重要,是因為網路上大多數主機只能與同一網路內的裝置通訊。如果主機需要與指派到其他網路 ID 介面的裝置通訊,網路裝置(路由器或多層交換器)可以在網路之間繞送資料。
  • The host address portion (host ID): Host ID is the portion of an IPv4 address that uniquely identifies a device on a given IPv4 network. Host IDs are assigned to individual devices, both hosts or endpoints and intermediary devices.主機位址部分(主機 ID): 主機 ID 是 IPv4 位址中用來唯一識別特定 IPv4 網路上某裝置的部分。主機 ID 會指派給個別裝置,包含主機或端點與中介裝置。

Practical Example of an IPv4 Address

IPv4 位址的實務範例

Recall that IPv4 addresses are most often written in the dotted-decimal notation, which consists of four sets of 8-bits (octets) converted from binary to decimal numbers, separated by dots. The following example shows an IPv4 address in a decimal form translated into its binary form, using the method described earlier.

回想一下,IPv4 位址最常以點分十進位表示法書寫,由四組 8 位元(八位元組)從二進位轉換為十進位數字並以句點分隔而成。以下範例顯示一個十進位形式的 IPv4 位址,依先前所述方法轉換成其二進位形式。

How many bits are contained in an IPv4 address?一個 IPv4 位址包含多少位元?