Mask binary conversion
🌐 Network segment calculation
💡 Instructions for use
- Addresses and masks support two writing methods: address with slash digits, or address with a dotted mask; both writing methods will give complete mask conversion results.
- Fill in the number of splitting digits and you will see a list of subnets divided by that number of digits, which is convenient for planning network segments and address allocation.
- Filling in an address can determine whether it falls within the current network segment, which is suitable for troubleshooting connectivity problems caused by incorrectly configured masks.
- Common supernets and network segment divisions that are multiples of eight will give the corresponding total number of addresses, which can be directly used for capacity planning.
- Private addresses, loopback addresses, link-local addresses, and multicast addresses are automatically marked to avoid misuse in public network environments.
Mask binary conversion expands the address and mask into thirty-two bits, making the distinction between network bits and host bits visible at a glance.
What can be seen in bit view
After expanding the three rows of address, mask and network address side by side, you can intuitively see the boundary between consecutive ones and consecutive zeros in the mask, and the part of the address on the left side of the boundary is retained and the part on the right side is cleared. For prefixes that are not multiples of eight, such as twenty-six bits, the boundary will fall in the middle of a certain byte. This is what is difficult to detect by just looking at the decimal notation. Tools are displayed in groups of eight digits to facilitate step-by-step verification.
Two common uses
- Teaching and explanation: Show how bit operations are used to obtain network addresses.
- Troubleshoot exceptions: When the mask is written incorrectly, the bit view will immediately expose discontinuous ones, which is faster than comparing decimals piece by piece. It can also be used to determine which network segment an address falls on.
Writing the address in binary allows you to clearly see the boundary between network bits and host bits, and understand the calculation process of masks and network addresses. Decimal is just a convenient representation for writing.
When converting manually, it is recommended to process it by segments: each segment has eight digits, convert them separately and then splice them together. Processing piece by piece is less error-prone and easier to check than converting the entire string.
Processing by segments: Each segment of eight bits is converted separately and then spliced, which is less error-prone than converting the entire string. It also makes it easier to gradually check the boundaries between network bits and host bits.
The demarcation between network bits and host bits is clear at a glance.
The demarcation of non-octet prefixes falls in the middle of the bytes, and the bit view is easier to check than the decimal notation.
📖 Glossary
- subnet mask
- A string of bits of the same length as the address is used to distinguish the network part from the host part: the first half is a continuous one to represent the network bit, and the second half is zero to represent the host bit.
- network address
- The address obtained by setting all host bits to zero is used to identify the entire network segment itself and cannot be assigned to a host.
- broadcast address
- The address obtained after setting all the host bits is used to send data to all hosts in the network segment and cannot be allocated.
- Number of available hosts
- The number of addresses that can be assigned to a device in a network segment is equal to the total number of addresses minus the network address and broadcast address.
- anti-mask
- The bitwise inversion of the subnet mask is often used in access control lists and routing configurations.
- prefix length
- The number after the slash indicates the number of bits in the network part. The fewer the number of bits, the larger the network segment.
- supernet
- Merge multiple continuous network segments into a larger network segment, which can be represented by a shorter mask and is often used for route summary.
- private address
- The address segment reserved for internal network use is not routed by the public network and requires address translation to access the external network.
- loopback address
- Points to the address segment of the local machine itself, used for local testing and service monitoring, and will not go through the physical network card.
- multicast address
- The address segment used for one-to-many sending, hosts in the same group can receive the same data at the same time.
🔗 All keywords and tutorials
❓ FAQ
- What do the dots in the bitmap represent??
- It is only used for grouping by eight digits to facilitate segment-by-section correspondence with decimal writing and does not affect the value itself.
- Why not just look at decimal??
- Decimal is easy to write, but the boundary between network bits and host bits is not intuitive, especially with non-octet prefixes.