User:Mancini/Subnetwork
From Wikipedia, the free encyclopedia
A subnetwork is a logical partitioning of a computer network. Subnetting is the process by which a computer network is logically divided regardless of the physical layout of a network. It was originally introduced before the introduction of classful network numbers in IPv4, to allow a single larger network to have a number of smaller networks within it.
It has had an impact in mitigation of the IPv4 address shortage problem , along with private networks and NAT.
Contents |
[edit] Network address
Computer and devices that are part of networks all have a network address. The network address is unique to that device and can either be dynamically or statically configured. This address allows the device to communicate with other devices connected to the network. The most common network addressing scheme is IPv4. The IPv4 network address consists of a 32 bit address divided into 4 octets and a subnet mask of like size. In order to facilitate the routing process the address is divided into two pieces. The network address and the host address. This works much like a postal address where the network address would represent the city and the host address would represent the street address. The subnet mask is used in conjunction with the network address to determine which part of the address is the network address and which part is the host address.
[edit] Binary subnet masks
While subnet masks are often represented in dot-decimal form their use becomes clearer in binary. Looking at a network address and a subnet mask in binary a device can determine which part of the address is the network address and which part is the host address. To do this, it performs a logical "AND" operation.
Example
Dot-decimal Address | Binary | |
---|---|---|
Full Network Address | 192.168.5.10 | 11000000.10101000.00000101.00001010 |
Subnet Mask | 255.255.255.0 | 11111111.11111111.11111111.00000000 |
Network Portion | 192.168.5.0 | 11000000.10101000.00000101.00000000 |
Subnet masks consist of a series of 1s in binary followed by 0s. The 1s designate that part of the address as being part of the network portion and the 0s designate that part as being part of the host address. Subnet Masks do not have to fill a given octet. This allows a classful network to be broken down into subnets. A classful network is a network that has a subnet mask of 255.0.0.0, 255.255.0.0 or 255.255.255.0. Subnet masks can also be expressed in a shorter form, which is known as Classless Inter-Domain Routing (CIDR) notation, gives the network number followed by a slash ("/") and the number of 'one' bits in the binary notation of the netmask (i.e. the number of relevant bits in the network number). For example, 192.0.2.96/24 indicates an IP address where the first 24 bits are used as network address (same as 255.255.255.0).
[edit] IPv4 classes
IPv4 addresses are broken down into three parts: the network part, the subnet part (now often considered part of the network part, although originally it was part of the rest part), and the host part. There are three classes of IP address which determine how much is which
Class | Leading bits | Start | End | Default Subnet Mask in dotted decimal | CIDR notation |
---|---|---|---|---|---|
A | 0 | 1.0.0.0 | 126.255.255.255 | 255.0.0.0 | /8 |
B | 10 | 128.0.0.0 | 191.255.255.255 | 255.255.0.0 | /16 |
C | 110 | 192.0.0.0 | 223.255.255.255 | 255.255.255.0 | /24 |
D | 1110 | 224.0.0.0 | 239.255.255.255 | ||
E | 1111 | 240.0.0.0 | 255.255.255.0 |
The 127.0.0.0 network is left out because it is designated for loopback and cannot be assigned to a network
Class D multicasting
Class E reserved
Subnetting is the process of allocating bits from the host portion as a network portion. The above example shows the logical "AND" process being performed on a classful network. The following example shows bits being borrowed to turn a classful network into a subnet.
Example
Dot-decimal Address | Binary | |
---|---|---|
Full Network Address | 192.168.5.130 | 11000000.10101000.00000101.10000010 |
Subnet Mask | 255.255.255.192 | 11111111.11111111.11111111.11000000 |
Network Portion | 192.168.5.128 | 11000000.10101000.00000101.10000000 |
In this example two bits were borrowed from the original host portion. This is beneficial because it allows a single network portion to be split into several smaller network portions. By design IPv4 address are limited in number and each classful network portion is capable of supporting a finite number of hosts. A classful C address for example has space for 254 hosts. If a network were to be split into four parts using classful address four different class C addresses would have to be used to serve those networks. Using the subnetting example above if each subnetwork were to have 62 hosts or less (see below for math) a single class C address could be split up to service the entire network while wasting the fewest host addresses.
[edit] Subnets and host count
It is possible to determine the amount hosts and subnetworks available for any subnet mask. In the above example two bits were borrowed to create subnetworks.
22 = 4
possible subnets available according to RFC 1812, otherwise using the old RFC 950 standard the number of usable subnets is 6. This is due to RFC 950 (section 2.1, page 5) not supporting subnets with either all 1s or all 0s.
26 − 2 = 62
possible hosts available to each subnetwork (2 addresses are reserved and cannot be used for hosts: subnet identifier (the first) and broadcast address (the last)).
[edit] Private subnets
The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private networks:
Network address range | CIDR notation |
---|---|
10.0.0.0 - 10.255.255.255 | /8 |
172.16.0.0 - 172.31.255.255 | /12 |
192.168.0.0 - 192.168.255.255 | /16 |
[edit] References
- RFC 950 Internet Standard Subnetting Procedure
- RFC 1812 New Internet Subnetting Procedure
- RFC 950 Utility of subnets of Internet networks
- RFC 1101 DNS Encodings of Network Names and Other Types
[edit] See also
[edit] Links
- Understanding IP Addressing - Everything You Ever Wanted To Know : [1]PDF (PDF, May 2001, 1.08 MB, 76 pages , 3COM)
[[Category:Routing]] [[Category:Network addressing]] [[Category:Internet architecture]]