08-07-2020 10:20 AM
Hi Guys, I am new to networking. I am studying from last two weeks about networking. I tried everywhere, but I am confused with IP addressing. Please check the below examples and suggest the correct answer. Sorry if you find this stupid:).
1) Network A - 192.168.1.0/24
Network B - 192.168.2.0/24
Are both IP mentioned above belongs to the same network?
2) Network A - 192.168.1.4/30
Network B - 192.168.1.8/30
Are both IP mentioned above belongs to the same network?
2) Network A - 192.168.1.1/24
Network B - 192.168.1.1/30
Are both IP mentioned above belongs to the same network?
Solved! Go to Solution.
08-07-2020 01:44 PM
I am not clear what other detail you are looking for. With a mask of /30 the network part of the fourth octet is 6 bits and the host part is 2 bits. So I gave the fourth octet in binary, separating the network bits and the host bits. In binary they were
000001 00 = 4
000010 00 = 8
It should be clear that the network bits of "4" are different from the network bits of "8" and so they are not in the same network.
08-07-2020 11:37 AM
Let me start with a quick review of basic concepts in IP addressing:
- an IP address is a 32 bit address which frequently uses notation of 4 octets such as 192.1.8.1.0.
- of the 32 bits in the address some of the bits define the network part of the address while other bits define the host part of the address. The dividing part is indicated by the /nn. So for example /24 indicates that the first 24 bits (the first 3 octets) are the network part and the last 8 bits (the fourth octet) are the host.
Using that information we can provide answers to your questions:
1) the /24 mask makes this question easier since the dividing point is between the third and fourth octets. 192.168.1 is the first network 192.168.2 is the second network and clearly they are not in the same network.
2) the /30 makes this question a bit more complicated since you need to think about the binary values to get the answer. So here is the fourth octet in binary for both addresses (I am showing them with the network bits (the first 6 bits) separated from the host bits (the last 2 bits)
4 is 000001 00
8 is 000010 00
clearly the network bits of 4 are not the same as the network bits of 8 and so they are not in the same network.
2) this one is a bit tricky because there is the same IP address 192.168.1.1 but with 2 different masks. /24 and /30. I would suggest that while it sort of looks like the same network that technically they are different networks.
08-07-2020 01:05 PM - edited 08-07-2020 01:06 PM
Hi Richard, Thanks for replying. Can you please elaborate on the second example in more detail.
08-07-2020 01:44 PM
I am not clear what other detail you are looking for. With a mask of /30 the network part of the fourth octet is 6 bits and the host part is 2 bits. So I gave the fourth octet in binary, separating the network bits and the host bits. In binary they were
000001 00 = 4
000010 00 = 8
It should be clear that the network bits of "4" are different from the network bits of "8" and so they are not in the same network.
08-08-2020 08:26 AM
I am glad that our suggestions have been helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.
In addition to the good suggestions from @Martin L I would suggest that the Cisco Learning Network would be a good resource. This link gets you to the Learning Network
https://learningnetwork.cisco.com/s/
08-07-2020 01:59 PM
Learning Subnetting is tricky; Beside the fact that there are 2 ways of doing subnetting: binary and decimal, you must learn basic of IP addressing first.
If your current book or materials are not sufficient enough (sometimes is hard to understand it), I would look for other sources, one that you can understand it; Using multiple resources for your studies is my preferred method of learning.
I recommend CCNA book by W. Odom (doesn't need to be the latest one) and videos you can find on youtube. There are plenty youtube videos on IP addressing and subnetting.
Regards, ML
**Please Rate All Helpful Responses **
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide