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

How to classify and subnet ip addresses

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

The content of this article mainly focuses on how to classify and subnet ip addresses. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!

Ip is a 32-bit unsigned integer with a range of 0.0.0.0-255.255.255.255. Specifically, an ip consists of two parts: network number and host number, and the network number is the same, so it means that within a network segment, you can use mac data frames to communicate directly.

Given a network number

The ip with host number all 0 represents the network address

Ip with host number all 1 represents the broadcast address

The representation of the ip address:

Xxxxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx

|-- net-- |-host- |

The class An address network number begins with 0, the class B address network number begins with 10, and the class C address network number begins with 110.

The representation range of Class An address is 0.0.0.0address 126.255.255.255, and the default network mask is 255.0.0.0bot Class An address assigned to very large networks. A class A network uses the first set of digits to represent the address of the network itself, and the last three sets of digits as the addresses of hosts connected to the network. Assigned to large networks with a large number of hosts (direct individual users) and a small number of local area networks. For example, the network of IBM.

Class B addresses are represented in the range of 128.0.0.0percent 191.255.255.255, and the default network mask is 255.255.0.0X Class B addresses are assigned to a general medium-sized network. Class B networks use the first and second sets of numbers to represent the address of the network, and the last two sets of numbers represent the addresses of hosts on the network.

The representation range of class C address is 192.0.0.01223.255.255.255, and the default network mask is 255.255.255.0. the class C address is assigned to small networks, such as general local area network and campus network, which can connect the least number of hosts. It is managed by dividing the users into several network segments. Class C networks use the first three sets of numbers to represent the address of the network, and the last set of digits as the address of the host on the network.

In fact, there are class D addresses and class E addresses. However, these two types of addresses are used for special purposes and are only briefly introduced here: class D addresses are called broadcast addresses and are used by special protocols to send information to selected nodes. Class E addresses are reserved for future use.

The definition of netmark is very simple. Netmask is also 32 bits. Numerically, it is 1 in Net-ID and 0 in Host-ID.

For example, a common class C IP address

Net-id=24 bit, host-id=8 bit, with 2'8-2 '254 ip

A traditional class c network, such as 192.168.10.0, its netmark must be 255.255.255.0. If the network is divided into two subnetworks, it is very simple to set the net-id to use 25 bits, and the host-id has only 7 bits. Then at this time, the netmark= 255.255.255.1 0000000 = 255.255.255.128, the two subnets obtained this time are

129.168.10.0/25

192.168.10.128/25

Obviously, / 25 indicates the number of bits occupied by the net-id in this ip (the host-id of both ip is 0, so these two ip represent their subnetworks)

This representation makes it easy to calculate the size of subnetworks, such as

192.168.0.0 ip 27 represents 2 to the power of 5 (32-27005)-2 (the first and last addresses of each network segment are occupied for special purpose) = 62

192.168.0.0 ip 28, which represents the power of 2 to the power of-2 (32-28).

So 192.168.1.1 Compact 24 marks a subnet 192.168.1.0 (with 254 ip addresses: from 192.168.1.1 to 192.168.1.254)

Thank you for your reading. I believe you have some understanding of "how to classify and subnet ip addresses". Go ahead and practice it. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!

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