Is 192.168.X.X/24 (255.255.255.0) a class C private address?
You got it and you usually see it like this because of it being the default on so many home routers.
If so, can someone explain how is it possible to have a subnet mask
greater than 255.255.0.0? I thought 255.255.0.0 was the
default/natural mask of a class C private?
Greater as in 255.0.0.0 or 255.255.255.0? It's possible because you have 4 octet's in a Ip4 address. Which gives you 4 octets to mask.
In this example, however, my professor went on to subnet the networks,
separating them by 192.168.10.0 and 192.168.20.0 which made no sense
to me considering the original question was written with /24.
Ahh this is where you got confused. A subnet mask will tell you what part of an ip address is the network part. So if you have 192.168.XXX.XXX /16 or 255.255.0.0 we can see that only the first 2 octets are part of the network address and the last 2 octets are part of the host address. so any Ip's that start with 192.168 are now part of the same network and anything in the third octet is only used to identify a host.
So, if you take 192.168.10.xxx and 192.168.20.xxx /16 they are in the same network (192.168.xxx.xxx) if you change the mask to /24 (255.255.255.0) the first 3 octet's are now Network's and have to match. So 192.168.10.xxx and 192.168.20.xxx 10 and 20 don't match, they are different networks, and only the last octet is used to identify host on the network (255.255.255.0 255 is for networks, 0 is for host), and this gets much more advanced so get a good understanding of it now while you can. For instance you can use a ACL to route traffic to one host only. say 192.168.10.123 all you have to do is set the netmask to 255.255.255.255 and it will make sure it only goes to the host that matchs ever number in every octet.
If it is of the private class C range, why would the 3rd octet be
usable?
Now you know it's because of the netmask /24 =)
What a mask does is to define the separation between the network portion of an address, and the host portion of an address. IPv4 lets you slide these two pieces around to get a network which has enough host addresses to match your needs. This answer may help you to visualize this.
You can also use shorter masks to aggregate or summarize networks. This allows you to advertise a single route instead of a bunch of smaller routes.
But surely on everything has to be sent to a router/switch anyway
right? So why do you need to have the subnet mask on your computer? If
all data goes through the router, surely it is only the router that
needs to have the subnet mask on it?
Not everything needs to be sent to a router. Traffic destined for the same network will never go through the router. Switches don't count since they don't participate in layer-3, where IP is.
When a host wants to send something to another host, it masks the destination address to see if it is on the same network as itself. If it is, it just sends the traffic directly to the host on the same network. If the destination is on another network, it sends the traffic to its configured gateway. It does this using layer-2 (e.g. MAC) addresses, not by changing the destination IP address.
With IPv6, you basically have a single network size (/64
), so much of address manipulation is easier.
Best Answer
Classful networking is not used anymore. You can use whaever mask you need. Just be sure that RFC 1918 specifies private IPv4 addresses and those shouldnt appear on the Internet ( They will be probably dropped by first firewall )
Anyway, if the question fully specifies that you HAVE TO consider classful addressing which is obsolate, you can not modify the mask. Thats why it was so wasteful and it is not used anymore