How to divide subnets

Source: Internet
Author: User

1. Assume that the network address 200.200.200.0 is obtained.
The subnet mask is 255.255.255.0. Currently, one subnet has 100 hosts and the other four subnets have 20 hosts. How can we divide subnets to meet the requirements. Write the subnet mask, network address, first host address, last host address, and broadcast address of the five subnets. (The subnet number can be all 0 and all 1 ).Write the final answer directly.

Before proceeding, you must specify the IP address naming method, the essence of subnet division, and the role of subnet mask.

The IP address format is (32bit) =
Net-ID + host-ID

When the outside world wants to communicate with my computer, he first finds the same vro as my net-ID, and then finds my host-ID through the vro.

IP addresses are generally divided into three categories: Class A: IP (32bit) = net-ID (8bit)
+ Host-ID (24bit)

Generic: IP = x. 0. 0. 0
The following 0 is the host number.

Class B: IP (32bit) = net-ID (16bit)
+ Host-ID (16bit)

Generic: IP = x. x. 0. 0
The following 0 is the host number.

Class C: IP (32bit) = net-ID (24bit)
+ Host-ID (8bit)

Generic: IP = x. 0
The following 0 is the host number.

After understanding the IP address format, we can understand the essence of subnet division.

The subnet is divided to solve the problem where the network IP address is insufficient,In fact, in A, B, or C class, the host number originally allocated to it is used as the network number.In this way, the network IP address is not enough.

For example, we use a Class B IP Address: X. x.0.0
The host-ID contains 16 bits. In this case, you can use several BITs as the net-ID and the rest as the host-id.
(Now you may ask, if you have split the number of host numbers, isn't the number of hosts that can be connected less? In this case, dividing subnets is to increase the number of networks at the expense of the number of hosts. This is also true. Many enterprise units do not have so many hosts, but they only need a large network ID, which is also caused by insufficient IP addresses)

Well, knowing that the essence of subnet division is to split host-ID into several digits for net-id. How does the outside world relate to hosts in the allocated subnet?

In the absence of a subnet mask, to contact a host in the subnet, you must use a general network router that has not been divided before. Then, the router can find the hosts in the network, this is very inefficient. Can we allow subnets to communicate with the outside world through their own routes? The mask is designed to solve this problem.

Each subnet needs to communicate with the outside world independently. It must let the outside world know that you are a divided subnet and your specific network ID. However, the route table does not have specific subnet information, so the outside world cannot contact you through your router. In the subnet IP address you have divided, the mask is marked with 1,
0 corresponding to the host-id. Then add the mask in the routing table, so that the outside world can easily know your specific network ID. This is the role of the mask.

Next let's look at the example. 200.200.200.0 is a class C address. We need to divide one subnet into 100 hosts, and the other four subnets into 20 hosts. We can divide the network into two subnets first. One subnet for the 100 host and the other four sub-networks for the other 20 hosts.

The Class C address has an 8-bit host number, and the subnet is used to separate the host number for the network ID.

Here is a formula for the number of hosts in the subnet: the number of hosts in the subnet = the X power of 2-2 (x is the number of digits of the host number)

Now the number of hosts is 100. We take the X power of 2 to the power of 2, which is slightly greater than 100. X = 7.

That is to say, if the host number is 7 digits, this subnet can connect to 100 hosts. Originally there were eight digits, and the remaining one was used as the network number. (It is also a coincidence that this one can mark the red part under two subnets (0 or 1 !)

Net ID
200.200.200.00000000

Netmask quota 0000000000000000

Subnet 1:

Net ID 200.200.200.00000000

Netmask quota 00000000000
(The mask is to use 1 to identify the network ID. See the blue part)

Subnet 2:

Net ID 200.200.200.0000000

Netmask quota 00000000000

Next, divide the system into four subnets, and use any of the above subnets. Use subnet 2 here.

Based on the formula above, the number of hosts in the subnet = the X power of 2-2

Take the power of X of 2-2 is slightly greater than 20, that is, x = 5.

That is to say, the host number is five digits, and the host number is seven digits. The remaining two digits are used as the network ID,

Subnets 2.1:

Net ID 200.200.200.0000000

Netmask quota 20171000011100000

Subnets 2.2:

Net ID 200.200.200.10100000

Netmask quota 20171000011100000

Subnets 2.3:

Net ID 200.200.200.11000000

Netmask quota 20171000011100000

Subnets 2.4:

Net ID 200.200.200.11100000

Netmask quota 20171000011100000

In this way, the subnet division is complete.

Next, write the subnet mask, network address, first host address, last host address, and broadcast address of the five subnets.

Remember this one:

Host No. 0 indicates the network address, network address + 1 indicates the address of 1st hosts, host no. 1 indicates the broadcast address, and broadcast address-1 indicates the last host address.

Sub-network 1 host no. Is all 0: net ID
200.200.200.00000000
The last eight zeros are in binary format, and the network address is in decimal format, and the plus 1 is the host address. The broadcast address must note that the red 0 is already the network ID, the host number is the last seven zeros. If the host number is set to 1, it is the broadcast address.

And so on.

Subnet Mask

Network Address

First host address

Last host address

Broadcast address

2017100000000128

200.200.200.0

200.200.200.1

200.200.200.126

200.200.200.127

255.255.255.224

200.200.200.128

200.200.200.129

200.200.200.158

200.200.200.159

255.255.255.224

200.200.200.160

200.200.200.161

200.200.200.190

200.200.200.191

255.255.255.224

200.200.200.192

200.200.200.193

200.200.200.222

200.200.200.223

255.255.255.224

200.200.200.htm

200.200.200.225

200.200.200.254

200.200.200.255

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.