IP address classification

Time:2022-11-23

IP address classification

Classification prefix code start address end address default mask
Class A address 0 1.0.0.0 127.255.255.255 255.0.0.0/8
Class B address 10 128.0.0.0 191.255.255.255 255.255.0.0/16
Class C address 110 192.0.0.0 223.255.255.255 255.255.255.0/24

private IP address

  • Class A 10.0.0.0-10.255.255.255
  • Class B 172.16.0.0-172.31.255.255
  • Class C 192.168.0.0-192.168.255.255

special IP address

  • 0.0.0.0 refers to all IPV4 addresses on this machine in the server
  • 127.0.0.1 loopback address

Network address calculation

Example 1:
    Network address 192.168.10.0
    Subnet address 255.255.255.128/25 
    Binary 11111111 11111111 11111111 10000000
    network bit 25, host bit 7
    Number of subnets 2^1 = 2
    The subnet step size is 256 - 128 = 128, so the subnet can be 192.168.10.0, 192.168.10.128
    Network address range 192.168.10.1-192.168.10.126, 192.168.10.129-192.168.10.254 
    Network address 192.168.10.0 192.168.10.128
    Broadcast address 192.168.10.127 192.168.10.255
    Number of hosts 2^7 - 2 = 126