IP address
Network bits host bits and subnet mask
The part of the subnet mask (binary) that is 1 is the network bit, and the part that is 0 is the host bit. The subnet mask must be consecutive 1s and consecutive 0s.
IP address classification
Reserved and private addresses
0.00.0 - 0.255.255.255 reserved address
127.0.0.0 - 127.255.255.255 are reserved addresses for loopback testing and for internal communication within the host. All packets with source or destination addresses starting with 127 cannot be sent out from this device.
In order to improve the utilization of IPV4 addresses, Class A, B, and C addresses are divided into public network addresses and private network addresses.
Public network addresses are used for communication on the Internet, and private network addresses are used for internal communication within the enterprise.
scope:
A Private network address: 10.0.0.0/8-10.255.255.255/8
B private network address: 172.16.0.0/16--172.31.255.255/16
C Private network address: 192.168.0.0/24-192.168.255.255/24
Private and public IP addresses
The public network IP is unique and is at a higher network level than the private network.
IP address type
Network address, broadcast address, available ip addresses
Calculation of available IP addresses
special IP address
There are some special IP addresses in the IP address space. These IP addresses have special meanings and functions. Examples are as follows.
special IP address |
address range |
effect |
limited broadcast address |
255.255.255.255 |
Can be used as the destination address and sent to all hosts in this network segment (limited by gateway) |
any address |
0.0.0.0 |
The network address of "Any Network" The IP address of "This host interface on this network" |
loopback address |
127.0.0.0/8 |
Test the equipment’s own software system |
local link address |
169.254.0.0/24 |
When the host fails to automatically obtain an address, it can use an address in the network segment for temporary communication. |
Subnetting
Dividing subnets can save IP addresses and avoid waste
A network address is called a subnet and can be assigned. Ordinary IP addresses are not subnets.
Subnetting by borrowing bits from the host
The first IP of each network segment is the network address, and the last IP is the broadcast address (not used as an available IP)
Different subnets cannot communicate with each other
ip address configuration command