Which one of the following is not a correct IP address?
- (a)201.54.122.107
- (b)102.45.221.710
- (c)102.45.201.22
- (d)250.234.123.124
Correct — B, (b) 102.45.221.710. The ask is negative and the booklet prints the 'not' in bold italics: three of these four strings are well-formed addresses and one cannot exist. An IPv4 address is 32 bits long, written for human convenience as four decimal numbers separated by dots. Each of those four numbers stands for exactly eight bits, which is why it is called an octet, and eight bits can hold 2 to the power 8, that is 256, distinct values. Counting from zero, the largest value any single octet can carry is 255. Option (b) ends in 710. No arrangement of eight bits produces 710 — the binary form of 710 needs ten bits — so the string is not a 32-bit address written in dotted-decimal at all. It is a well-formed-looking sequence of four numbers that no host could ever be given, and that is what makes it the incorrect address. The check takes one pass of the eye: read each of the four fields and ask only whether it lies between 0 and 255. In option (a) the fields are 201, 54, 122 and 107; in option (c) they are 102, 45, 201 and 22; in option (d) they are 250, 234, 123 and 124. Every one of those twelve numbers is within range, so all three are syntactically valid addresses and only option (b) fails. One further point is worth settling, because it is where a well-prepared candidate can talk himself out of the right answer. Option (d) begins with 250, which falls in the 240 to 255 band that classful addressing set aside as Class E for experimental and reserved use. An address in a reserved block is not an incorrectly formed address; it is a correctly formed address that has been kept back from ordinary assignment. The question asks which is not a correct IP address, and correctness here is a matter of form, so 250.234.123.124 stays valid and 102.45.221.710 is the only answer.
- (a)201.54.122.107 — This is a correct IP address. Its four octets are 201, 54, 122 and 107, and every one of them lies inside the permitted range of 0 to 255, so the string represents a genuine 32-bit value. Under the older classful scheme, a first octet between 192 and 223 marks a Class C address, where the first three octets identify the network and only the last identifies the host — which is why Class C networks are small, with 254 usable host addresses each. None of that bears on the question being asked. The class of an address, the network it belongs to and whether it has actually been allocated to anybody are all separate matters from whether the address is well formed. A candidate who starts sorting these options into classes is doing more work than the item requires and is likelier to talk himself out of the single arithmetic test that decides it.
- (c)102.45.201.22 — This is a correct IP address. Its octets are 102, 45, 201 and 22, all within 0 to 255. It is worth comparing it letter by letter with option (b), because the two are built to look alike: both begin 102.45, both carry a third octet in the two hundreds, and only the last field differs, 22 against 710. That is the entire design of the item — the eye is invited to scan the shape of the string rather than the value of each field. A first octet of 102 puts this address in the 1 to 126 band that classful addressing called Class A, where one octet identifies the network and three identify the host. Again, that classification changes nothing about the answer: the only test the question applies is whether each of the four numbers can be held in eight bits.
- (d)250.234.123.124 — This is a correct IP address, and it is the option most likely to tempt a candidate away from the right answer. Its octets are 250, 234, 123 and 124, all inside the range of 0 to 255, so the string is a properly formed dotted-decimal address. The hesitation comes from the leading 250: first octets from 240 to 255 fall in the block that classful addressing designated Class E, reserved for experimental use and not handed out to ordinary hosts. Reserved is not the same as malformed. Several other blocks are set aside in the same way — 127 for loopback, 10.0.0.0 to 10.255.255.255 and 172.16 to 172.31 and 192.168 for private networks, 169.254 for link-local, 224 to 239 for multicast — and every address inside them is a valid IPv4 address. This question asks about the form of the address, not about who may use it.
An IP address is the numerical label that identifies an interface on a network running the Internet Protocol, and IPv4 fixes its length at 32 bits. Writing 32 binary digits out is unreadable, so the address is presented in dotted-decimal notation: the 32 bits are cut into four groups of eight, each group is converted to its decimal value, and the four values are joined by dots. The whole of this question follows from that one structural fact. Eight bits have 256 possible states, so a decimal octet runs from 0 to 255 and a field outside that range describes no binary pattern of the right length. The 32-bit space gives about 4.3 thousand million addresses in all, which is why address exhaustion became a live problem and why IPv6 was designed with 128-bit addresses written as eight groups of hexadecimal digits. An IPv4 address is not one number but two joined together: a network part and a host part. The original classful scheme decided where the boundary fell from the leading octet — Class A from 1 to 126, Class B from 128 to 191, Class C from 192 to 223, Class D from 224 to 239 for multicast and Class E from 240 to 255 reserved. Classful addressing has largely given way to classless inter-domain routing, where an explicit subnet mask or a prefix length such as /24 marks the boundary wherever the network designer wants it. Several ranges are permanently reserved: 127.0.0.0/8 for loopback, and 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks that reach the public internet only through network address translation.
The computers block of this paper is written for a candidate who has used a computer rather than built one, and its items test structural facts that have a single unambiguous consequence. This is the purest example in the block: one fact — an octet is eight bits, so it cannot exceed 255 — settles the question with no networking knowledge at all. The design of the option set is worth studying because the same trick recurs in every paper that asks this. The invalid address is not made obviously wrong; it is given the same length, the same number of dots and a first half identical to another option, so that a candidate reading for shape rather than for value slides over it. Two of the remaining options carry leading octets that invite a candidate to start classifying — 201 in Class C, 250 in the reserved Class E — and that invitation is the second trap, because knowing more about address classes than the question needs is exactly what makes a prepared candidate reject a perfectly valid address. The habit to build is to answer the question that was asked. Here the question is about form, so the procedure is to read twelve numbers and check each against 255, and to stop as soon as one fails. The related items in the same block reward the same discipline: they turn on the size of a field, the number of links in a topology or the base of a number, and each has a one-line arithmetic answer that does not improve with elaboration.
- An IPv4 address is 32 bits long and is written in dotted-decimal notation as four octets of eight bits each, separated by dots. Eight bits hold 256 distinct values, so each field runs from 0 to 255 and any decimal field above 255 describes no eight-bit pattern and therefore no valid address.
- In this question the failing field is the 710 at the end of option (b). Its binary form needs ten bits, so it cannot occupy an octet; every other field in the four options lies inside 0 to 255, which is why the other three strings are all correctly formed addresses.
- Classful addressing read the class from the leading octet: 1 to 126 Class A, 128 to 191 Class B, 192 to 223 Class C, 224 to 239 Class D for multicast and 240 to 255 Class E, reserved and experimental. The scheme has largely been replaced by classless inter-domain routing with an explicit prefix length such as /24.
- An address inside a reserved or special-purpose block is still a validly formed address. 127.0.0.0/8 is loopback, 169.254.0.0/16 is link-local, and 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are the private ranges that reach the public internet through network address translation.
- An IPv4 address carries a network part and a host part, and the subnet mask or prefix length is what marks the boundary between them. The 32-bit space allows about 4.3 thousand million addresses in total, and its exhaustion is the reason IPv6 uses 128-bit addresses written as eight hexadecimal groups.
- Reading the four strings for shape rather than value. The invalid option shares its first two fields with a valid one and has the same number of dots, so only checking each field against 255 separates them.
- Rejecting the address that begins with 250 because 240 to 255 is the reserved Class E band. A reserved address is correctly formed; the question asks about form, not about whether the address may be assigned.
- Confusing the limit on a field with the limit on the address. Each field stops at 255, but the address as a whole is a 32-bit number and 255.255.255.255 is a perfectly well-formed value.
- Assuming that any address containing a 0 or a 255 is invalid. Those values are ordinary octet values; whether a particular address is a network address or a broadcast address depends on the subnet mask, which the question does not give.
IP addressing appears in the computers block in three recurring shapes. The first is this one — four dotted-decimal strings with one field out of range, asked negatively. The second gives an address with a prefix or a mask and asks for the network address, the broadcast address or the number of usable hosts, which needs the same octet arithmetic done in binary. The third asks a definitional question: how many bits an IPv4 or IPv6 address has, which class or reserved block a given leading octet falls in, or what network address translation does. All three are answered from the same small set of structural facts, and the set is worth memorising exactly: 32 bits in four octets, each field 0 to 255, the five class bands by leading octet, the three private ranges, loopback at 127, and 128 bits in hexadecimal for IPv6. Expect the invalid option to be camouflaged rather than obvious, and expect at least one valid option to sit in a reserved band so that a candidate who half-remembers the class table is tempted to reject it.
No directly related past PYQ was found.
- practice — not a real PYQ
An IPv4 address is written in dotted-decimal notation as four fields separated by dots. How many bits does each field represent, and what is the largest decimal value it can take?
- (a)4 bits, largest value 15
- (b)8 bits, largest value 255
- (c)8 bits, largest value 256
- (d)16 bits, largest value 65535
Answer(b) 8 bits, largest value 255 — the 32 bits of an IPv4 address are divided into four groups of eight, and eight bits have 256 distinct states. Counting from zero, those states run 0 to 255, so 255 is the largest value and 256 is one past the end. That single fact is what makes a field such as 710 impossible, because its binary form would need ten bits.
- practice — not a real PYQ
Which one of the following is a correctly formed IPv4 address?
- (a)300.1.1.1
- (b)192.168.0.256
- (c)10.10.10.10
- (d)1.2.3.4.5
Answer(c) 10.10.10.10 — all four of its fields lie within 0 to 255 and there are exactly four of them. The first has a leading field of 300 and the second a trailing field of 256, both beyond what eight bits can hold, and the last has five fields where an IPv4 address has four. That 10.10.10.10 belongs to the private 10.0.0.0/8 range does not affect its validity, since a reserved or private address is still correctly formed.