Skip to main content

Super netting

Even though we appear to be in the twilight years of IPv4, you may still be faced with the question of super netting.

In the IPv4 world, we use a subnet mask to separate the network and host portion of an IP address.  With the IP address divided into 4 groups representing 8 bits, the normal subnets look like this:

255.0.0.0

255.255.0.0

255.255.255.0


The 255 is the decimal representation of 8 bits, all set to ‘1’.  The 0’s are the decimal representation of 8 bits, all set to ‘0’.  This makes subnetting easy.  Let’s say you need a subnet that can handle 4000 hosts?  Standard subnets will not work.  Here is how you figure out the subnet ID

Convert the 4000 to binary.  User the programmer mode on the Windows calculator

Just type in 4000 in DEC mode, and then switch to BIN mode.

image

The binary for this is 11111010000

If we add some leading zeros to make this an even 16 bit number, we get

0000111110100000

Now, place them into octets.

00001111.10100000

We can see by the leading one, that we need to borrow the lower 4 bits of the third octet for use as the host ID.  The leading 4 will be used as part of the network ID. In Window calculator, let’s figure out what just the first 4 leading bits will be.  To do this, set the calculator in BIN mode and type 11110000.  Now click DEC mode. You get the number 240.  Your subnet mask is:

255.255.240.0 or 11111111.11111111.11110000.00000000

There are also a limited number of subnets possible with subnetting.  We will continue to use the above subnet of 255.255.240.0 as our example.  Since we can only use the leading 4 bits for the network ID, we have to calculate the possible subnets.

00000000 ---- 0
00010000 ---- 16
00100000 ---- 32
00110000 ---- 48
01000000 ---- 64
01010000 ---- 80
01100000 ---- 96
01110000 ---- 112
10000000 ---- 128
10010000 ---- 144
10100000 ---- 160
10110000 ---- 176
11000000 ---- 192
11010000 ---- 208
11100000 ---- 224
11110000 ---- 240


Of these 16 subnets, the first and last one are reserved.  We only have 14 available subnets.

The IP address is derived from a combination of the bits from the host portion, and the network portion.  Let’s say that we need to use the last two bits of the third octet, and the first 6 of the fourth for our host ID.

00000011.11111100

We know that the first four bits are reserved for the network ID.  Lets place this in the 192 subnet.  Out subnet ID will look like this.

11111111.11111111.11000000.00000000

Let’s combine our host and network IDs

11111111.11111111.11000011.11111100

Running the 3rd octet through the Windows Calculator, we get 195.  If our network ID is 10.10.xxx.yyy, we can now determine that out IP address is 10.10.195.252

This is a very complicated method.  The link below will take you to a chart on the internet to try and help you determine the number of subnets and hosts a particular network can support.
http://www.pantz.org/software/tcpip/subnetchart.html

Comments

Popular posts from this blog

How to list all the AD LDS instances on a server

AD LDS allows you to provide directory services to applications that are free of the confines of Active Directory.  To list all the AD LDS instances on a server, follow this procedure: Log into the server in question Open a command prompt. Type dsdbutil and press Enter Type List Instances and press Enter . You will receive a list of the instance name, both the LDAP and SSL port numbers, the location of the database, and its status.

How to run GPResult on a remote client with PowerShell

In the past, to run the GPResult command, you would need to either physically visit this client, have the user do it, or use and RDP connection.  In all cases, this will disrupt the user.  First, you need PowerShell remoting enabled on the target machine.  You can do this via Group Policy . Open PowerShell and type this command. Invoke-Command –ScriptBlock {GPResult /r} –ComputerName <ComputerName> Replace <ComputerName> with the name of the target.  Remember, the target needs to be online and accessible to you.

Error icon when creating a GPO Preference drive map

You may not have an error at all.  Take a look at the drive mapping below. The red triangle is what threw us off.  It is not an error.  It is simply a color representation of the Replace option of the Action field in the properties of the drive mappings. Create action This give you a green triangle. The Create action creates a new mapped drive for users. Replace Action The Replace action gives you a red triangle.  This action will delete and recreate mapped drives for users. The net result of the Replace action is to overwrite all existing settings associated with the mapped drive. If the drive mapping does not exist, then the Replace action creates a new drive mapping. Update Action The Update action will have a yellow triangle. Update will modify settings of an existing mapped drive for users. This action differs from Replace in that it only updates settings defined within the preference item. All other settings remain as configured on the ma...