Bytes for Internal network addresses

3

I have a repeating question in test in my college, which bothers me all the time.

I am translating it from another language, so bear with me:

Internal network addresses (please enter number of bytes for each field, use * if all bytes)

A class: __ __ __ __

B class: __ __ __ __

C class: __ __ __ __

I know that it should look like this:

A: ? * * * B: ? ? * * ...

I just not sure what exactly they are asking from me, and what kind of math is needed there.

Ne Nenne

Posted 2018-06-30T11:18:26.640

Reputation: 183

2Are you sure the question says 'bytes' and not 'bits'? – user1686 – 2018-06-30T11:27:54.327

That's the exact question I've asked my teacher. He laughed and said, yes, bytes. – Ne Nenne – 2018-06-30T11:30:09.207

2...Well that makes the test question even more confusing (and I'd say stupid) than it already was. Is this a standalone question or does the test have other similar ones? – user1686 – 2018-06-30T11:38:12.083

2So if I understand correctly you’re expected to just give an example...? However, classful networking is a thing of the past. You should request this question be removed, with appropriate respect of course. – Daniel B – 2018-06-30T11:41:22.547

2This question is wrong on so many levels and shows a complete lack of understanding of basic networking and computer hardware. It seems the person who wrote has absolutely no idea what they are talking about. Note: I am talking about the exam question quoted by the OP, not this question. – Jörg W Mittag – 2018-06-30T14:23:26.647

Answers

7

I think the question is asking about Classful Networks - something which has largely been confined to history due to CIDR (Classless Inter-Domain Routing).

TL;DR

The question isn't clear, appears to contain fundamental misunderstanding, and uses an archaic "fact" (which is commonly confused) for grading students. I'd push back.


As they are asking about "internal network addresses", then it's possible they are referring to the reserved address spaces for Private Network Addresses (however I don't think this is their intention):

  • 10.0.0.0/8 - one Class A network
  • 172.16.0.0/12 - 16x Class B networks, back to back
  • 192.168.0.0/16 - 256x Class C networks

The question goes on to say "please enter number of bytes for each field"... An IPv4 address is a 32-bit address, that is broken into four 8-bit (1 byte / octet) chunks and written in decimal. Let's presume that by "... number of bytes ..." they actually mean "... number of bits ..." - especially as there are four "fields" given.

He laughed and said, yes, bytes

rolleyes


In this case, the question could probably be better worded as below (though it's still an odd question to ask):

Write the number of bits of each octet that is used to represent the network prefix.

Huh... "network prefix"?

That /8, /12 or /16 at the end of the reserved address spaces above is one method of representing a subnet mask. Another representation that you may be more familiar with is a value such as 255.255.255.0 (which equates to /24).

  • The /x notation states "x bits are used for the network address"
  • The 255.255.255.0 notation states "this is the mask used for the network address".

255.255.255.0 or /24 can be written out in full, in binary as:

dec      255      255      255        0  
bin   11111111 11111111 11111111 00000000

Class A

So, given that a Class A network is /8 (or 255.0.0.0), it could be written as:

dec      255        0        0        0  
bin   11111111 00000000 00000000 00000000

The answer I'd give would be: 8, 0, 0, 0.

Class B

So, given that a Class B network is /16 (or 255.255.0.0), it could be written as:

dec      255      255       0        0  
bin   11111111 11111111 00000000 00000000

The answer I'd give would be: 8, 8, 0, 0.

Class C

So, given that a Class C network is /24 (or 255.255.255.0), it could be written as:

dec      255      255      255        0  
bin   11111111 11111111 11111111 00000000

The answer I'd give would be: 8, 8, 8, 0.


Conversely, if what they actually wanted to ask was:

Write the number of bits of each octet that is used to represent the host address.

I'd use the following responses - note the bits are inverted from the subnet mask to produce the "host address mask".

Class A

So, given that a Class A network is /8 (or 255.0.0.0), it could be written as:

dec      255        0        0        0  
bin   11111111 00000000 00000000 00000000  <== subnet mask
bin   00000000 11111111 11111111 11111111  <== host address mask

The answer I'd give would be: 0, 8, 8, 8.

Class B

So, given that a Class B network is /16 (or 255.255.0.0), it could be written as:

dec      255      255        0        0  
bin   11111111 11111111 00000000 00000000
bin   00000000 00000000 11111111 11111111  <== host address mask

The answer I'd give would be: 0, 0, 8, 8.

Class C

So, given that a Class C network is /24 (or 255.255.255.0), it could be written as:

dec      255      255      255        0  
bin   11111111 11111111 11111111 00000000
bin   00000000 00000000 00000000 11111111  <== host address mask

The answer I'd give would be: 0, 0, 0, 8.

Attie

Posted 2018-06-30T11:18:26.640

Reputation: 14 841

Good anser according to Cisco. For the rest of the world Class A used to be n.h.h.h, class B n.n.h.h (so NOT 172.16/12 as on some Cisco websites) and class C n.n.n.h/24 (so 255.255.255.0 if you prefer that over /24). – Hennes – 2018-06-30T11:44:31.650

I was touch is in the 'rest of wold way'. Namy books agreed. Then I hit a Cisco website. Some of those (but not all). disagreed. Heck of a mess. :) – Hennes – 2018-06-30T11:52:35.000

2Sjees, I answered to quickly. s/touch/thought. s/namy/many/. Agrh! Coffee time. – Hennes – 2018-06-30T12:08:10.637

1@Hennes: For class B, both /12 and /16 are correct in different ways. Individual "class B" networks were always /16's, however, the entire reserved range for private use is a /12 because it was a chunk of 16 class-B's, therefore Cisco is correct here when talking about RFC1918 ranges. (And likewise, 192.168.0.0/16 is correct because it was originally a chunk of 256 class-C's, even though each class-C was a /24.) – user1686 – 2018-06-30T12:10:31.457

Thanks for clearing that up @grawity - I think I've been round this one before... Hopefully my edits make sense. – Attie – 2018-06-30T12:25:05.743

1Typo alert: 192.18.0.0/16 in the answer should be 192.168.0.0/16 – hmakholm left over Monica – 2018-06-30T14:29:43.280