Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

IP address division type and subnetting

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In the actual network environment, according to the size of the network, the number of hosts in the network is different. The IP address is divided into three categories: a-force, B, and C, which are used in networks of different sizes, while the IP address is a dotted decimal representation of 32 bits. Only the IP address can not determine which network it belongs to. In the 32 bits of the IP address, the first n bits are used to identify the network, and the last 32-n bits identify the hosts in the network. In general, the network address is identified by the first 8 ip 16 or 24 bits. Given an ip address, the network address is the result of the operation between the ip address and 1. 10. 0 (n 1. 10. 0) is called the subnet mask of this network.

I. IP address division

Class A: netmask:255.0.0.0 8-bit mask

The first bit of IP must be 0, the network address is 0 0001-0111 1111, that is, 1-127. if network 127.0.0.0 is used for loopback, the valid network is 1-126, with a total of 126 network addresses, and each network address has (2 ^ 24-2) host addresses-network address host bits all 0 and broadcast address host bits all 1.

Class B: netmask:255.255.0.0 16-bit mask

The first two bits of IP must be 10, and the network address is 100 0000-10 11 1111, with a total of 64 * 2 ^ 8 network addresses, each with (2 ^ 16-2) host addresses-network address host bits all 0 and broadcast address host bits all 1.

Class C: netmask:255.255.255.0 24-bit mask

The first three bits of the IP must be 110. the network address is 1 0000-1 1111, with a total of 32 * 2 ^ 16 network addresses, each with (2 ^ 8-2) host addresses-network address host bits all 0 and broadcast address host bits all 1.

Private ip addresses are assigned for communication within the LAN

Category A: 10.0.0.0 Universe 8

Category B: 172.16.0.0 Universe 16-172.31.0.0 Universe 16

Category C: 192.168.0.0 Universe 24-192.168.255.0 Universe 24

There are also two other categories:

Category D:

The first four bits of IP must be 1110, and the network address is 1110 0000-1110 1111. It does not point to a specific network, and this type of address is currently used in Multicast.

Category E:

The first four digits of IP must be 1111 and the network address is 1111 0000-1111 1111, reserved for future use.

II. Subnetting

In practical application, a company applies for a public network, such as 201.1.2.0Universe 24, but the company has two groups, the number of hosts in one group is 6, and the number of hosts in the other group is 4. At the same time, the hosts of the two groups do not want to communicate with each other. If you apply for a public network, the cost is too high, so the network will be divided into multiple subnets. The method of subnetting is to use the first m bit in the host bit in the network address and the network address bit as the bits that identify the network, such as:

201.1.2.0 (borrow 2 digits), forget about 00 and 11:

00:

01:

01 00 0001-01 11 1110: 65-126

The network address is 201.1.2.64ax 26, and the broadcast address is 201.1.2.127.

10:

10 00 0001-10 11 1110: 129190

The network address is 201.1.2.128ax 26, and the broadcast address is 201.1.2.191.

11:

Note: subnetting is a waste of addresses

Subnet merging is the inverse process of subnetting.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report