2

My question is not a duplicate "The slash after an IP Address - CIDR Notation" because the answers to this question say that CIDR is our SUBNET MASK. And My question is "If CIDR is our subnet mask - why am I provided with second subnet mask?"

So I am given bunch of IP/CIDR and subnet masks and I am asked to calculate # of subnets and hosts per subnet. For example

IP address ---- Subnet mask ----- Number of subnets ----- Number of hosts per subnet

128/8 ---------255.255.255.128 ------------------ ? -------------------------------- ? ---------------

What I am confused about is what does it mean to give subnet mask if we are given CIDR. I though CIDR is exactly subnet mask but represented with different notation.

From wiki: 192.168.100.14/24 represents the IPv4 address 192.168.100.14 and its associated routing prefix 192.168.100.0, or equivalently, its subnet mask 255.255.255.0, which has 24 leading 1-bits.

So I though if I have 128/8 then I have 255.0.0.0 as a subnet mask. But then I am given another subnet mask. How should I treat this?

Thanks

YohanRoth
  • 131
  • 5
  • There are already many questions and answers about this, for instance: http://networkengineering.stackexchange.com/questions/3697/the-slash-after-an-ip-address-cidr-notation – Ron Maupin Oct 28 '15 at 23:01
  • @RonMaupin I know what slash mean... – YohanRoth Oct 28 '15 at 23:10
  • @RonMaupin from you links to answers "The slash and the number following it is just a shorthand way to write a subnet mask. It's called CIDR (Classless Inter-Domain Routing) notation." And this is exactly what confuses me! Why am I giving another subnet mask then CIDR is just a notation for subnet mask – YohanRoth Oct 28 '15 at 23:10
  • Right but there are many questions about subnetting, and the accepted answer at the link tells you how to subnet, too. It's just binary math; change addresses and masks to binary, perform the actions, return to decimal. This has be answered many time in many ways on this site. You should search. – Ron Maupin Oct 28 '15 at 23:14

1 Answers1

2

The question is asking you to take the large network (with the slash notation) and divide it up into smaller subnets, each one using the given subnet mask.

So if you have a network 128/8 (or more correctly, 128.0.0.0/8), and you want to subdivide it into smaller subnets using the mask 255.255.255.128, how many subnets can you make? And how many hosts are in each of those subnets?

Note that this problem could be asked using all slash notation, or all dotted decimal. The problem uses both just to make sure you are proficient with both.

Ron Trunk
  • 66,852
  • 5
  • 65
  • 126
  • First of all it is not clear what 128/8 represents. 128 is class B. So first two octets are reserved for network part. While /8 represents mask for first octet. All bits that are not on in subnet mask should correspond to host addresses, right. then why we have 128/8 and not 128/16. if we do not consider first two octets and we say that subnet mask is 255.255.255.128 then I guess we have 2^9 subnets and 2^8-2 hosts. Right? – YohanRoth Oct 29 '15 at 04:15
  • @MaharajaX, the "C" in CIDR stands for classless. So your "128 is class B" statement is false. 128/8 would cover the entire range of 128.0.0.0 to 128.255.255.255. – YLearn Oct 29 '15 at 06:19
  • @MaharajaX Classful networks Like A B and C are obsolete and probably were when you were born. There are no longer any Classful networks. 128/8 means 128.0.0.0 255.0.0.0. – Ron Trunk Oct 29 '15 at 10:57
  • Also the number of hosts is wrong. – Ron Trunk Oct 29 '15 at 10:57
  • Alright, I confused smth then. So we have 256 subnets and 2^24-2 hosts, right? – YohanRoth Oct 29 '15 at 21:14
  • Can you join chat sometime? You seem to be even more lost. – Ron Trunk Oct 29 '15 at 22:02
  • I don't have an idea how to start a chat with you. But I would love to do this because I am really lost on what's going on. Please, let me know how to proceed thank you! – YohanRoth Oct 29 '15 at 22:45
  • Tell me if I am right: 128 - is network identifier. E.g network part is first 8 bits. While we have 2^17 subnets with 2^7-2 hosts. Is it correct? – YohanRoth Oct 29 '15 at 23:06
  • That is much closer. You were given a network with 2^24 addresses, and were asked to divide that up into networks with 2^7 addresses. You are right that you can get 2^17 networks. For each network you have defined, the network identifier is the first 25 bits - that is what the mask 255.255.255.128 tells you. Is that any clearer? – Ron Trunk Oct 30 '15 at 00:25