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](../../I/static/images/86dc477e715fd08d55ee72c0a276c583075dfbec9dbd33e12907e9ea1773ff64.gif)
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
.
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