cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
733
Views
0
Helpful
4
Replies

Subnetting..

praveen.apr30
Level 1
Level 1

can somebody expalin me why 255 taken as mask instead of 128 in the first example.and why 192 has been taken as mask in 2nd example. i got this confusion while doing subnetting of class B network. please help me.

1).Practice Example #6B: 255.255.255.128 (/25)

This is one of the hardest subnet masks you can play with. And worse, it actually is a really good subnet to use in production because it creates over 500 subnets with 126 hosts for each subnet—a nice mixture. So, don't skip over it!

  • 172.16.0.0 = Network address
  • 255.255.255.128 = Subnet mask
  • Subnets? 29 = 512.
  • Hosts? 27 - 2 = 126.
  • Valid subnets? Okay, now for the tricky part. 256 - 255 = 1. 0, 1, 2, 3, etc. for the third octet. But you can't forget the one subnet bit used in the fourth octet. Remember when I showed you how to figure one subnet bit with a Class C mask? You figure this the same way. (Now you know why I showed you the 1-bit subnet mask in the Class C section—to make this part easier.) You actually get two subnets for each third octet value, hence the 512 subnets. For example, if the third octet is showing subnet 3, the two subnets would actually be 3.0 and 3.128.
  • Broadcast address for each subnet?
  • Valid hosts?

The following table shows how you can create subnets, valid hosts, and broadcast addresses using the Class B 255.255.255.128 subnet mask (the first eight subnets are shown, and then the last two subnets):

Subnet

0.0

0.128

1.0

1.128

2.0

2.128

3.0

3.128

255.0

255.128

First host

0.1

0.129

1.1

1.129

2.1

2.129

3.1

3.129

255.1

255.129

Last host

0.126

0.254

1.126

1.254

2.126

2.254

3.126

3.254

255.126

255.254

Broadcast

0.127

0.255

1.127

1.255

2.127

2.255

3.127

3.255

255.127

255.255

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2)Practice Example #7B: 255.255.255.192 (/26)

Now, this is where Class B subnetting gets easy. Since the third octet has a 255 in the mask section, whatever number is listed in the third octet is a subnet number. However, now that we have a subnet number in the fourth octet, we can subnet this octet just as we did with Class C subnetting. Let's try it out:

  • 172.16.0.0 = Network address
  • 255.255.255.192 = Subnet mask
  • Subnets? 210 = 1024.
  • Hosts? 26 - 2 = 62.
  • Valid subnets? 256 - 192 = 64. The subnets are shown in the following table. Do these numbers look familiar?
  • Broadcast address for each subnet?
  • Valid hosts?

The following table shows the first eight subnet ranges, valid hosts, and broadcast addresses:

Subnet

0.0

0.64

0.128

0.192

1.0

1.64

1.128

1.192

First host

0.1

0.65

0.129

0.193

1.1

1.65

1.129

1.193

Last host

0.62

0.126

0.190

0.254

1.62

1.126

1.190

1.254

Broadcast

0.63

0.127

0.191

0.255

1.63

1.127

1.191

1.255

Notice that for each subnet value in the third octet, you get subnets 0, 64, 128, and 192 in the fourth octet.

4 Replies 4

Richard Burts
Hall of Fame
Hall of Fame

I do not understand your question. The first example is dealing with subnetting using /25. The number of network/subnet bits in each octet is  + 8 + 8 + 8 + 1. The mask for /25 has 255 in the first three octets and 128 in the fourth octet.

The second example is dealing with subnetting using a /26. The number of network/subnet bits in each octet is 8 + 8 + 8 + 2. The mask for /26 has 255 in the first three octets and 192 in the fourth octet.

If this explanation does not address your confusion then please clarify your question.

HTH

Rick

HTH

Rick

Hi ,

i will clarify the question first.In the above examples while calculating "Valid subnets" i got the confusion.

In the first example it was (255.255.255.128 (/25)

  • 255.255.255.128 = Subnet mask
  • Valid subnets=256-255=1
  • since the subnet mask is 128. the valid subnets shuld be 256-128 rite?
  • why it has been calculated as 256-255=1 starting from 0 1 2 3 ....etc.

it was perfect in second example and i have doubt in first one . please reply.

hi,

base network = 172.16.0.0

mask or prefix   =  255.255.0.0 or /16

1.     there can be 512 /25 subnets in /16 base network as we will have 9 bits for subnetting......subsequently we will have 126 hosts in each subnet as we will have 7 bits for each subnet.

mask for each subnet = 255.255.255.128

2.     there can be 1024 /26 subnets in /16 base network as there will be 10 bits for subnetting.....and each subnet will have 62 hosts as there will be 6 bits for each subnet......

mask for each subnet = 255.255.255.192

thanks

OK. Now I have a better understanding of the confusion. He starts the explanation as if the subnetting is being done only in the third octet. The mask in the third octet is 255. He has previously introduced a method of calculating the increment of subnet numbers by subtracting the subnet mask from 256. So if you consider only the third octet with mask 255 you would come to the conclusion that the valid subnets are 0, 1, 2, 3, etc. He then makes the point that you must also consider that subnetting is happening in the fourth octet also. This leads to the correct conclusion that the valid subnets are 0.0, 0.128, 1.0, 1.128, 2.0, 2.128, 3.0, 3.128, etc

HTH

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card