So how to solve it? We all know that ip4 is expressed in dotted decimal system and is essentially a binary integer. We only need to convert IP expressed in decimal into binary integers and compare them with numerical values.
For a single ip, it is directly converted into an integer. For the form of ip+ mask (that is, ip range), the starting value and ending value of the range can be obtained to determine its range.
Here is the introduction as follows:
The network address is the starting value of the ip segment and the broadcast address is the ending value of the ip segment.
Like it, like it! ! !