How do I assign an IP address to an interface?
Instead of directly assigning an ip address to each host, we continue to borrow the idea of common divisions, first classifying them and then subdividing them specifically within classes, so this leads to the concept of subnets.
IP subnets (Subnets)
- Device interfaces whose IP addresses have the same network number
We divide the ip address into two parts, the high bit part, we treat as the network number, all the same, then belong to the same subnet, the status bit is divided into the host number, distinguishing between different specific host interfaces.
- Network number (NetID) - high bit
- HostID - low bit