Tuesday, December 28, 2010

Subnet



To facilitate the expression and recognition, IP address is expressed as 210.52.207.2 decimal notation, each section can say decimal number biggest does not exceed 255. IP address consists of two parts, namely a Network number (ID) and Host number (ID) Host. The network number identification is Internet a subnet, but the host is in no logo subnet a station host. The address is decomposed into two domain, brought a important advantages: IP packets from the on a network to another network, choose path can be based on network instead of the host. In large Internet, this point advantage especially obvious, because the routing table only storage network information instead of host information, so can simplify routing tables.

summary

For general by routers and host composed of interconnected system, we can use the following methods defined system of subnet. In order to determine the subnet, separate mainframe and routers of each interface, resulting in several separate network island, interface is connected these separate networks of endpoints. These independent network in each called a subnet.

You must understand somewhat on IP address? We know that in the INTERNET is widely used in the TCP/IP protocol is using IP address to distinguish different hosts. If you've ever had TCP/IP protocol Settings, then you will meet a subnet mask this term, then you know what is a subnet mask? It has what function?

We know the IP address is a 4 bytes (altogether 32bit) Numbers, is divided into four segments, each section 8 bits to segment and segment with period space. To facilitate the expression and recognition, IP address is expressed as 210.52.207.2 decimal notation, each section can say decimal number biggest does not exceed 255. IP address consists of two parts, namely a Network number (ID) and Host number (ID) Host. The network number identification is Internet a subnet, but the host is in no logo subnet a station host. The address is decomposed into two domain, brought a important advantages: IP packets from the on a network to another network, choose path can be based on network instead of the host. In large Internet, this point advantage especially obvious, because the routing table only storage network information instead of host information, so can simplify routing tables.

Classified introduction

IP address according to the network number and host, the quantity is divided into A, B and C three categories: IP address represented in binary, each IP address bits long 32bit, converted to bytes, is four bytes. For example a by binary form of IP address is ", "such a long 00001010000000000000000000000001 address, people to handle up too easily. In order to make things convenient for the people use, IP addresses are often written decimal form, intermediate USES symbols ". "separate different bytes. Hence, the above IP address can be expressed as "10.0.0.1". IP addresses this representation is called "dotted decimal notation", which obviously than 1s and 0s, easy memory.

A kind IP address

A kind of IP address: with variable of seven (bit) to identify the network number, variable 24 bits logo host number, most front A to "0", namely, A kind of address of the first section values between 1 ~ 126 between. A kind of address for large network and provide usually worldwide, totaling only 126 only possible A kind of network, each of A kind of network 16777214 sets up can connect host.

Class B IP address

Class B IP address: with variable 14 to identify the network number, variable 16 logo host number, "10" is in front of the two. Class B address of the first section values between 128 ~ 191 between, paragraphs 1 and 2 together said the network number. Class B address applies to moderate scale of network, the world about 16,000 a class B network, each class B network most can connect 65534 Taiwan host.

Class C IP address

Class C IP address: with variable 21 to identify the network number, variable 8-bit logo host number, front three is "110". Class C address of the first section values between 192 ~ 223 between, the first paragraph, the second period, the third paragraph together said the network number. The last paragraph logo on the web host number. Class C network address applicable to such as small network, each class C network maximum of 254 Taiwan host.

Main purpose

From the above we know, IP address on the network number and hosts on the network, to mark the host, and only in a network number next between computers can "direct" Shared, different network number of computer through the Gateway (Gateway) can interchange. But such division in some cases don't seem very flexible. Therefore the IP network also allows divided into smaller network, called subnet, thus produced a subnet mask. Subnet mask the function of the one is used to judge whether any two IP address whether belong to the same son network, at this time only in the same subnet computer can "direct" interchange. So how do we determine the subnet mask?

Said before IP address points network number and host to a network number, divided into multiple subnet, so the network number will occupy the original host bits, such as for a class C address, it with 21 to identify the network number, can be divided into 2 subnets are required in 1 original host logo bits. At this time the network number bits into 22 for host labeled into seven. Similarly borrow two host a is a class C network can be divided into four subnets... The computer is how to just know whether this network divided subnet? This could see from the subnet mask. Subnet mask and IP address as 32bit, determine the subnet mask is the method of its and IP address to identify the network number all the corresponding bits with "1", and the corresponding number and host positions are "0". As is divided into 2 subnet type C IP address with 22 to identify the network number, the subnet mask for: 11111111 11111111 11111111 diffrent namely 255.255.255.128. So we can know, A kind of address of the default subnet mask for 255.0.0.0, class B for 255.255.0.0, C as 255.255.255.0. The table below is C class b address subnet division and related subnet mask:

Subnet digits subnet mask host several usable host number

1 255.255.255.128 128 126

2 255.255.255.192 64 62

3 255.255.255.224 32 30

4 255.255.255.240 16 14

5 255.255.255.248 8-6

6 255.255.255.252 4 2

You may have noticed that the above-mentioned points host number and usable host number two, is this why? Because but when address for all the host bits to "0", this address for the line (or subnet) address, and when all hosts bits for "1" for the broadcast address.

At the same time, we also can use variable-length subnet mask (VLSM) is a network can use different mask configurations. It's purpose is to make a network was partitioned into several subnet more convenient. In no VLSM circumstances, a network can only use a seed nets mask, this limits the number in any given subnet under the condition of host number. For example you are assigned a class C address, the network number for 192.168.10.0, and all you need now is classified as three subnets, one subnet 100 sets of host, the rest of the two subnet 50 Taiwan host. We know that a class C address has 254 available addresses, so how do you select a subnet mask? From the graph, we discovered when we all use a subnet subnet mask when this problem cannot be solved. Now VLSM sent up use, we can in 100 host subnet use 255.255.255.128 this mask, it can be used to 192.168.10.0 192.168.10.127 this 128 IP address, including usable host number for 126. We'll put the rest of the 192.168.10.128 to 192.168.10.255 this 128 IP address is divided into two subnet, subnet mask for 255.255.255.192. One of the subnet addresses from 192.168.10.128 to 192.168.10.191, another subnet addresses from 192.168.10.192 to 192.168.10.255. Subnet mask for 255.255.255.192 host addresses per subnet available for 62, such reached requirements. Can see reasonably using the subnet mask, can make the IP address more convenient for management and control.

No comments:

Post a Comment