IPV4 and subnet mask Introduction

Disclaimer: This article belongs to the author and blog Park total, welcome to reprint, but without the author's consent declared by this section must be retained, and given the original connection in the apparent position of the article page, otherwise the right to pursue legal responsibilities. https://blog.csdn.net/mymhj/article/details/81629625

Class A IP address in the address

 

    Network address (8 bits) + host address (24 bits), according to a predetermined network identification class A address must begin with "0." Oxxxxxx .xxxxxxxx.yyyyyyyy.yyyyyyyy

A number of network-based computing:

Then the network address range 0 to 127. However, due to zero and all-one (Note: High or 0) of the address used for special purposes, in fact, may be assigned a network address range: 1-126.

A number of classes host computing:

    Behind 24 is the host ID, so the number of host 16777216-2. 24th power of 2 minus the two reserved addresses 2. Therefore, the scope of the Class A IP address should be: 1 .0.0.1 to 126 .255.255.254 .

Red is for the network logo, green for the host ID. Class A subnet mask address is 255.0.0.0 or / 8.

The IP address of a class B address

        

Network address (16 bits) + host address (16 bits), according to a predetermined network identification class B address must begin with "10." 10xxxxxx.xxxxxxxx .yyyyyyyy.yyyyyyyy

Class B subnet Calculated:

Because it is a binary, so the number of network segments as follows: 14 times the power of network segments 2, equal to 16,384. Two deduction all "0" and all "1" reserved address, the class B network can have 16,382 segments. Interval Number Class B network represented in decimal: between 128.0.YY.YY to 191.255.YY.YY. 127 is a reserved field 128 so from the beginning.

Host computing Class B: 16-bit host address back, after deduction of two reserved addresses, the maximum number of the host 2 to the power of 16 minus 2, 65534. Class B IP addresses so that the host range 10 hex: 128 . 0 .0.1 to 191.255 .255.254

Red for network identification, green for the host ID. Class B subnet mask or address is 255.255.0.0 / 16.

 

Class C IP addresses in the address

 

Network address (32) + host address (8 bits), according to a predetermined network identification Class C address must begin with "110." 110xxxxx.xxxxxxxx.xxxxxxxx . YYYYYYYY

Class C network number is calculated:

Because it is made of two, the number of segments as: 21 th power of 2, equal to 2097152, deducting two all "0" and "1" reserved address, Class C network can have segments 2,097,152. Interval Number Class C network represented in decimal: between 192.0.0.YY to 223.255.255.YY.

Class C hosts Calculated: 8 back to the host address, after deduction of two reserved addresses, the maximum number of hosts is the eighth power of 2 minus 2, 254. Therefore, Class C IP addresses the host range 10 hex: 192.0.0 .1 to 223.255.255 .254

    Red for network identification, green for the host ID. Class C subnet mask of 255.255.255.0 or address / 16.

 

Subnet Mask

    Subnet mask, also known as network mask , mask address, subnet mask, which is used to indicate it is a bit of an IP address identifies the subnet host resides, and which bits identify the host was a mask. The subnet mask is a 32-bit address, does not exist alone, it must be combined with the IP address. The subnet mask is only one role, is to divide an IP address into a network address and host address in two parts, and shows the IP address on the LAN, or on a remote network.

Guess you like

Origin blog.csdn.net/mymhj/article/details/81629625