Subnet mask: what does Wes mean when he's talking about a class C private IP with a class B subnet mask?
-
Just finished watching the A+ episode on subnet mask and CIDR, but I didn't understand the example Wes gave at the end of the show. If someone wanted a class C block, his subnet mask would be 255.255.255.0, right? So how is it possible to use a class B subnet mask on a class C block? At the end, it's all really a class B IP block that you end up getting, right? Could someone explain this in more detail?
-
Basic
Classful
networking will use the classful subnet mask as you've mentioned:Class A - 255.0.0.0
Class B - 255.255.0.0
Class C - 255.255.255.0But, today, to save addresses from being used up, we used
classless
ip addressing. This means you break the rules forclassful
networking (as above) and allows you to not pay attention to the classful boundaries for Class A, B, or C. You can then have a Class C IP address with a Class B subnet mask if you choose.So today, we do not tend to pay much attention to classful boundaries.
-
Could you give me an example of a class C IP address with a class B subnet mask? I'm having trouble visualizing how you would do that. The way that I understood it was either you use classful IPs, or you use classless IPs. Maybe with an example of an IP address would me understand how it is possible to combine the two.
-
The whole purpose of
classless
IP addressing was to become more efficient with addressing. If, your ISP were to have to assign you an address inclassful
it would be a block of addresses. So lets say, 192.168.99.0 255.255.255.0. This would allow you to use 192.168.99.1 - 192.168.99.254 as possible addresses. What if you only used 60 of those addresses? Then there would be waste of 194 addresses that couldn't be re-assigned to potential customer. Here is the need forclassless
, it allows me to take the unused portion of that address block and subdivide it to smaller address space.The other way is also possible, where we might be combining multiple address blocks together that are contiguous... Let's say I wanted to create a larger block than what the class C space I was assigned. I could get re-assigned a class B address but what if my ISP only has class C addresses. I could in theory lease, if my ISP would let me, 255 networks, 192.168.0.0, - 192.168.255.0. If I do so it's still 255 networks with 254 hosts per network. But what if I wanted one address block instead. It's here I can used
classless
to break the rules to use a class B subnet mask to create 1 network 192.168.0.0 255.255.0.0.- The network ID 192.168.0.0
- The subnet mask 255.255.0.0
- The range 192.168.0.1 - 192.168.255.254 (65,534 hosts)
- The broadcast 192.168.255.255