www.digi.com
  Advanced Search
Product Selector
     
  Technical Support
Drivers

Firmware Upgrades

FAQs

Product Documentation

Cabling

Support Tools

Legacy Products

About Digi Support

Knowledge Base

Online Support Request

FTP Site



Related Links
Inside Out Networks


 
Solutions Partners Support and Training Corporate Info Where to Buy Order Where to Buy Site Map Contact Us
Home > Support >kbase >
IP Subnet Addressing
IP Subnet Addressing IP Subnet Addressing

 

Problem:

What is IP Subnet Addressing?

Solution:

The subnetting of IP-Addresses is useful to avoid a growing shortage of IP-addresses. This also allows IP-Networks to be divided into their own separate subnets.

Referring to the distribution of official IP-addresses, subnetting for example opens the possibility to generate further separate IP-networks under an existing A/B/C-network address. The division into separate subnets has the advantage that local traffic will remain in the defined subnet and traffic to other subnets can be forwarded on demand.

The basic concept of subnetting is very easy and is based on the "Subnet Mask". This mask is used to define the bits which represent a network or a host within an IP-Address. A network is represented by a high bit (1), where on the other side a low bit (0) defines the host area.

The host (e.g. router, workstation) decides depending on the subnet mask if the destination IP-address is in the local network. If this is not the case, then packets to this specific address will be routed over previously defined routing mechanisms.

The following table displays 4 IP-addresses of a network (Class C) and their association to the used subnet mask 255.255.255.224.

 
  Network Host
255.255.255.224 11111111.11111111.11111111.111 00000
1) 193.98.44.33 11000001.01100010.00101100.001 00001
2) 193.98.44.101 11000001.01100010.00101100.011 00101
3) 193.98.44.129 11000001.01100010.00101100.100 00001
4) 193.98.44.61 11000001.01100010.00101100.001 11101

The binary representation of the mask and addresses shows quite clearly in which subnet which IP-address belongs to: Addresses 1 and 4 belong to subnet .32 (00100000), address 2 belongs to subnet .96 (01100000) and address 3 belongs to subnet .128 (10000000).

If the usual Class-C network standard mask 255.255.255.0 is used for this example, then the length of the network part would be 24 bit and the host part 8 bit. Through the subnet mask 255.255.255.224, the network part of the IP-address has the exact size of 27 bit and the host part a length of 5 bit.

This example shows that the first three higher bits of the hostpart define the respective subnet. The remaining lower 5 bits represent the hostaddress in the subnet. In the displayed example, 6 networks with 30 hostaddresses are made available through subnetting. In comparison, 253 real hostaddresses are only available in a "normal" Class-C network.

Subnetting is nothing else then an extension of the network part of an IP-address, where the host part is shortened. The number of available subnets and hosts are based on certain given IP-conditions:

 

     

  • The number of available host addresses depends on the length of the host-part of an IP- address. A 5 bit host-part can theoretically make available up to 32 addresses. Because there are two reserved addresses in every IP-network (this also applies to a subnet), the maximum number of available addresses has to be reduced by 2 addresses. These host-addresses contain only zeros or only ones. The first address is used for addressin the network, while the other address is used for broadcasts in that certain network.

     

     

  • The number of used subnets depends on the length of the subnet-portion in the netmask. Also here, the theoretical total number of networks has to be reduced by 2. In this case these are the subnets, which subnet-part only contains ones or zeros. These networks are supported by some operating systems, but are not part of the RFC 950 specifications. This means that they should not be used.

     

 

The following summary displays the most common masks in affiliation with their net and host addresses.

 
Subnet-Mask Net(Bit) Host(Bit) Subnet-Address Broadcast Host-Address
255.255.255.192 2 (2) 62 (6) .64 .127 .65-.126
      .128 .191 .129-.190
255.255.255.224 6 (3) 30 (5) .32 .63 .33-.62
      .64 .95 .65-.94
      .96 .127 .97-.126
      .128 .159 .129-.158
      .160 .191 .161-.190
      .192 .223 .193-.222
255.255.255.240 14 (4) 14 (4) .16 .31 .17-.30
      .32 .47 .33-.46
      .48 .63 .49-.62
      .64 .79 .65-.78
      .80 .95 .81-.94
      .96 .111 .97-.110
      .112 .127 .113-.126
      .128 .143 .129-.142
      .144 .159 .145-.158
      .160 .175 .161-.174
      .176 .191 .177-.190
      .192 .207 .193-.206
      .208 .223 .209-.222
      .224 .239 .225-.238

Here's an example:

A LAN with two ethernet networks is to supply Internet services via ISDN. All workstations in the LANīs are to have access to the Internet and should be directly attainable.

Taking the Class C Address structure as the basis, both ethernet networks and the ISDN network normally have to be equipped with a complete class C net each. The maximum number of stations is restricted to 30 in every thin ethernet segment, thus leaving 223 host addresses unused in each network. This means the loss of 669 addresses.

This is exactly where the subnetting sets in. By using subnet masks a complete connectivity can be gained with only one class C net without the above mentioned loss of addresses. For this purpose the Internet service provider supplies a class C network with the following data:

 
IP-Adresse Provider IP-Adresse Gateway IP-Adresse Netzwerke Subnetz-Maske
192.93.98.222 192.93.98.222 192.93.98.0 255.255.255.0
The diagram shown below illustrates the configuration.

The subnet mask 255.255.255.224 strikes as expedient because of the fact that this mask holds six available subnets with 30 hosts each. The number of available hosts is identical to the number of stations in each segment.

The diagram shows two subnets , in this case 192.93.98.32 and 192.93.98.64, which were both bound to the LAN adapters accessed by the ITK Router. One of the adapters receives the IP address 192.93.98.33 and the other one 192.93.98.65. In this configuration each adapter can address 29 further stations each. The ISDN (WANODI or virtual ethernet) receives the IP address 192.93.98.193 being part of the subnet 192.93.98.192.

The IP address of the provider is used as default gateway. This assures all packets which are directed to the net, not yet included in the local subnets of the LANs, to be sent to the provider.

 

solutions | partner programs | corporate info | support and training | where to buy
site map | contact us | press releases |
events | promotions | advertising

Copyright © 1996-2001 Digi International. All rights reserved.