You are on page 1of 13

## Submitted By:Mohit Sikka (127) Tushar Chandhok (128)

Subnetwork:

A mask used to determine what subnet an IP address belongs to. An IP address has two components, the network address and the host address. For example, consider the IP address 150.215.017.009. Assuming this is part of a Class B network, the first two numbers (150.215) represent the Class B network address, and the second two numbers (017.009) identify a particular host on this network.

The range of available IP addresses is divided into classes. Specifically these are class A, B and C addresses. There are two further classes, D and E. These are not used for addressing purposes currently and this course will not concentrate on classes D or E. IP numbers that begin with a number in the range 1 to 127 are class A addresses. IP numbers that begin with a number in the range 128 to 191 are class B addresses.

IP numbers that begin with a number in the range 192 to 223 are class C addresses. IP numbers that begin with a number in the range 224 to 239 are class D addresses. IP numbers that begin with a number in the range 240 to 255 are class E addresses.

Reserved numbers
There are certain numbers within the IP scheme that have been reserved. No network number may consist of all 0s or all 1s. This means that no network ( or sub network) may take these numbers Any IP number that has the host octet set to 0 is reserved as a network address. Any IP number that has the host octet set to 255 is reserved as a network broadcast (a message for all hosts) address. All numbers that begin with 127 are reserved for the loopback test of a network interface card. This uses 127.0.0.1. The rest of the 127 numbers are wasted here. Class A Addresses (1 to 127) This equates to a /8 address range A typical class A address (in dotted decimal notation) would be 10.213.43.122 In binary notation this is 00001010.11010101.00101011.01111010 Note that the first 8 bits are the network identity and the last 24 bits are host identity.

This means that there are a possible 224 = 16 777 216 combinations available for the last 24 bits. If we subtract the two combinations that cannot be used as host addresses we now have the total number of hosts that can be on a class A network address.

Therefore a class A address can have 16 777 216 - 2 = 16 777 214 different hosts.

Class B Addresses (128 to 191) This equates to a 16 address range A typical class B address (in dotted decimal notation) would be 155.17.47.100 In binary notation this is 00001010.00010001.00101111.01100100 Note that the first 16 bits are the network identity and the last 16 bits are host identity.

This means that there are a possible 216 = 65 536 combinations available for the last 16 bits. If we subtract the two combinations that cannot be used as host addresses we now have the total number of hosts that can be on a class B network address. Therefore a class B address can have 65 536 - 2 = 65 534 different hosts. Class C Addresses (192 to 223) This equates to a /24 address range A typical class C address (in dotted decimal notation) would be 207.18.199.12 In binary notation this is 00001010.00010010.11000111.00001100

Note that the first 24 bits are the network identity and the last 8 bits are host identity.

This means that there are a possible 28 = 256 combinations available for the last 16 bits. If we subtract the two combinations that cannot be used as host addresses we now have the total number of hosts that can be on a class C network address. Therefore a class C address can have 256 - 2 = 254 different hosts.

The network address of the host having IP number ( unsubnetted class B address) 129.236.127.44 is 129.236.0.0. This can be easily seen as this is an unsubnetted class B address. this address would today be written as 129.236.127.44 /16 To work this out, first convert this IP number to binary: 129.236.127.44 /16 = 10000001.11101100.01111111.00101100 The first 16 bits are the network identity. Replace the host identity section of the address with 0s. 10000001.11101100.00000000.00000000 If we convert this back to decimal we get 129.236.0.0. It is important to note that hosts on a particular network cannot communicate directly with hosts on a different network, even if they are on the same network segment!

Sometimes it is necessary to send a message to all the hosts in a network. This is done using a broadcast address. To obtain the broadcast address number for a network, substitute the host section of the binary version of the IP address with 1s. With the / notation this means setting the last bits (32 - /number) to zero.

For the address above 129.236.127.44 /16, the broadcast address would be 129.236.255.255. To work this out, first convert this IP number to binary: 129.236.127.44 = 10000001.11101100.01111111.00101100 The first 16 bits are the network identity. Replace the host identity section of the address with 1s. 10000001.11101100.11111111.11111111 If we convert this back to decimal we get 129.236.255.255.

## Subnetting and Supernetting

Subnetting is the process of creating new networks (or subnets) by stealing bits from the host portion of a subnet mask. There is one caveat: stealing bits from hosts creates more networks but fewer hosts per network. Consider the following Class C network: 192.168.254.0 The default subnet mask for this network is 255.255.255.0. This single network can be segmented, or subnetted, into multiple networks. For example, assume a minimum of 10 new networks are required. Resolving this is possible using the following magical formula: 2n The exponent n identifies the number of bits to steal from the host portion of the subnet mask. The default Class C mask (255.255.255.0) looks as follows in binary: 11111111.1111111.1111111.00000000 There are a total of 24 bits set to 1, which are used to identify the network. There are a total of 8 bits set to 0, which are used to identify the host, and these host bits can be stolen. Subnetting is one of those things that most tutorials and books make far more complicated than it should be. When I began studying for the TCP/IP MCSE exam, I was at a loss. After a lot of browsing through the bookstores and web pages, I realized that it's actually quite simple. Although in the real world, most people use subnet calculators--they're available as freeware, so cost isn't an issue-- for ones own knowledge (and of course, the TCP/IP test) one does have to know how to manually figure out subnets. Despite the fact that many

are saying (and this matched my own experience) that there are only one or two subnetting questions on the test these days, MS can be whimsical, and this could change again. Although the TCP/IP exam is going to be retired, MS expects to be familiar with the material that it covers for some of the new Windows 2000 core exams. This is a howto, not a whyis. If you want detailed explanations, including ANDing etc, see one of the many excellent sites on the web. There are three basic aspects to subnetting--determining how many subnets you need, how many hosts it will allow and what are the valid addresses on the subnet. There are several complicated formulas to work this out, most involving binary math. One can memorize several tables, or, if they are good at this sort of thing, do it in their head. If one does use the calculator provided with Windows, especially on the test. The operation have to perform are the following--converting binary to decimal, which is done by hitting the F6 key. Converting decimal to binary, which is done by hitting the F8 key. The information below is also useful both in the real world and on the exams for IIS4 and Proxy 2.0. In both cases, a range of addresses can be permitted or denied access based on subnet masks.

This now leaves 12 bits for the host identity = 212 = 4096 but remember that the first and last numbers are reserved. This leaves scope for 4094 hosts on each network. To show where the network/ host boundary lies the / notation informs us of the number of network bits - this is the sum of the network and borrowed bits. In the example above, there are now 20 network bits so this is a /20 address. Original single class B address is divided into 2 subnetworks 24 = 16 subnetworks. Unfortunately we cannot use the first or last of these addresses. Therefore we have the potential for 16 - 2 = 14 networks within our original class B address. This allows for 14 networks with 4094 hosts (maximum) residing on each subnetwork. The examples with a class C address, as that is the simplest. However, this will work with the other classes as well. Let's say a network that begins with 192.168.0.1. the network address then is 192.168.0.0--this is the address representing the entire network, divide it into 6 subnets, the default subnet mask is 255.255.255.0. , one need to change it (As an aside, see a subnet written as 192.168.0.1/24 instead of being written out as 255.255.255.0 The number behind the slash indicates the number of ones in the subnet if it is written in binary. For example, 255.255.255.0 is written in binary as

This term is often used in place of the real name, 'extended network prefix'. It is used to help determine which part of the IP address refers to the network and which part refers to the host. A subnet mask is 32 bits long and has 4 sections or octets that are separated by dots the same as an IP address. To work out the subnet mask for a particular subnetwork IP address follow the steps below. 1. Express the subnetwork IP address in binary form. 2. Replace the network and subnet portion of the address with all 1s. 3. Replace the host portion of the address with all 0s. 4. Now convert the binary expression back to dotted-decimal notation.

Example
What is the subnet mask for the subnetted class C address ( /24) 199.177.166.34 that has borrowed 3 bits from the host field? 1. Change decimal to binary: 11000111.10110001.10100110.00100010 3 bits have been borrowed from the host field. These are denoted in green above. This means that the network identity part of the IP address is 27 bits long. 2. Substitute 1s for these 27 bits 3. Substitute the last 5 bits for 0s 11111111.11111111.11111111.11100000 4. Convert back to dotted decimal 255.255.255.224 or we can write the subnet mask as /27 This is the subnet mask for the above network number.