Home>Article> How to divide IP address network segments

How to divide IP address network segments

醉折花枝作酒筹
醉折花枝作酒筹 Original
2021-06-29 14:44:00 110017browse

IP addresses are divided into Class A, Class B, Class C, Class D and Class E. Each field is one byte, 8 bits, and the maximum value is 255. The IP address consists of two parts, namely the network address and the host address; the network address indicates which network on the Internet it belongs to, and the host address indicates which host in the network it belongs to.

How to divide IP address network segments

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

IP address classification (Class A, Class B, Class C, Class D, Class E)

The IP address consists of four segments. Each field is one byte, 8 bits, and the maximum value is 255. ,

The IP address consists of two parts, namely the network address and the host address. The network address indicates which network on the Internet it belongs to, and the host address indicates which host in the network it belongs to. The two are in a master-slave relationship.

The four major types of IP addresses identify a certain host in the network. The IPv4 address length is 32 bits and 4 bytes in total, but in practice we use dotted decimal notation.

IP addresses are divided according to the network number and host number, and are divided into three categories: A, B, C and special addresses D and E. Leave all 0s and all 1s unused.

Class A: (1.0.0.0-126.0.0.0) (Default subnet mask: 255.0.0.0 or 0xFF000000)

The first byte is the network number, and the last three characters Section is the host number. The beginning of this type of IP address is "0", so the network number of the address ranges from 1 to 126.

Generally used in large networks.

Class B: (128.1.0.0-191.255.0.0) (Default subnet mask: 255.255.0.0 or 0xFFFF0000)

The first two bytes are the network number, and the last two words Section is the host number. The first part of this type of IP address is "10", so the network number of the address ranges from 128 to 191.

Generally used in medium-sized networks.

Class C: (192.0.1.0-223.255.255.0) (Subnet mask: 255.255.255.0 or 0xFFFFFF00)

The first three bytes are the network number, and the last byte is host number. The beginning of this type of IP address is "110", so the network number of the address ranges from 192 to 223.

Generally used in small networks.

Class D: It is a multicast address. The beginning of this type of IP address is "1110", so the network number of the address ranges from 224 to 239. Generally used for multicast users[1].

Class E: is a reserved address. The beginning of this type of IP address is "1111", so the network number of the address ranges from 240 to 255.

Return address: 127.0.0.1. is also the local machine address, equivalent to localhost or local machine IP.

Generally used for testing. For example: ping 127.0.0.1 to test whether the local TCP/IP is normal.

Current IP networks use 32-bit addresses, expressed in dotted decimal notation, such as 172.16.0.0. The address format is: IP address = network address + host address or IP address = host address + subnet address + host address.

IP address type

最初设计互联网络时,为了便于寻址以及层次化构造网络,每个IP地址包括两个标识码(ID),即网络ID和主机ID。同一个物理网络上的所有主机都使用同一个网络ID,网络上的一个主机(包括网络上工作站,服务器和路由器等)有一个主机ID与其对应。IP地址根据网络ID的不同分为5种类型,A类地址、B类地址、C类地址、D类地址和E类地址。 1. A类IP地址 一个A类IP地址由1字节的网络地址和3字节主机地址组成,网络地址的最高位必须是“0”, 地址范围从1.0.0.0 到126.0.0.0。可用的A类网络有126个,每个网络能容纳1亿多个主机。 2. B类IP地址 一个B类IP地址由2个字节的网络地址和2个字节的主机地址组成,网络地址的最高位必须是“10”,地址范围从128.0.0.0到191.255.255.255。可用的B类网络有16382个,每个网络能容纳6万多个主机 。 3. C类IP地址 一个C类IP地址由3字节的网络地址和1字节的主机地址组成,网络地址的最高位必须是“110”。范围从192.0.0.0到223.255.255.255。C类网络可达209万余个,每个网络能容纳254个主机。 4. D类地址用于多点广播(Multicast)。 D类IP地址第一个字节以“lll0”开始,它是一个专门保留的地址。它并不指向特定的网络,目前这一类地址被用在多点广播(Multicast)中。多点广播地址用来一次寻址一组计算机,它标识共享同一协议的一组计算机。224.0.0.0到239.255.255.255用于多点广播 。 5. E类IP地址 以“llll0”开始,为将来使用保留。240.0.0.0到255.255.255.254

When the Internet was originally designed, in order to facilitate addressing and hierarchical network construction, each IP address included two identification codes (ID), namely the network ID and the host ID.

All hosts on the same physical network use the same network ID. A host on the network (including workstations, servers and routers on the network, etc.) has a host ID corresponding to it.

IP addresses are divided into 5 types according to different network IDs, Class A addresses, Class B addresses, Class C addresses, Class D addresses and Class E addresses.

1. Class A IP address A Class A IP address consists of a 1-byte network address and a 3-byte host address. The highest bit of the network address must be "0", and the address range is from 1.0.0.0 to 126.0.0.0. There are 126 Class A networks available, each of which can accommodate more than 100 million hosts.

2. Class B IP address A Class B IP address consists of a 2-byte network address and a 2-byte host address. The highest bit of the network address must be "10", and the address range is from 128.0.0.0 to 191.255.255.255. There are 16,382 Class B networks available, and each network can accommodate more than 60,000 hosts.

 3. Class C IP address A Class C IP address consists of a 3-byte network address and a 1-byte host address. The highest bit of the network address must be "110". The range is from 192.0.0.0 to 223.255.255.255. There are more than 2.09 million Class C networks, and each network can accommodate 254 hosts.

 4. Class D addresses are used for multicast (Multicast). The first byte of a Class D IP address starts with "lll0", which is a specially reserved address. It does not point to a specific network. This type of address is currently used in multicast (Multicast). A multicast address is used to address a group of computers at a time and identifies a group of computers that share the same protocol. 224.0.0.0 to 239.255.255.255 are used for multicast.

 5. Class E IP addresses begin with "llll0" and are reserved for future use. 240.0.0.0 to 255.255.255.254, 255.255.255.255 is used for broadcast address

全零(“0.0.0.0”)地址对应于当前主机。全“1”的IP地址(“255.255.255.255”)是当前子网的广播地址。 在IP地址3种主要类型里,各保留了3个区域作为私有地址,其地址范围如下: A类地址:10.0.0.0~10.255.255.255 B类地址:172.16.0.0~172.31.255.255 C类地址:192.168.0.0~192.168.255.255 A类地址的第一组数字为1~126。其中0代表任何地址,127为回环测试地址,注意,数字0和 127不作为A类地址,数字127保留给内部回送函数,而数字0则表示该地址是本地宿主机,不能传送。 B类地址的第一组数字为128~191。 C类地址的第一组数字为192~223。 1. A类地址 A类地址的表示范围为:0.0.0.0~126.255.255.255,默认网络掩码为:255.0.0.0; A类地址分配给规模特别大的网络使用。A类网络用第一组数字表示网络本身的地址,后面三组数字作为连接于网络上的主机的地址。分配给具有大量主机(直接个人用户)而局域网络个数较少的大型网络。例如IBM公司的网络。 2. B类地址B类地址的表示范围为:128.0.0.0~191.255.255.255,默认网络掩码为:255.255.0.0;B类地址分配给一般的中型网络。 B类网络用第一、二组数字表示网络的地址,后面两组数字代表网络上的主机地址。 3. C类地址 C类地址的表示范围为:192.0.0.0~223.255.255.255,默认网络掩码为:255.255.255.0;C类地址分配给小型网络,如一般的局域网和校园网,它可连接的主机数量是最少的,采用把所属的用户分为若干的网段进行管理。 C类网络用前三组数字表示网络的地址,最后一组数字作为网络上的主机地址。

全零(“0.0.0.0”)地址对应于当前主机。全“1”的IP地址(“255.255.255.255”)是当前子网的广播地址。

在IP地址3种主要类型里,各保留了3个区域作为私有地址,其地址范围如下:

  A类地址:10.0.0.0~10.255.255.255

  B类地址:172.16.0.0~172.31.255.255

  C类地址:192.168.0.0~192.168.255.255

A类地址的第一组数字为1~126。其中0代表任何地址,127为回环测试地址,注意,数字0和 127不作为A类地址,数字127保留给内部回送函数,而数字0则表示该地址是本地宿主机,不能传送。

B类地址的第一组数字为128~191。

C类地址的第一组数字为192~223。

  1. A类地址 A类地址的表示范围为:0.0.0.0~126.255.255.255,默认网络掩码为:255.0.0.0;A类地址分配给规模特别大的网络使用。A类网络用第一组数字表示网络本身的地址,后面三组数字作为连接于网络上的主机的地址。分配给具有大量主机(直接个人用户)而局域网络个数较少的大型网络。例如IBM公司的网络。

  2. B类地址B类地址的表示范围为:128.0.0.0~191.255.255.255,默认网络掩码为:255.255.0.0;B类地址分配给一般的中型网络。B类网络用第一、二组数字表示网络的地址,后面两组数字代表网络上的主机地址。

  3. C类地址 C类地址的表示范围为:192.0.0.0~223.255.255.255,默认网络掩码为:255.255.255.0;C类地址分配给小型网络,如一般的局域网和校园网,它可连接的主机数量是最少的,采用把所属的用户分为若干的网段进行管理。C类网络用前三组数字表示网络的地址,最后一组数字作为网络上的主机地址。

实际上,还存在着D类地址和E类地址。但这两类地址用途比较特殊,在这里只是简单介绍一下:D类地址称为广播地址,供特殊协议向选定的节点发送信息时用。E类地址保留给将来使用。

更多计算机相关知识,请访问常见问题栏目!

The above is the detailed content of How to divide IP address network segments. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn