IP address Basics

Source: Internet
Author: User

The IP address is like a phone number, but the area code is required for dialing a phone number from another country. The subnet mask is required for accessing other network segments in the network. The IP address must be classified as if the IP address is 86 for a foreign phone number in China; there are only three types of IP addresses and some special IP addresses. The number of international and domestic phone numbers is too large, but it does not mean that the number of IP addresses is very small. On the contrary, the subnet mask is used,
We can combine them into subnets suitable for a variety of needs. With Special IP addresses, we can use the same IP address in different LAN. This section describes the basic knowledge of IP addresses, including what is an IP address, the purpose of an IP address, the relationship between an IP address and a subnet mask, and how to set an IP address in Windows and Linux.

Internet basics-IP address knowledge

When talking about the Internet, IP addresses cannot be mentioned because IP addresses are a very important concept from the perspective of learning and using the Internet, many INTERNET services and features are reflected by IP addresses.

I. Concept of IP addresses we know that the Internet is a general term for communication networks formed by the integration of computers around the world.When two computers connected to a network communicate with each other, some additional information is contained in the packets transmitted by them, the additional information is the address of the computer that sends the data and the address of the computer that receives the data. In this way, people allocate an ID address that is similar to the phone number in our daily life to every computer for convenience of communication. The ID address is the IP address we will introduce today. According to TCP/IP protocol, IP addresses are composed of 32-bit binary numbers and are unique over the INTERNET. For example, the IP address of a computer connected to the Internet is 11010010 01001001 10001100 00000010, which is obviously hard to remember. In order to facilitate memory, people divide the 32-bit binary code that makes up the IP address of a computer into four segments, each segment has eight digits, separated by decimal places, and converted each eight-bit binary code into decimal digits, in this way, the IP address of the above computer becomes 210.73.140.2. ii. Classification of IP addresses we have said that the Internet is a large inter-network that connects countless networks around the world. Computers in each network are uniquely identified by their own IP addresses, we can also imagine that each network also has its own identifier on the INTERNET in this large inter-network. This is very similar to the phone number in our daily life. For example, if a phone number is 0515163, the first four digits in the number indicate the region of the phone number, the following number indicates a telephone number in the region. Similar to the preceding example, we divide the IP address of a computer into two parts: the network ID and the host ID. All hosts on the same physical network use the same network ID. The four bytes of the IP address are divided into two parts, and one part is used to indicate the specific network segment, that is, the network ID; the other part is used to indicate the specific node, that is, the host ID, that is, the specific computer number in a network. For example, the IP address of the server in Yancheng Information Network Center is 210.73.140.2. For this IP address, we can divide it into two parts: the network ID and the host ID, so that the above IP address can be written: network ID: 210.73.140.0 host ID: 2 write together: 210.73.140.2 some networks may contain more computers because the networks contain different computers, some networks contain fewer computers, so people divide 32-bit address information into three positioning methods based on the size of the network, the three classification methods correspond to Class A, Class B, and class C IP addresses respectively.

1. A Class a ip address is A Class a ip address. In the four segments of the IP address, the first segment is the network number, and the remaining three segments are the numbers of the local computer. If A binary IP address is used to represent an IP address, A Class a ip address consists of A 1-byte network address and A 3-byte host address. The maximum IP address must be 0 ". In Class a ip addresses, the network ID length is 7 bits, the host ID is 24 bits, and the number of class A network addresses is small. It can be used in large networks with hundreds of thousands of hosts.

2. A Class B ip address is a Class B IP address. In the four segments of an IP address, the first two segments are network numbers, and the remaining two segments are the numbers of the local computer. If the IP address is expressed in binary format, the B-type IP address consists of a 2-byte network address and a 2-byte host address. The maximum IP address must be "10 ". In type B ip addresses, the network ID length is 14 bits, and the host ID is 16 bits. Type B network addresses are suitable for medium-scale networks, each network can accommodate more than 60 thousand computers.

3. A Class c ip address refers to a class c ip address. In the four segments of an IP address, the first three segments are network numbers, and the remaining segments are the numbers of the local computer. If the IP address is expressed in binary format, the class c ip address consists of a 3-byte network address and a 1-byte host address. The maximum network address must be 110 ". In Class c ip addresses, the network ID length is 21 bits, the host ID is 8 bits, and the number of class C network addresses is large, which is suitable for small-scale local networks, each network can contain up to 254 computers.

In addition to the above three types of IP addresses, there are also several special types of IP addresses, the TCP/IP protocol stipulates that all the addresses starting with "lll0" in the first byte of the IP address are called multi-point broadcast addresses. Therefore, any IP address whose first byte is greater than 223 or less than 240 is a multicast address. The IP Address "0.0.0.0" for each byte is 0 corresponds to the current host; each byte in the IP address is 1 IP Address "255.255.255.255") is the broadcast address of the current subnet. All IP addresses that use "llll0" will be reserved for future use.

Iii. IP address addressing rules 1. network addressing rules A. The network address must be unique.

B. The network ID cannot start with a number 127. In Class A addresses, the number 127 is reserved for the internal return function.

C. The first byte of the network ID cannot be 255. The number 255 is used as the broadcast address.

D. the first byte of the network ID cannot be "0". "0" indicates that the address is a local host and cannot be transferred.

2. Host addressing rule A. The host ID must be unique within the same network.

B. each bit of the host ID cannot be "1". If all the bits are "1", the address of the host is the broadcast address, not the host address.

C. each bit of the host ID cannot be "0". If each bit is "0", it means "only this network", and there is no host on this network.

Iv. IP subnet mask Overview1. the concept of subnet mask is a 32-bit address, used to shield part of the IP address to distinguish the network ID and host ID, and shows whether the IP address is on the LAN or remote network.

2. determine the number of subnet masks Used by the number of subnet masks depends on the number of possible subnets and the number of hosts in each subnet. Before defining the subnet mask, you must determine the number of subnets and the number of hosts used.

To define the subnet mask, follow these steps: A. determine which group addresses are used by us. For example, if the requested network is "210.73.a. B", the network address is a class c IP address, the network ID is "210.73", and the host ID is "a. B ".

B. Define the subnet mask based on the number of subnets we need and the number of subnets that may be extended in the future. For example, we need 12 subnets now and 16 subnets in the future. Determine the subnet mask with the first four digits of the third byte. The first four digits are set to "1", that is, the third byte is "11110000". This number is now called the New Binary subnet mask.

C. Set each bit of the corresponding initial network to "1", that is, the first two bytes are set to "1", and the fourth byte is set to "0 ", the uninterruptible binary form of the subnet mask is: "11111111.111111.112.16.00000000"

D. Convert the number into a break decimal format: "255.255.240.0"

This number is the subnet mask of the network.

3. Note A of the IP mask. The IP address without A subnet can be written as A mask with the host number 0. For example, if the IP address is 210.73.140.5 and the mask is 255.255.255.0, you can also use the default mask to write only the IP address.

B. When the annotation method with subnets has subnets, the two must be paired. Take Class C address as an example.

1. The first three bytes in the IP address indicate the network number. The last byte indicates both the subnet number and the host number, and whether the two IP addresses belong to one CIDR block. If they belong to the same network range, the information exchange between the two addresses will not pass through the router. If it is not in the same network range, that is, the subnet number is different, the information exchange between the two addresses will be carried out through the router. For example, for a host whose IP address is 210.73.140.5, its host ID is 00000101, for a host whose IP address is 210.73.140.16, its host ID is 00010000, and the first three digits of the above two Host IDS are all 000, the two IP addresses are in the same network area.

Host address, such? The host ID of 10.73.60.1 is 00000001,210.73. The first three digits of the two host IDs are different from those of the 011, indicating that the two are in different network areas and information needs to be exchanged through the router. Each of its subonline host numbers is 1 and 252. 2. the mask function is to indicate that there are subnets and several subnets, but the number of subnets can only be expressed as a range. Instead of specifying the specific subnets, the mask does not indicate the specific subnet number, subnet Mask format for Class C addresses): the first few digits of the host ID are subnet numbers, and no host is written at the end. All digits are 0. v. Other matters of IP address 1. generally, the Internet Information Center allocates IP addresses based on the network. Therefore, Class A, Class B, and class C can be used only when it comes to network addresses. 2. when A network address is assigned, the network ID is fixed, and the computer ID can be changed within A certain range. The following are the three types of network addresses: Class A addresses: 73.0.0.0 Class B address: 160.153.0.0 Class C address: 210.73.140.0 each of the above 0 can be in 0 ~ Change between 255.

3. because the first three digits of an IP address determine the network type of an IP address, the-class network address cannot be further divided into B-class IP addresses, class B IP addresses cannot be further divided into Class C IP addresses.

4. when talking about A specific computer ip address, Class A, Class B, and class C should not be used, but it can be said that the Host address belongs to which class A, Class B, and class C network.

Through the above study, you must have an understanding of IP addresses. With an IP address, you can send emails and obtain other information on the Internet, such as the WWW Service, BBS service, and FTP service on the Internet.

Related Articles]

  • Manage IP addresses with firewalls
  • Easy management of computer networks with active IP addresses
  • IP Network Design Series-IP Address Management

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.