Some basic knowledge of IP

Source: Internet
Author: User

1. Host IP Address

IP Address: Every computer on the Internet is given a unique 32-bit Internet address, called an IP address.

(1) The composition of the IP address

The IP address consists of two parts, 1

Network Address (Net-id) Host address (Host-id)

32 Guests

Net-id indicates which network the computer belongs to, and Host-id identifies the computer on that network.

The IP address is a 4-byte, 32-bit binary number string that is typically divided into 4 "8-bit binary" (that is, 4 bytes). For ease of memory, IP addresses are usually written as 4 decimal integers separated by decimal points.

Classification of IP

-bit 0 1 2 3 4 5 6 7 8~15 16~23 24~31
Class A 0 Net-id, accounting for 7-bit Host ID, accounting for 24 bits
Class B 1 0 Net-id, accounting for 14-bit Host ID, accounting for 16 bits
Class C 1 1 0 Net-id, accounting for 21-bit Accounted for 8 people
Class D 1 1 1 0 Multi-point broadcast address, accounting for 28-bit
Class E 1 1 1 1 0 To stay for experimentation or future use

Range of IP address values

Address category Range of values
Class A 0.0.0.0~127.255.255.255
Class B 128.0.0.0~191.255.255.255
Class C 192.0.0.0~233.255.255.255

Special provisions:

Host ID is set to 1 address for broadcast address, broadcast communication for corresponding network

A host ID setting of 0 indicates the network on which the computer resides. Called Network address

Class A network address 127 is a reserved address for network software testing and communication of local processes, called loopback addresses.

(2) Private and public address

Private address: Can only be used in LAN, WAN can not be used. There are the following:

Class A: 10.0.0.1~10.255.255.254

Class B: 172.16.0.1~172.31.255.254

Class C: 192.168.0.1~192.168.255.254

Public address: Other than the private address.

2. Subnet mask

Http://baike.baidu.com/link?url=RPTgZ15T7e5-vJq80z7DUlJN7sSwSFowuXxEkHjpgFvTZ53vjvVIiJNBK7TOpog0iNsCI6pZrz02YgdhcJNQ2K

Detailed information.

For Class A addresses, the default subnet mask is 255.0.0.0; for Class B addresses, the default subnet mask is 255.255.0.0; for Class C addresses, the default subnet mask is 255.255.255.0.

The subnet mask setting must follow certain rules. As with the binary IP address, the subnet mask consists of 1 and 0, and 1 and 0 are contiguous respectively. The length of the subnet mask is also 32 bits, the left is the network bit, the number "1" means that 1 of the number is equal to the length of the network bit, the right is the host bit, the binary number "0" means that the number of 0 equals the length of the host bit. The purpose of this is to allow the mask and IP address to do bitwise AND operation with 0 to cover the number of the original host, without changing the number of the original network segment, and it is easy to determine the number of subnets by 0 digits (2 of the host bit-2, because the host number is 1 when the network broadcast address, all 0 indicates the network number, This is the two special addresses). Only through the subnet mask can you indicate the relationship of the subnet that the host resides with the other subnets, and make the network work properly.

Some basic knowledge of IP

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.