IP addressing and sub-network partitioning

Source: Internet
Author: User

Network Five categories:

Class a:1.0.0.0-127.255.255.255 127 network segments

Class b:128.0.0.0-191.255.255.255 64 Network segments

Class c:192.0.0.0-223.255.255.255 32 Network segments

Class d:224.0.0.0-239.255.255.255 16 Network segments

Class e:240.0.0.0-254.255.255.255 15 Network segments


D/E is a reserved address, not used.

In Class A addresses, the first byte is the network part. The 2,3,4 byte (the next 24 bits) is provided for the network administrator and is used to divide it into subnets and hosts that you think are appropriate. A-class address is used for networks with more than 65,536 hosts (in fact, up to 16,777,214 hosts can be reached!) )

In class B addresses, the first two bytes are the network part. 3rd, 4-byte (16-bit) is provided for local subnets and hosts. Class B addresses are used for networks where the number of hosts is between 256 and 65534.

In a Class C address, the first three bytes are the network part. The 4th byte (8-bit) is available for local subnets and hosts-tailored to the network of less than 254 hosts!


Default Mask:

Class A: 255.0.0.0

Class B: 255.255.0.0

Class C: 255.255.255.0

Concept:

IP Address: IP address, used in an IP network, the only identification of a device, the IP address consists of 32-bit 2 binary number, this 32-bit binary number can be divided into the network and the host two parts of the subnet mask. These 32-bit binary numbers are divided into 4 bytes (one byte equals 8 bits)

10.1. 23.19 (10 binary)

00001010 00000001 00010111 00010011 (2 binary)

The decimal number for each byte is 0-255, or binary 00000000-11111111

Address: A unique ID number assigned to a host or interface in a network

Subnet: A part of a network that shares a specific subnet address

Subnet mask: A combination of 32-bit numbers used to describe the part of an address that is the host

Interface: One network connection

Subnetting: Allows you to create multiple logical networks in a single Class A, B, or C network. If you are not subnetting, you can only use one network from your A, B, or Class C network.


Sub-Network Division:

To subnetting a network, we need to extend the natural mask by using some bits of the host ID portion of the address to create the subnet ID.

For example:

A Class C subnet mask:

255.255.255.240 11111111.11111111.11111111.11110000

204.15.5.0

Since we have 4 bits to divide the subnet, only 4 bits are left to the host address for a long time.

A Class B network subnetting example:

Natural mask: 255.255.0.0 or 172.16.0.0/16, once the mask is extended to more than 255.255.0.0, the subnetting is indicated.

Such as:

172.16.0.0 11001100.00001111.00000101.00000000

255.255.248.0 11111111.11111111.11111000.00000000

We used 5 bits of the original host bit to create the subnet. This allows us to have 32 subnets (2 of five Parties). After using 5 bits to divide the subnet, there are 11 bits left in the host address. This allows us to have 2048 host addresses (2 of 11 Parties), 2046 of which can be assigned to the device for use. Because full 0 or all 1 are not allowed as host IDs.

Attention:

The more host bits used in the subnet mask, the more subnets you can create, but the more subnets you have, the fewer hosts are available per subnet.


Resolving Network and Host IDs:

8.20.15.1 = 00001000.00010100.00001111.00000001

Network id=00001000=8 (Class A address, first byte is network part)

Host id=00010100.00001111.00000001


Identify an IP or set another subnet:

172.16.17.30 10101100.00010000.00010001.00011110

255.255.240.0 11111111.11111111.11110000.00000000

Subnet = 10101100.00010000.00010000.00000000

= 172.      16.16. 0

Determine the subnet process: Remove the address bits corresponding to the mask 1 and place all other address locations at 0 (equivalent to the logical "and" operation between the address and the mask to get to which subnet the address belongs)


The reason for CIDR: The growth of the IP routing table in the network router and the growth of the Internet

Role: The adoption of alternative routing (CIDR) between untyped domains is to improve the utilization of address space and the scalability of routes in the network.

CIDR is free of the traditional IP classification (A,B,C class, etc.), in CIDR, an IP network is represented by a prefix, which consists of an IP address and a mask length. The length is the number of consecutive mask bits that are set to 1 from the leftmost position. Therefore, the network 172.16.0.0 255.255.0.0 can be represented as 172.16.0.0/16


CIDR also depicts a more hierarchical network architecture, where each domain obtains its IP address from a high layer, so that all domain summaries can be done at higher levels.



This article is from "Try to be brave" blog, declined reprint!

IP addressing and sub-network partitioning

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.