Sub-Network breakdown

Source: Internet
Author: User

First Look at:

IP Address usage rules

The network number is reserved for all 0 addresses and cannot be used as an identity network;

The host number is reserved for all 0 addresses, as the network address;

The network number is 1, the address of thenode number is 0 indicates the subnet mask;

Host number 1 addresses are broadcast addresses, such as 172.16.255.255, called direct broadcasts or directed broadcasts, indicating a 172.16.0.0 Broadcast from all hosts in the network, such broadcasts can span routers .

The address 0.0.0.0 represents the default route, and only a full 0 network address can be used during the startup process to allow the computer to send datagrams without knowing its own address. That is, the source station address at startup

Addresses are all 1, and address 255.255.255.255 represents a local broadcast, which is a restricted broadcast, which by default cannot cross a router .

Subnet Mask (Subnet mask) Overview

The subnet mask is used to differentiate which part of an IP address is the network part and which part is the host part. The subnet mask consists of 1 and 0 , a long line of digits, and a bit representing the network portion of the front-to-back continuous 1 .

The default subnet mask, not all networks require subnets:

The default subnet mask for class A IP addresses is 255.0.0.0;

The class B IP address is 255.255.0.0;

the class C is 255.255.255.0.

The subnet mask uses the same addressing format as the IP address, the portion of the subnet mask of 1 corresponds to the network (and subnet) portion, and the subnet mask of 0 corresponds to the host portion.

such as: aIPaddress is10.2.45.1, the subnet mask is255.255.252.0, the "and" Operation gets:10.2.44.0, the network device considers theIPthe network number and subnet number of the address are10.2.44.0, belonging to10.2.44.0/22Network, where/22indicates that the subnet mask length is Abits, i.e. from the front to the back continuous Aa1.

00001010.00000010.00101101.00000001 (10.2.45.1)

And:

11111111.11111111.11111100.00000000 (255.255.252.0)

—————————————————————————————————————

00001010.00000010.00101100.00000000 (10.2.44.0)


Benefits of subnetting (subnetting)

Reduce network traffic

Improve network performance

Improve security

To improve The efficiency of IP address utilization, a network can be divided into multiple subnets. With borrow, the borrow becomes the new subnet bit from the highest bit of the host, and the remainder remains the primary. This allows The structure of the IP address to be divided into three parts: network bit , subnet bit , and host bit .

Subnets are divided into subnets with a subnet number of 0 or all 1 in principle not available.

By default,192.168.0.0 belongs to the class C address, and the subnet mask is a number of digits. At this point:

11000000.10101000.00000000.00000000

|--------- Network bit --------------------------| -- host bit --|

To divide the 192.168.0.0/24 into subnets, take three bits from the original host part as the new

Sub-network bit.

11000000.10101000.00000000.00000

|--------- Network bit -------------------------|-----|--------|

the new host section

New Subnet Section

Can be divided out the,001,010,011, -,101, the,111Total8Subnets . At this point, the network section is24+3=27bit, the subnet mask is/27, expressed as a decimal255.255.255.224, the host part is5bit

See examples:

such as: To divide the class B IP address 168.195.0.0 into Subnets . (Method One, by the number of subnets to calculate)

Formula:2n (2 n -square)-2≥x, where x To the desired number of subnets,n is the number of subnet bits required to borrow.

168.195.00000000.00000000

From the original host section, from the front to back to borrow subnet bits.

This example requires a subnet , according to the formula, need to borrow 5 bits, can be divided into the following subnets:

168.195.00000 000.00000000

168.195.00001 000.00000000

168.195.00010 000.00000000

......

168.195.11110 000.00000000

168.195.11111 000.00000000

A total of 25=32 subnets , of which the effective subnet of each , the mask is /21.

For example, the 200.0.0.0/24 must be divided into a subnet, assigned to the ABCD four departments .

Here's how:

The host bit is 8 bits before it is divided . Now you need to divide the subnets, start with the master camera. the 8 -bit host portion can be treated as a new IP address,8 bits, the first bits are the network part , and the latter bits are the host part, as shown below.

200.0. 0.00000000

Host Section

Because subnets need to be assigned to four departments, 4 subnets are required . And since subnets with subnet number 0 and full 1 are not available, at least 6 subnets are required.

According to the company 2n-2 ≥ the required number of subnets, at this time n=3, can be divided into 8 subnets .


Network number host address range broadcast address

The subnet number is all 0, do not use

001 200.0.0.32/27 001 00001~001 11110 001 11111

010 200.0.0.64/27 010 00001~010 11110 001 11111

011 200.0.0.96/27 011 00001~011 11110 001 11111

200.0.0.128/27 00001~11110 001 11111

101 200.0.0.160/27 101 00001~101 11110 001 11111

200.0.0.192/27 00001~11110 001 11111

111 Subnet number is all 0, do not use

Notice that the host address range for each subnet is00001~11110, the broadcast address is11111, the address range for each subnet is easy when you have the network number for each subnetLaunch. Such as -subnet, the network address is200.0.0.128/27, the first host in this subnet (Host)IPto be128+1=129, i.e.00001, using the binary10000000(Network DepartmentScore of+00000001(host part); Last hostIPto be128+30=158, i.e. -11110, using the binary10000000(Network section)+00011110(host part);Broadcast address is128+31=159, i.e.11111, using the binary10000000(Network DepartmentScore of+00011111(the host part is all1address is the broadcast address). Also, if you use a broadcast address to add1, it becomes the network address of the next subnet.

another way of thinking : To divide the 200.0.0/24 into four departments, it is necessary to

You want to divide the network into 8 subnets. And the size of each subnet is equal, which means that the

200.0.0/24 Network in the central Plains of the eight IP addresses.

Such as:

look at an example: If you need to divide a class C address into a subnet , ask the network address, host address range, and broadcast address of the third effective subnet.

Steps to resolve:

1, the need for a sub-network, you need a subnet bit 5, the remaining host bit is 3, the size of the subnet is 8.

2,8*3=24, the address of the third valid subnet is 24/29. (first question) this 29=24+5

3,24+8=32, the address of the next subnet is 32/29.

4.The broadcast address is the network address of the latter subnet minus 1 . (third question)

5, the host address range is from .



Reference Hh010bbs

Sub-Network breakdown

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.