Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: Finding subnet ID in large claa a network

Finding subnet ID in large claa a network 3 years 5 months ago #38386

  • mic
  • mic's Avatar
  • Offline
  • Frequent Member
  • Posts: 28
  • Karma: 0
Hi, i can subnet pretty good, but when it comes to finding subnets ID in large subnets it takes me a while, so if you had 10.0.0.0/12 that"s 4096 subnets, and the question was --what is the 1010th subnet ID and range of IP addresses, what would be the fastest way. thanks MIKE
P.S. division and mult. got to be in this because we a turning more then once in smae octer, posted on cisco learning only got on answer and did not land on a subnet ID number, so i am hoping someone we see this a show me the way. Thanks mic
The administrator has disabled public write access.

Re: Finding subnet ID in large claa a network 3 years 5 months ago #38387

  • Nevins
  • Nevins's Avatar
  • Offline
  • Expert Member
  • Posts: 438
  • Thank you received: 9
  • Karma: 4
Ok I'll attempt to help you out here. I understand the question you asked but your example was bad and I'll show you why that was bad first:

What is the 1010th subnet ID of 10.0.0.0/12?

The simple answer is there isn't one. The first 8 bits are network bits and the next four are subnet bits.


00001010.00000000.00000000.00000000 = 10.0.0.0
nnnnnnnn.ssss0000.00000000.00000000 = 255.240.0.0

2^S=16 subnets

1.) 10.0.0.0 - 10.15.255.255
2.) 10.16.0.0 - 10.32.255.255
3.) 10.32.0.0 - 10.48.255.255
4.) 10.48.0.0 - 10.64.255.255
5.) 10.64.0.0 - 10.80.255.255
6.) 10.80.0.0 - 10.96.255.255
7.) 10.96.0.0 - 10.112.255.255
8.) 10.112.0.0 - 10.128.255.255
9.) 10.128.0.0 - 10.144.255.255
10.) 10.144.0.0 - 10.160.255.255
11.) 10.160.0.0 - 10.176.255.255
12.) 10.176.0.0 - 10.192.255.255
13.) 10.192.0.0 - 10.208.255.255
14.) 10.208.0.0 - 10.224.255.255
15.) 10.224.0.0 - 10.240.255.255
16.) 10.240.0.0 - 10.255.255.255


But what if you wanted to find the 14th subnet in that group how would you find it?

The answer is take 14 subtract 1 and convert it into binary( 14-1 = 13 = 1101) then place it where your subnetting bits start.


SUBNET ID 14: 10.208.0.0 = 00001010.11010000.00000000.00000000
SUBNET MASK : 255.240.0.0 = 11111111.11110000.00000000.00000000


Why does this work this way?

Well if you count up from subnet 0 it looks a bit like this:


00001010.00000000.00000000.00000000 10.0.0.0
00001010.00010000.00000000.00000000 10.16.0.0
00001010.00100000.00000000.00000000 10.32.0.0
00001010.00110000.00000000.00000000 10.48.0.0
00001010.01000000.00000000.00000000 10.64.0.0
00001010.01010000.00000000.00000000 10.80.0.0
00001010.01100000.00000000.00000000 10.96.0.0
00001010.01110000.00000000.00000000 10.112.0.0
00001010.10000000.00000000.00000000 10.128.0.0
00001010.10010000.00000000.00000000 10.144.0.0
00001010.10100000.00000000.00000000 10.160.0.0
00001010.10110000.00000000.00000000 10.176.0.0
00001010.11000000.00000000.00000000 10.192.0.0
00001010.11010000.00000000.00000000 10.208.0.0
00001010.11100000.00000000.00000000 10.224.0.0
00001010.11110000.00000000.00000000 10.240.0.0

The big key here is you start counting from the zero subnet(10.0.0.0).




So lets test this with another example and make sure it works.

2^S=131,072 subnets
10.0.0.0/25

nnnnnnnn.ssssssss.ssssssss.shhhhhhh
00001010.00000000.00000000.00000000

10.0.0.0 FIRST SUBNET
10.0.0.128 SECOND SUBNET
10.0.1.0
10.0.1.128
10.0.2.0
10.0.2.128
10.0.3.0
10.0.3.128
10.0.4.0
10.0.4.128
10.0.5.0
10.0.6.128
..........
10.255.254.0
10.255.254.128
10.255.255.0 131,071th subnet
10.255.255.128 131,072th subnet


Lets take the second from last subnet:

10.255.255.0
00001010.11111111.11111111.00000000

Compare to 131,071 - 1 in binary (131,071 - 1 = 131070 = 11111111111111110)
Useful Threads
================================
www.firewall.cx/forum/2-basic-concepts/3...e-resource-page.html
Last Edit: 3 years 5 months ago by Nevins.
The administrator has disabled public write access.

Re: Finding subnet ID in large claa a network 3 years 5 months ago #38389

  • mic
  • mic's Avatar
  • Offline
  • Frequent Member
  • Posts: 28
  • Karma: 0
Sorry Karma about that, It was early in the morning I had a typo, I meant /20. I think I got it but, just in case can you explain once more with the /20 With the 1010th subnet ID, I just what to make sure I got this down and practice it more, Thank you so much for your help , lot of people don't know this, thanks again. Mic! P.S. I see it in the small networks with the bits in action or only with using one octet to the right , but when it comes to using two octets like in /20 or more having hard time, your second example picks out the last one then moves to lower one I don't see it in the bits, there is 16 bits that's 65536, so as you can see I am missing something , as i said I don't see it in the bits, please explain, I really need to understand this, Thanks for third time. Mic , Karma
Last Edit: 3 years 5 months ago by mic.
The administrator has disabled public write access.

Re: Finding subnet ID in large claa a network 3 years 5 months ago #38390

  • Nevins
  • Nevins's Avatar
  • Offline
  • Expert Member
  • Posts: 438
  • Thank you received: 9
  • Karma: 4
10.0.0.0/20
nnnnnnnn.ssssssss.sssshhhh.hhhhhhhh
11111111.11111111.11110000.00000000
255.255.240.0

2^12=4096 *you have enough subnets this time*

(1010-1 = 1009 = 1111110001)

00001010.00111111.0001 0000.00000000

1010th subnet ID = 10.63.16.0
Useful Threads
================================
www.firewall.cx/forum/2-basic-concepts/3...e-resource-page.html
The administrator has disabled public write access.
The following user(s) said Thank You: mic

Re: Finding subnet ID in large claa a network 3 years 5 months ago #38391

  • mic
  • mic's Avatar
  • Offline
  • Frequent Member
  • Posts: 28
  • Karma: 0
Thank you so much Nevins, i got it, Just a FAST reveiw --first -1 off subnet ID you are looking for, then ---just start with bits from right to left with 1-2-4-8-16-32-64-128-256-512 and so on if bigger subnet ID, add the proper bits together till you get your subnet ID number, then put period (dot) in proper place --every 8 bits and that"s your subnet ID will be. RIGHT---thank you so much for the help i went to 4 sites and could not get what you have told me. Love ya network man.Thanks again Mic
The administrator has disabled public write access.

Re: Finding subnet ID in large claa a network 3 years 5 months ago #38392

  • Nevins
  • Nevins's Avatar
  • Offline
  • Expert Member
  • Posts: 438
  • Thank you received: 9
  • Karma: 4
Yep no problem glad I could help.


The easiest way is to look at it like this:


The first subnet starts at 0 and each successive subnet is 1 bit greater.
The number of subnets is limited by the number of subnetting bits.
(this can be calculated with the formula 2^S where s is the number of subnetting bits)


If you have 4 bits for subnetting the subnet bits look like:

0000 <--First
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
<-- Last

Using the formula 2^s(4) you can see that there are 16 different combinations from 0000 to 1111.

EVERY combination of each bit represents a unique subnet. There is no real trick to the formula it's literally just counting from 0 in binary.
Useful Threads
================================
www.firewall.cx/forum/2-basic-concepts/3...e-resource-page.html
The administrator has disabled public write access.
Time to create page: 0.086 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup