Example of dividing subnets, router IP addresses

Source: Internet
Author: User

The method of dividing subnets is to borrow several bits from the host number of the network as the subnet number, and the host number correspondingly reduces the same number of bits. Before subnetting, the IP address is a level two structure: network number, host number.

After dividing the subnet, level two IP address becomes level three IP address within this unit: network number, subnet number, host number.

IP Address ={< network number >,< subnet number >,< host number;}

The following is illustrated by the example of a campus network:

There are 12 colleges in a school, each with 5 faculties and multiple offices in each department. To ensure that every office computer can access the Internet, the superior gives a 172.16.0.0/16 network segment, to each college and the office of the Hospital allocation network segment.

1, the first division of the respective colleges of the network segment.

There are 12 colleges, then there is a minimum value of 2 n-th square ≥12,n = 4. Therefore, the network bit needs to borrow 4 bits to the host bit. Then you can draw 2 from the large network segment of 172.16.0.0/16 4 square = 16 subnets.

Detailed process:

First, the 172.16.0.0/16 is expressed in binary notation

10101100.00010000.00000000.00000000/16

After borrowing 4 bits (16 subnets can be divided):

1) 10101100.00010000. 00000000.00000000/20 "172.16.0.0/20"

2) 10101100.00010000. 00010000.00000000/20 "172.16.16.0/20"

3) 10101100.00010000. 00100000.00000000/20 "172.16.32.0/20"

4) 10101100.00010000. 00110000.00000000/20 "172.16.48.0/20"

5) 10101100.00010000. 01000000.00000000/20 "172.16.64.0/20"

6) 10101100.00010000. 01010000.00000000/20 "172.16.80.0/20"

7) 10101100.00010000. 01100000.00000000/20 "172.16.96.0/20"

8) 10101100.00010000. 01110000.00000000/20 "172.16.112.0/20"

9) 10101100.00010000.0000.00000000/20 "172.16.128.0/20"

10101100.00010000. 10010000.00000000/20 "172.16.144.0/20"

One) 10101100.00010000. 10100000.00000000/20 "172.16.160.0/20"

10101100.00010000. 10110000.00000000/20 "172.16.176.0/20"

10101100.00010000. 11000000.00000000/20 "172.16.192.0/20"

10101100.00010000. 11010000.00000000/20 "172.16.208.0/20"

10101100.00010000. 11100000.00000000/20 "172.16.224.0/20"

10101100.00010000. 11110000.00000000/20 "172.16.240.0/20"

We select 12 from these 16 subnets and give the first 12 to each of the colleges. The maximum number of hosts per subsidiary is 2 12 (the host number has 12) times = 4094.

2, the division of the school's offices within the respective network segment

Take 172.16.0.0/20 of a college as an example.

There are 5 departments, then there is a minimum value of 2 n-th square ≥5,n = 3. Therefore, the network bit needs to borrow 3 bits to the host bit. Then you can draw from the 172.16.0.0/20 this network segment 2 of the 3-time Square = 8 subnets, in line with the requirements.

Detailed process:

First, the 172.16.0.0/20 is expressed in binary notation

10101100.00010000.00000000.00000000/20

After borrowing 3 bits (8 subnets can be divided):

① 10101100.00010000.000000.00000000/23 "172.16.0.0/23"

② 10101100.00010000.000000.00000000/23 "172.16.2.0/23"

③ 10101100.00010000.00000100.00000000/23 "172.16.8.0/23"

④ 10101100.00010000.00000110.00000000/23 "172.16.12.0/23"

⑤ 10101100.00010000.000000.00000000/23 "172.16.0.0/23"

⑥ 10101100.00010000.000010.00000000/23 "172.16.2.0/23"

⑦ 10101100.00010000.00000.00000000/23 "172.16.8.0/23"

⑧ 10101100.00010000.00001110.00000000/23 "172.16.12.0/23"

We select 5 from these 8 subnets and give the first 5 to each of the departments. Each system accommodates a maximum of 2 hosts with 9 (host number 9) times = 512.

3, an IP address is assigned to each office, and a router is configured to exchange this IP address with the external network. The router's IP address is typically 192.168.1.1, this router for the office of the host is equivalent to the intranet gateway, to achieve communication between the two networks, you must pass through the gateways. If the host in Network a discovers that the destination host for the packet is not on the local network, forwards the packet to its own gateway, which is then forwarded by the gateway to Network B's gateway, and the gateway of Network B is forwarded to a host on network B. Office host IP address is based on the router's IP address 192.168.1.1, subnet mask 255.255.255.0 Division, the Office of the host access to the network, is connected through the router to access, the internal IP is not the network IP address.

Subnet Mask 2 binary: 11111111.11111111.11111111.00000000, front 8 1, so the host IP of the intranet can be:

11111111.11111111.11111111.00000010/24[192.168.1.2]

11111111.11111111.11111111.00000011/24[192.168.1.3]

...........

11111111.11111111.11111111.00100000/24[192.168.1.32]

............

Example of dividing subnets, router IP addresses

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.