Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I thought I understood subnetting and subnet mask, but how wrong was I:
I have Class C Ip addresses (192.168.*.*).
Normally, subnetting a class C means picking
the third octet for each subnet and the fourth octet for your hosts and that works fine on my network:
I have a subnet that is 192.168.1.x, another subnet 192.168.2.x etc..and they work fine.
But I now have to subnet a class B (149.76.x.x) and found that I also have to update the third octet for subnetting, such as: 149.76.1.x, 149.76.2.x
How come it works as for the Class C?
Class B networks was supposed to have trhe first 2 octets for the network part..and the last 2 octets for the host part.
As for the netmask, I originally learned that 255.255.255.0 is the default netmask for class C address. How come it can also be the netmask for a class B address??
I know I should go back to my books on IP, but it's exactly by going back to them that I found mixed up infos. I just posted my question here hoping someone would clarify that.
Thanks and sorry in advanced if the question is essentially basic.

"I have a subnet that is 192.168.1.x, another subnet 192.168.2.x etc..and they work fine."
I am not so sure of what the above means but I believe you are a little confused.
Subnets are created by modifying the subnet mask.
Eight bits binary shown as follows:
1-----1---1---1--1---1---1---1
128--64--32--16--8---4---2---1
Borrowing 1 bit is 128 leaving 7 bits left over.
Adding them from the right leaves:
1+2+4+8+16+32+64=127 less the network ID making 126 usable addresses in each subnet mask. Host ID being 1 and 128 as broadcast along with 129 as the second host ID and 255 as the broadcast for the second.If we borrow no bits then that equates to two to the the zero power equaling 1 subnet and in the above case we borrowed one bit or two to the first power = 2 or two subnets.
Borrowing 2 bits (adding from the left) is 128+64=192 leaving 6 bits left over. (255.255.255.192)
Adding them from the right leaves:
1+2+4+8+16+32=63 available addresses in each subnet less the host ID making 62 usable addresses in each subnet mask for a total of 4 subnets or since we borrowed two bits we can say 2 to the 2nd power being 4.Borrowing 3 bits (adding from the left) is 128+64+32=224 leaving 5 bits left over.
Adding them from the right leaves:
1+2+4+8+16=31 available addreses in each submask less the host ID making 30 usable addresses in each subnet mask.128+64+32+16+8+4+2+1=255 where 255 is broadcast and 0 being the host ID making a total of 256.
So, if you have a subnet mask of 255.255.255.128 then your 192.168.1.x will have two broadcast domains or subnets being 192.168.1.1 through 128 and a second being 192.168.1.129 through 254.
Class B breaksout on the third octet. To have two broadcast domains you would use 255.255.128.0 instead of 255.255.0.0 for a single broadcast domain.
HTH
Bryan

Your 'class b' IP address is only a class B as long as it has the mask of 255.255.0.0. If this is the case then your rules apply (i.e. you change the second octet to change the network). If you give it a different mask (255.255.255.0 in your example) it is no longer a class B.
The classes are only a 'defined set of rules (standard)' of doing things, they do not actually prevent network operation if they are not obeyed.
As long as you have the same network section of your IP, the same subnet mask and a unique host section your network is fine.
The classes are slowly becoming redundant anyway due to their limitations, classless subnetting has much more flexability (any IP with any subnet as described above).Wizard ICT. Microsoft Certified Professional

![]() |
DSL is hitting firewall
|
Remote Desktop/Truemobile...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |