0 basic IP Address

Source: Internet
Author: User

The IP address is the credential for accessing the Internet! Through learning IP addresses, you can have a simple understanding of the network topology and a preliminary understanding of the network transmission process.

Brief Introduction to Data Transmission

Data transmitted on the network exists in the form of data packets! It contains the destination IP address, source IP address, and data to be transmitted. After the route selection of several routers, the data is transmitted to a specific host through the network device!

Representation

Theoretically, the IP address is represented by a 32-bit binary number. However, 32 binary codes with only 0 and 1 seem to be a headache.

To make it easier to understand, experts have designed a four-segment decimal number representation method, each of which consists of eight decimal digits, that 2 ^ 8 = 256, up to 256 entries per segment: 0 ~ 255, just like

Decimal: 192.168.24.1

Binary: 1100000 10101000 00011000 00000001

This makes it clearer.

Classification: network number + host number

It is divided into the network number + host number (before the network number) to adapt to different regions. At the same time, we must understand the classification process from the binary perspective. (A, B, and C IP addresses)

Category

Class

Class B

Class C

Required (starting with binary)

0

10

110

Network number (Binary)

7-digit

14 digits

21-bit

Network address range (decimal)

0 ~ 127

128 ~ 191

192 ~ 223

Take Class A as an example to specify that the 1st-bit binary value is 0. (as for the reason, I want to mark the Class A address and use it for differentiation, different people have different opinions.) The network number is represented by 7 bits. The maximum value is 2 ^ 7 = 128, and the network number is 0 ~ 127. It occupies the first segment in four decimal segments, and the host number in the last three segments is 0.0.0 ~ 255.255.255, IP can be represented as 0.0.0.0 ~ 127.20.255.

Everything will inevitably have special circumstances. In this case, we will leave all IP segments with network numbers 0, 10, and 127 out of the box! In this way, Class A can only be allocated to 125 different regions!

In this way, there can be 2 ^ 24 hosts in each region, but few such regions use so many hosts. For example, a State uses 2 ^ 24 hosts, if you hire a network administrator for management, the management will be inconvenient. It can only be used in 125 different regions!

In this way, Class B can allocate 2 ^ 14 regions with 2 ^ 16 hosts in each region. Class C can be allocated with 2 ^ 21 regions, and each region has 2 ^ 8 = 256 hosts.

The same is true for a school data center. Each data center has 200 computers, and only one class c ip address is required!

Subnet Mask

To distinguish the network that each network belongs to, set all network numbers to 1, and set all host numbers to 0 as the network subnet mask to distinguish the three types of IP addresses. Just like a phone number, each area number corresponds to a region. Each subnet mask corresponds to a type of IP address.

For example, IP 192.168.24.1

Subnet 255.255.255.0

Efficient IP Address: Three-Level IP address for dividing subnets

If a small data center only uses 30 hosts, it is sufficient to use 5-bit binary representation of the host number 2 ^ 5 = 32, A Class c ip address can be used to indicate 254 (host numbers are all 0 and all 1 are reserved for special use) hosts. If you only use 30 computers to allocate IP addresses, the 224 IP addresses will be wasted!

To this end, someone has proposed the concept of subnet. The last five digits represent the host number, and others are used as the network prefix. In this way, the IP address can be greatly reduced! Similarly, to indicate the network prefix, the host number and network number can be distinguished using the/+ number format. Like:

192.168.24.1/28 indicates that the first 28 digits are the network address, and the last 4 digits (Binary) are the host number.

Of course, IP address division is not just that simple, but through these can have a simple understanding of the network!

0 basic IP Address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.