Skip to content

Defining Networks with Subnet Masks

Subnetmask is the definer of networks. What part represents the network itself, and what part of the ip address represents the host in the network.

There are 3 classes

  • Class A: 0-127
  • Class B: 128-191
  • Class C: 192-223

The first octet defines the class of the network.

Like an ip of 10.5.99.110 is a class A network. An ip of 172.21.16.5 is a class B network and so on.

The class defines the standard subnet mask of each network.

So here are the 3 classes

  • Class A: 0-127 (default Subnet mask of 255.0.0.0 -> if we do classful subnetting)
  • Class B: 128-191 (default Subnet mask of 255.255.0.0 -> if we do classful subnetting)
  • Class C: 192-223 (default Subnet mask of 255.255.255.0 -> if we do classful subnetting)

If we do classless subnetting like we take an ip 10.1.5.63 but put a class C subnet mas to that network with 255.255.255.0. That is subnetting.

But why do we do this?

So if we have 4 branch offices and we don’t want that all offices share the same pool of ip addresses we can take a class A network 10.11.10.0 and put a class C subnet on it and we get 254 hosts that we can use. For example branch office 1 gets the network 10.11.10.0/24, branch office 2 gets the network 10.11.11.0/24 and so on.

Private and Public IP Addresses

Private ip addresses are defined to use everywhere. Like with a wireless network, for a wireless network you don’t have to get an ok from the government to run this wifi because it’s intended to use private. If you want to run a radio station for example the government has to approve that and gives you a frequency where you can send. For your private wifi that does not exist. Same analogy for those private ip addresses. These are used for private intentions. And they are not allowed to work on the internet.

NAT – network address translation

The job of a router or of the NAT is to block, hide and translate those private ip addresses to an ip address that works on the internet.

The router shares 1 public ip address with other routers on the internet. Behind that public ip addresses we can hide hundreds of our hosts in our private networks. All that works with portnumbers which get set behind the ip address.

Leave a Reply

Your email address will not be published. Required fields are marked *