Tuesday, June 24, 2008

Chapter 3. Concepts in ip addressing

IP Address Components

CCNA candidates need to be fluent in their understanding of IP addressing concepts. The following sections detail how IP addresses are organized and analyzed, with a view to answering subnetting questions.

Address Class

Early in the development of IP, the IANA (Internet Assigned Numbers Authority) designated five classes of IP
address: A, B, C, D, and E. These classes were identified based on the pattern of high-order bits (the high-value bits at the beginning of the first octet). The result is that certain ranges of networks are grouped into classes in a pattern based on the binary values of those high-order bits


Address Class and Range


Class High-Order Bits 1st Octet Range
A 0 1-126
B 10 128-191
C 110 192-223
D 1110 224-239
E 11110 240-255


You might notice that 127 is missing. This is because at some point the address 127.0.0.1 was reserved for the loopback (sometimes called "localhost") IP—this is the IP of the TCP/IP protocol itself on every host machine.

Exam Alert

You absolutely must be able to identify the class of an address just by looking at what number is in the first octet. This is critical to answering subnetting questions.



Default Subnet Mask

Each class of address is associated with a default subnet mask, defines a single IP broadcast domain—all the hosts using that same network number and mask can receive each other's broadcasts and communicate via IP.


Address Class and Default Masks
Class Default Mask
A 255.0.0.0
B 255.255.0.0
C 255.255.255.0


One of the rules that Cisco devices follow is that a subnet mask must be a contiguous string of 1s followed by a contiguous string of 0s. There are no exceptions to this rule: A valid mask is always a string of 1s, followed by 0s to fill up the rest of the 32 bits. (There is no such rule in the real world, but we will stick to the Cisco rules here—it's a Cisco exam, after all.)

Therefore, the only possible valid values in any given octet of a subnet mask are 0, 128, 192, 224, 240, 248, 252, 254, and 255. Any other value is invalid.


Exam Alert

You should practice associating the correct default subnet mask with any given IP address; this is another critical skill in subnetting.




Exam Questions


1. Which of the following are alternate representations of the decimal number 227? Choose 2.

A. 0x227
B. 11100011
C. 0x143
D. 0xE3
E. 11100110

Answers B and D are correct. Answer A in decimal would be 551. Answer C in decimal would be
323. Answer E in decimal is 230.

2. Which of the following are alternate representations of 0xB8? Choose two.

A. 10110100
B. 10111111
C. 10111000
D. 184

E. 0x184

Answers C and D are correct. Answer A in hex is 0xB4. Answer B in hex is 0xBF. Answer E is simply
an attempt to trick you—the correct decimal answer is incorrectly expressed as a hex value.

3. You have been asked to create a subnet that supports 16 hosts. What subnet mask should you
use?

A. 255.255.255.252
B. 255.255.255.248
C. 255.255.255.240
D. 255.255.255.224

Answer D is correct. A will only support 2 hosts; B only 6, and C only 14. Watch out for the minus
2 in the host calculation! Answer C creates 16 hosts on the subnet, but we lose 2—one for the Net ID and one for the Broadcast ID.

4. Given the mask 255.255.254.0, how many hosts per subnet does this create?

A. 254
B. 256
C. 512
D. 510
E. 2

Answer D is correct. The mask 255.255.254.0 gives us nine 0s at the end of the mask; 29-2 =
510. Answer A is checking to see if you missed the 254 in the third octet because you are used to seeing 255. Answer B does the same thing plus tries to catch you on not subtracting 2 from the host calculation. Answer C tries to catch you on not subtracting 2, and Answer E is the Increment of the given mask that you might pick if you were really off track.

5. You are a senior network engineer at True North Technologies. Your boss, Mr. Martin, asks you to create a subnet with room for 12 IPs for some new managers. Mr. Martin promises that there will never be more than 12 managers, and he asks you to make sure that you conserve IP address space by providing the minimum number of possible host IPs on the subnet. What subnet mask will best meet these requirements?

A. 255.255.255.12
B. 255.255.255.0
C. 255.255.240.0
D. 255.255.255.240
E. 255.255.255.224

Answer The correct answer is D. Disregarding for the moment the possibility that Mr. Martin might be wrong, let's look at the requirements. He says make room for 12 managers, and make the subnets as small as possible while doing so. You need to find the mask that has sufficient host IP space without making it bigger than necessary. Answer A is invalid; 12 is not a valid mask value. Remember, a mask is a continuous string of 1s followed by a continuous string of 0s. In answer B, the mask is valid, but it is not correct. This mask has eight 0s at the end, which, when we apply the formula 28 -2 gives us 254 hosts. That makes more than enough room for the 12 managers, but does not meet the "as small as possible" requirement. Answer C has the correct mask value in the wrong octet. That mask gives us eight 0s in the fourth octet, plus another four in the third octet; that would give us 4094 hosts on the subnet. Answer E gives us 30 hosts per subnet, but that only meets half the requirement. This mask does not provide the minimum number of hosts

6. Your boss Duncan does not seem to be able to grasp subnetting. He comes out of a management meeting and quietly asks you to help him with a subnetting issue. He needs to divide the Class B address space the company uses into six subnets for the various buildings in the plant, while keeping the subnets as large as possible to allow for future growth. Because the company has not upgraded their Cisco equipment since it was purchased several years ago, none of the routers supports the "ip subnet zero" command. What is the best subnet mask to use in this scenario?

A. 255.255.0.0
B. 255.255.248.0
C. 255.255.224.0
D. 255.255.240.0
E. 255.255.255.224

The correct answer is C. The default mask for a Class B is 255.255.0.0. Answer C extends that
mask by three bits, creating eight subnets (23=8). The Zero Subnets are lost because the routers cannot use them, so we are left with six subnets. Answers A is incorrect because it is the default mask for a Class B and not subnetted at all. Answer B and D are incorrect because although they create sufficient subnets, they do not maximize the number of hosts per subnet and so are not the best answer. Answer E uses the correct mask in the wrong octet.

7. You have purchased several brand-new Cisco routers for your company. Your current address
space is 172.16.0.0 /22. Because these new routers support the "ip subnet zero" command, you realize you are about to gain back two subnets that you could not use with the old gear. How many subnets total will be available to you once the upgrades are complete?

A. 4
B. 2
C. 32
D. 62
E. 64

Answer E is correct. With "ip subnet zero" enabled, all 64 subnets created by the mask in use
become available. Answers A, B, and C are not even close and are simply distracters. Answer D wants to catch you by subtracting the zero subnets.

8. Which of the following are true about the following address and mask pair: 10.8.8.0 /24? Choose all that apply.

A. This is a Class B address.
B. This is a Class A address.
C. This is a Class C address.
D. 16 bits were stolen from the host field.
E. 24 bits were stolen from the host field.
F. The default mask for this address is 255.0.0.0.
G. The mask can also be written as 255.255.255.0.
H. The mask creates 65,536 subnets total from the default address space.
I. Each subnet supports 256 valid host IPs.
J. Each subnet supports 254 valid host IPs.

The correct answers are B, D, F, G, H, and J. Answers A and C are incorrect because this is a Class
A address. Answer E is incorrect because only 16 bits were stolen. Answer I is incorrect because it does not subtract the two IPs for the NetID and Broadcast ID.


9. Indy and Greg have configured their own Windows XP PCs and connected them with crossover
cables. They can't seem to share their downloaded MP3 files, however. Given their configurations, what could be the problem?

Indy's configuration:
IP: 192.168.0.65
Mask: 255.255.255.192

Greg's configuration:

IP: 192.168.0.62
Mask: 255.255.255.192


A. Indy is using a Broadcast ID for his IP.
B. Greg is using an invalid mask.
C. Indy's IP is in one of the Zero Subnets.
D. Greg and Indy are using IPs in different subnets.

Answer D is correct. With that mask, the Increment is 64. Greg is in the first subnet, and Indy is in
the second. Without a router between them, their PCs will not be able to communicate above layer
2. Answer A is incorrect; the Broadcast ID for Indy would be .63. Answer B is incorrect; nothing is wrong with the mask. Answer C is incorrect; the Zero Subnets are the first and last created, and Indy is in the second subnet. The question does not mention the Zero Subnets, and in any case Windows XP fully supports them.



10. You are given an old router to practice for your CCNA. Your boss Dave has spent a lot of time
teaching you subnetting. Now he challenges you to apply your knowledge. He hands you a note that says:
"Given the subnetted address space of 192.168.1.0 /29, give the E0 interface the first valid IP in the eighth subnet. Give the S0 interface the last valid IP in the twelfth subnet. The Zero Subnets are available. You have 10 minutes. Go."

Which two of the following are the correct IP and Mask configurations? Choose 2.
255.255.255.0

A. E0: 192.168.1.1
255.255.255.248

B. E0:
192.168.1.56
255.255.255.248

C. E0:
192.168.1.57
255.255.255.0

D. S0:
192.168.1.254
255.255.255.248

E. S0:
192.168.1.95
255.255.255.248



The correct answers are C and F. This is an Increment question. The Increment here is 8, so you
should start by jotting down the multiples of 8 (those are all the NetIDs), and then noting what 1 less than each of the NetIDs is (those are the Broadcast IDs). From there, it is easy to find what the first and last IPs in each subnet are. (Remember that Dave says we can use the Zero Subnets.) Answers A and D are incorrect because they do not use the subnetted address space Dave requested. Answer B is incorrect because it is a NetID. Answer E is incorrect because it is a Broadcast ID.


No comments: