What is IP address?

Internet is a network of computers around the world in general, these computers are through the TCP / IP protocol to communicate. The transmitted packet must contain address information, which sends the IP of the computer in time and the IP of the receiving computer.

The TCP / IP protocol states that an IP address is a 32-bit binary number and is unique within the Internet. And all hosts in the same physical network use the same network ID, any host on the network (including workstations, servers, and routers) must have a host ID corresponding to it.

In order to facilitate the memory, this 32-bit binary IP address is divided into four, each 8, the middle separated by decimal points, and then 8-bit binary number is converted to decimal number.

Example:

IP: 11000000.10101000.00000000 .00000001 => 192.168.0.1

IP address is divided into ABCDE five categories, including ABC class address is divided into two parts: the network address and host address, respectively, suitable for large, medium and small network use.

For example, if the IP address is 113.125.3.6, the information is as follows:
Network Address: 113.125.3.0
Host Address: 6
the IP address: 113.125.3.6

Class A IP addresses
Class A IP address from the network address before 8 and 24 after the host address, the network address of the highest level must be “0”, the address range from 1.0.0.0 to 126.0.0.0. There are 126 Class A networks available, each capable of hosting more than 100 million hosts.

Class B IP addresses
Class B IP address consists of the first 16 bits of the network address and the last 16-bit host address, the network address of the highest level must be “10”, the address range from 128.0.0.0 to 191.255.255.255. There are 16,382 Class B networks available, each of which can accommodate more than 60,000 hosts.

Class C IP addresses
Class C IP address consists of the first 24 bits of the network address and the last 8 bits of the host address, network address, the most significant bit must be “110.” The range is from 192.0.0.0 to 223.255.255.255. Class C network can reach more than 2.09 million, each network can accommodate 254 hosts.

Class D IP addresses (multicast)
before the Class D IP addresses 8 to “1110” is a special reserved address does not point to a specific network, currently used multicast (Multicase). Multicast addresses are used to address a single computer at a time, which identifies a group of computers that share the same protocol.

Class E IP address
before the 8 to “11110” to start, reserved for future use. The “0.0.0.0” address corresponds to the current host. The IP address “255.255.255.255”, which is all “1”, is the broadcast address of the current subnet.

In addition, ABC3 class retains three areas as a private address, they range as follows:

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

IP addressing rules

Network addressing rules of the network address must be unique network ID can not begin with a number 127 in a class A address, the number 127 is reserved for internal loopback test. The first byte of the network ID can not be 255. The number 255 is used as the broadcast address. The first byte of the network ID can not be “0”. 0 indicates that the address is a local host and can not be transmitted.

Host Addressing Rules host identification on the same network must be unique. The bits of the host ID can not all be “1”. If all bits are “1”, it is a broadcast address, not a host address. All bits of the host ID can not be all “0”. If all bits are “0”, it means only this network, and there is no host on this network.

Subnet mask

subnet mask is a 32-bit address, it can not exist alone, must be combined with IP used together. It only has a function, is to divide an IP into network address and host address two parts.Subnet mask and IP address of the same, the left is the network bit, with a binary 1; the right is the host, with binary 0 said. The corresponding subnet mask for IP: 192.168.1.1 is 255.255.255.0
In this way, the subnet mask to determine the IP address of a 32-bit binary system which is the network number, which is the host number. It is very important for hosts using TCP / IP protocol. Only through the subnet mask, can we show the relationship between the subnet of one host and other subnets, in order to use the network normally.
Common subnet mask

  • 255.255.255.0:  can provide 256 IP addresses, but actually available is 254, because not all host number of 1 or 0.
  • 255.255.0.0 actually available IP is 2550.

Subnet Mask settings when the LAN configuration, subnet mask set too large too small is not good, for example, there are more than 200 hosts, not more than 254, it is set to 255.255.255.0. Incorrect settings can result in transmission errors.