How subnetting an IPv4 address works

179 views

How subnetting an IPv4 address works

In: 4

3 Answers

Anonymous 0 Comments

One way to explain it non-technically would be to compare it with a real address like `123 Exampelstreet`.

You try to write down the address in a paper form and you have only so many fields to write down all the letters and numbers.

If you have a street that has more houses on it or just housenumbers that are higher you may not have enough room room to write all the numbers down, but you can steal some space from the name of the street if it is small enough.

123 Exampelstreet
12345 Somestreet

Both fir in the same space but the way they use the space to write down house numbers and street name differs.

This is more or less the way suneettignworks.

If you have an address like

192.168.123.3

than the first three numbers are normally the network and the last number is the address in that network. `192.168.123` is the name of the street and `3` is the house number on that street.

Such a network has only room for 256 address and the first describes the network as a whole and the last is a way to say “all of them”. So really you only have 254 usable addresses in that network.

You can shrink or grow the network by taking part of the space used to describe the network away and give that space to write longer addresses in that network (or do the opposite fewer addresses and more networks.)

The way that works in practice can be a bit counterintuitive if you look at it from the way humans write things down, but if you want to go beyond ELI5:

if you write things down in Binary 192.168.123.3 becomes:

11000000.10101000.1111011.00000011

if you take the break between network and address one to the side it goes from

v
11000000.10101000.1111011 00000011

to

v
11000000.10101000.111101 1.00000011

or

v
11000000.10101000.1111011.0 0000011

One way to write down where the break between network and address in the network is is to count the bits.

Normally the address would have 24 bits be part of the network and 8 bits be part of the address and we write a little /24 at the end: 192.168.123.3/24

If we move the divider to the left we get a /23 and if we move it to the right we get a /25

You are viewing 1 out of 3 answers, click here to view all answers.