Skip to main content

Supernet question

More
15 years 9 months ago #29451 by Ophelia
Supernet question was created by Ophelia
Hello to everybody. :D :D :D
I would like to ask you a question about supernetting.
So...

"Class C networks 192.168.32.0 and 192.168.33.0 could
be combined to create 192.168.32.0/23."

"Class C networks 192.168.34.0 and 192.168.35.0 could be combined to create 192.168.34.0/23."

It is not possible to create a supernet that includes just
192.168.1.0 and 192.168.2.0. To include both these networks the mask must be 22 bits, and a 22-bit mask must also include the networks 192.168.0.0 and 192.168.3.0.

I don't understant why we cant combine 192.168.1.0 and 192.168.2.0. Can anybody exmplain this to me?
Thanx a lot. And sorry for my english. Im from greece.
More
15 years 9 months ago #29453 by Smurf
Replied by Smurf on topic Re: Supernet question
Ok, here goes;

You need to look at the Subnet when asking questions like this. /23 will give a subnet of 11111111.11111111.11111110.00000000

When it determines if the traffic is on the local LAN or needs to be routed, it will do an AND on the subnet with the Host IP, this will give us the NetworkID, this is compared with the destination IP and if they match, it is a local machine. Now, if you look at the number of hosts that you can have within the above NetworkID, you can have;

0.00000000 (not a valid host, as this is used to determine the network id) all the way to 1.11111111 (not a valid host as its the broadcast). So, you have all the hosts in between.

This will therefore give the boundarys of the network portion. In your example;

192.168.32.0 -> 192.168.33.255 are the host within the network id 192.168.32.0/23. This is because you get this with the maths;

192.168.32.0 = 11000000.10101000.00100000.00000000
The bit in bold is the network id
192.168.33.0 = 11000000.10101000.00100001.00000000
The bit in bold is the network id.

As you can see, the bit in bold match, therefore its ok. If we now look at the bit that is not possible;

192.168.1.0 = 11000000.10101000.00000000.00000000
The bit in bold is the network id
192.168.2.0 = 11000000.10101000.00000010.00000000
The bit in bold is the network id

As you can see, they dont match, therefore with this /23, it will not work as the comparison will see that the Network ID is deferent.

Now, if we do this with a /22, then we get this;

192.168.1.0 = 11000000.10101000.00000000.00000000
The bit in bold is the network id
192.168.2.0 = 11000000.10101000.00000010.00000000
The bit in bold is the network id

Now the network id matches.

An easy way to determine the boundarys of the NetworkID's depending on the subnet is as follows;

You have a subnet of 255.255.252.0, what are valid network id's ?

Look a tthe 3rd Octect, do 256-252, you get 4. This is the factor that the NetworkID's will jump. So we get the following;

192.168.0.0/22 (first Network)
192.168.4.0/22 (second Network)
192.168.8.0/22 (third network)
etc...

If you have a subnet of 255.255.248.0, what are valid network id's ?

Again, look at the 3rd Octect, do 256-248, you get 8. This is the factor that the NetworkID's will jump. So forexample;

192.168.0.0/21
192.168.8.0/21
192.168.16.0/21

Hope that helps somewhat

Cheers

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
More
15 years 9 months ago #29454 by timparker
Replied by timparker on topic Re: Supernet question
Very nice. I started to do some Googling to try and find an answer and educate myself. This is very understanable! Thanks.
More
15 years 9 months ago #29462 by Ophelia
Replied by Ophelia on topic Re: Supernet question
Thank you very much. I understood these. Thanx a lot.. :D :D :D :D

Can i ask something else?
"Class C networks 192.168.32.0 and 192.168.33.0 could
be combined to create 192.168.32.0/23."

Can these be solved like:

2^n=2 -> n=1 bit

Default sm c class: 255.255.255.0
New sm: 255.255.11111110.00000000
Dec: 255.255.254.0

or its wrong? :( I was having exams 2 hours ago.. the first part was like the one you solved... and the other was like the one i solve here. I suppose its correct? He will give me the half exercise correct :( I didnt saw this on time... but its ok. thank you.
More
15 years 9 months ago #29463 by Smurf
Replied by Smurf on topic Re: Supernet question
Not a problem

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
More
15 years 9 months ago #29466 by Ophelia
Replied by Ophelia on topic Re: Supernet question
i hope you saw the edit:P wow you're really fast!
Time to create page: 0.130 seconds