40923247 cp2020

  • Home
    • Site Map
    • reveal
    • blog
  • 首頁
  • HW1
    • U13
      • IPv4 and IPv6 Addresses
      • IPv4 Addressing
      • IPv4 Address Classes
      • Assigning an IP Address 分配IP地址
      • IPv6
      • Classful Vs  Classless Addressing  Subnet and CIDR
      • Windows Networking Windows網絡
    • U14
      • Overview 概述
      • TCP and UDP
      • TCP IP Stack
      • Networking Transfer Protocols 網絡傳輸協議
      • FTP
      • SSL
  • HW2
    • 2-1
    • 2-2
    • 2-3
  • HW3
    • Exercise 34 練習34
    • Exercise 24  練習24
    • Exercise 28  練習28
IPv4 and IPv6 Addresses << Previous Next >> IPv4 Address Classes

IPv4 Addressing

IPv4尋址

Addressing Notation

尋址符號

Internet protocol (IP) networking relies on both an IP address and subnet mask using a 32-bit dotted decimal notation. The Internet Engineering Task Force (IETF) and the Internet Corporation for Assigned Names and Numbers (ICANN) developed and maintains the standards for IP allocation and protocols.

 

While the following IP address and subnet mask looks like a regular decimal number separated by periods:

Internet協議(IP)網絡使用32位點分十進製表示法同時依賴IP地址和子網掩碼。 互聯網工程任務組(IETF)和互聯網名稱與數字地址分配機構(ICANN)制定並維護了IP分配和協議的標準。

 

以下IP地址和子網掩碼看起來像是一個普通的十進制數字,中間用句點分隔:

1

168.1.1

 

2

255.255.255.0

The computer sees the binary:

計算機看到二進製文件:

1

11000000.10101000.00000001.00000001

 

2

11111111.11111111.11111111.00000000

Each octet is made up of eight bits (one byte or two nibbles); multiplied by four octets, that equals 32 bits. The maximum value for any octet is 255 (28-1) so therefore the maximum number of IPv4 addresses available is 232, which equals 4,294,967,296 unique addresses.

 

The presence of the subnet mask tells networking devices how much of the IP address belongs to the network and how much to the host. The 255.255.255.0 subnet represents that the first three octets are the network and the “0” represents the available number of hosts (nodes). So, the form is N.N.N.H. Think of the combination of IP and subnet as similar to regular postal addresses. You need a zip code (subnet) and street address (host).

 

There are five different classes in IPv4 labelled A through E, with classes A, B, and C used by computer networks and classes D and E reserved as experimental. As originally designed, the IP range is determined by the lead bits in the first octet and matched to one specific subnet mask. This is called "classful" addressing. When the IP class does not match the default subnet mask, it is called "classless."

每個八位位組由八位組成(一個字節或兩個半字節)。乘以四個八位位組,等於32位。任何八位位組的最大值為255(28-1),因此,可用的IPv4地址的最大數量為232,等於4,294,967,296個唯一地址。

 

子網掩碼的存在告訴網絡設備多少IP地址屬於網絡,多少屬於主機。 255.255.255.0子網表示前三個八位位組是網絡,“ 0”表示可用的主機(節點)數。因此,表格為N.N.N.H.可以將IP和子網的組合視為類似於常規郵政地址。您需要一個郵政編碼(子網)和街道地址(主機)。

 

IPv4中有五種不同的類別,標記為A到E,計算機網絡使用的類別為A,B和C,D和E類別保留為實驗性。按照最初的設計,IP範圍由第一個八位位組中的前導位確定,並與一個特定的子網掩碼匹配。這稱為“有類”尋址。如果IP類與默認子網掩碼不匹配,則稱為“無類”。

 

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.

 

The following two tables show the network and host portions of IP addresses.

IPv4網絡地址根據子網掩碼進一步分為兩部分:網絡部分和主機部分。 子網掩碼是用於在子網內路由流量的一系列數字。 當使用子網掩碼定義網絡部分時,在任何使用二進制“ 11111111”(或十進制255)的地方,該區域均被視為網絡部分的一部分。 當使用二進制“ 00000000”(十進制為0)時,它表示地址的主機部分。 主機代表網絡上的單個設備,例如您的計算機或電話。

 

以下兩個表顯示了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。

 

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.

Network Portion

Host Portion

IP Address: 192.168.1.2

192.168.1

2

Subnet Mask: 255.255.255.0

255.255.255

0


IPv4 and IPv6 Addresses << Previous Next >> IPv4 Address Classes

Copyright © All rights reserved | This template is made with by Colorlib