GLOBAL KNOWLEDGE NETWORK ä CERTIFICATION PRESS Cisco Certified Network Associate Exam Routing and Switching Study Guide (640-407)

Chapter 3 IP Addressing

BOOK TABLE OF CONTENTS | SELF TEST | RETURN TO HOME PAGE

Certification Objectives

*

Structure of an IP Address

*

Special Cases: Loopback, Broadcast, and Network Addresses

*

Network Addresses

*

Loopback Address

*

Local Broadcast

*

All-Hosts Broadcast

*

All-Subnets Broadcast

*

Identifying Address Classes

*

Class A

*

Class B

*

Class C

*

Class D

*

Class E

*

Importance of the Subnet Mask

*

Converting between Binary and Decimal

*

Decimal to Binary Conversion

*

Binary to Decimal Conversion

*

From the Classroom

*

Powers of 2-some numbers you really need to know

*

Purpose of Subnetting

*

Adding Bits to the Default Subnet Mask

*

Choosing a Subnet Mask

*

Impact on the Number of Hosts

*

Determining Address Ranges for Each Subnet

*

Crossing Octet Boundaries with Subnet Bits

*

Variable-Length Subnet Masking

*

Supernetting

*

From the Classroom

*

IP: The Next Generation

*

Setting IP Addresses and Parameters

*

Router> terminal ip netmask-format {bitcount, decimal, or hex}

*

Router(config-line)# ip netmask-format {bitcount, decimal, or

*

hex

} *

Router(config-if)# ip address address subnet-mask

*

Host Name to Address Mappings

*

Router(config)# ip host hostname [tcp-port-number] address {ip addresses}

*

Router(config)#ip domain-name domain name

*

Router(config)# ip name-server {name server ip addresses}

*

Router(config)# (no) ip domain-lookup

*

Router# show hosts

*

Using Ping

*

Simple Ping

*

Extended Ping

*

Using IP TRACE and Telnet

*

Telnet

*

IP TRACE

*

Certification Objectives

- Classes of IP Addresses
- Subnetting and Subnet Masks
- Subnet Planning
- Complex Subnetting
- Configuring IP Addresses with Cisco IOS

The specifications for the Internet Protocol (IP) were established by RFC 791 in 1982. Part of these specifications outlined a structure for IP addresses. {Answer to Self Test Question #57} This structure provides for a 32-bit logical address for each host and router interface {Answer to Self Test Question #25}An IP address is expressed as four decimal values in the range of 0-255, separated by periods. These decimal values each represent 8 bits of the 32-bit address, known as an octet. This is called dotted-decimal notation. An example of this would be 155.127.23.12.

The IP protocol is used for end-to-end routing of data across a network, which may mean that an IP packet must travel across multiple networks, and may cross several router interfaces to get to its destination. At the IP level, the destination IP address remains the same, but since each interface may have its own hardware address, the packet's destination hardware address changes as it crosses each interface on the way to the destination. The constant IP destination address forms the basis for routing the packet through the network to its final destination.

This chapter will cover the basics of IP addressing, including issues such as address structure and classes, and the role of subnet masks. It will also describe the process of segmenting a network into subnets through the use of subnet masks. Lastly, it will explain the command syntax used by Cisco IOS to configure IP addressing on a router.

When you have completed this chapter, you will be able to:

- Explain the use and implementation of IP address classes
- Explain subnetting and the use of subnet masks
- Describe the process of subnet planning
- Describe some complex subnetting techniques
- Describe IP address configuration and testing commands on a Cisco router

Classes of IP Addresses

As originally defined, the IP addressing standard did not provide for address classes; these were later added to provide ease of administration.{Answer to Self Test Question #26}The implementation of address classes divided the address space into a limited number of very large networks (Class A), a much larger number of intermediate-sized networks (Class B), and a very large number of small networks (Class C). {Answer to Self Test Question #27} {Answer to Self Test Question #58}In addition, some special address classes were also defined, including Class D (used for multicasting), and Class E, which is generally referred to as the experimental or research class. Although there are exceptions to the rules expressed here, the focus of this chapter will be on classful IP addressing.

Structure of an IP Address

The 32-bit structure of an IP address is comprised of both a network address and a host address. The number of bits assigned to each of these components varies with the address class.

{Answer to Self Test Question #24}The scheme employed in IP addressing is roughly analogous to the concept of a street address. Just as a house may be defined as being at 121 Main St., an IP address includes the network address (Main St.) as well as the host address (number 121). Our house address makes it possible for the mail to reach our house, and an IP address makes it possible to route data from a source host to its destination.

Figure 3-1 depicts the organization of network addresses using a network and host address:

Figure 1 Network and host addresses

The concept of subnetting extends the network portion of the address to allow a single network to be divided into a number of logical sections (subnets). Routers look at each of these subnets as distinct networks, and can route among them. This helps in managing large networks, as well as isolating traffic between different portions of the network. This traffic isolation is possible because network hosts, by default, can only communicate with other hosts on the same network. In order to communicate with other networks, we need to use a router. A router is essentially a computer with multiple interfaces. Each interface is attached to a different network or subnet. Software within the router performs the function of relaying traffic between networks or subnets. To do this, it accepts packets via an interface with an address on the source network, and relays it through an interface attached to the destination network, as illustrated in Figure 3-2.

Figure 2 Router among networks showing router interface addresses

By using a router, only traffic that needs to traverse a network other than its local network will pass the router boundary. If the network is designed so that hosts routinely communicate within their own subnets, and only cross the router on an exception basis, the network can handle much more traffic than it could if it were not segmented.

Special Cases: Loopback, Broadcast, and Network Addresses

{Answer to Self Test Question #28} ,{Answer to Self Test Question #59}

Certain addresses in the IP address space have been reserved for special purposes, and are not normally allowed as host addresses. The rules for these reserved addresses are as follows:

- The network address portion of an IP address can not be set to "all binary ones" or "all binary zeros"
- The subnet portion of an IP address can not be set to "all binary ones" or "all binary zeros"
- The host address portion of an IP address can not be set to "all binary ones" or "all binary zeros"
- The network 127.x.x.x can not be used as a network address

Network Addresses

{Answer to Self Test Question #1}

When all the bits in the host portion of an IP address are set to zero, it indicates the network, rather than a specific host on that network. These types of entries are often found in routing tables, since routers control traffic between networks, not individual hosts.

In a subnetted network, setting the host bits to zero would indicate the specific subnet. Also, the bits allocated for the subnet may not be all zeros, since this would refer to the network address of the parent network.

Lastly, the network bits cannot be all zeros, since zero is not an allowed network address, and is used to indicate an "unknown network or address".

Loopback Address

{Answer to Self Test Question #60}

The network address 127.x.x.x has been designated as a local loopback address. The purpose of this address is to provide a test of the local host's network configuration. Using this address provides an internal loopback test of the protocol stack, as opposed to using the host's actual IP address, which would require a network connection.

Local Broadcast

{Answer to Self Test Question #30}, {Answer to Self Test Question #61}

When all the bits in an IP address are set to ones, the resulting address, 255.255.255.255 , is used to send a broadcast message to all hosts on the local network. This configuration at the network-layer is mirrored by a corresponding hardware address that is also all ones. Generally this hardware address will be seen as FFFFFFFFFFFF. Routers do not usually pass these types of broadcasts unless specifically configured to do so.

All-Hosts Broadcast

{Answer to Self Test Question #31}

If we set all the host bits in an IP address to ones, this will be interpreted as a broadcast to all hosts on that network. This is also called a directed broadcast, and can be passed by a router if configured to do so. Sample all-host broadcast addresses would look like 132.100.255.255 or 200.200.150.255.

All-Subnets Broadcast

{Answer to Self Test Question #32}

Another type of directed broadcast can be achieved by setting all the subnet address bits to ones. In this case, a broadcast would be propagated to all subnets within a network. All-subnets broadcasting is rarely implemented in routers.

Identifying Address Classes

{Answer to Self Test Question #2}

The class of an IP address can be determined by looking at the first (most significant) octet in the address. The bit pattern associated with the highest-order bits determines the address class. The bit patterns also define the range of decimal values for the octet that are associated with each address class.

Class A

With a Class A address, eight bits are allotted to the network address, and 24 bits to host addresses.

{Answer to Self Test Question #33} , {Answer to Self Test Question #62}If the highest bit in the first octet is a zero (0), the address is a Class A address. This corresponds to possible octet values of 0-127. Of these, both zero and 127 have reserved functions, so the actual range is 1-126. There are only 126 possible networks that are Class A, since only eight bits are reserved for the network address, and the first bit must be a zero. However, with 24 bits available for host numbers, each network can have 16,777,213 hosts.

Class B

{Answer to Self Test Question #6}

With a Class B address, 16 bits are allotted to the network address, and 16 bits to host addresses. A Class B address is characterized by a bit pattern of 10 at the beginning of the first octet. This corresponds to values from 128-191. Since the first two bits are pre-defined, there are actually 14 bits available for unique network addresss, so the possible combinations yield 16,383 networks, with each network accommodating 65,533 hosts.

Class C

{Answer to Self Test Question #3},{Answer to Self Test Question #4}

Class C addresses allocate 24 bits to the network address, leaving 8 bits for host addresses. A Class C address will have a bit pattern of 110 leading the first octet, which corresponds to decimal values from 192-223. With a Class C address, only the last octet is used for host addresses, which limits each network to a maximum of 254 hosts per network. Since there are 21 bits available for unique network numbers (three bits are already preset to 110), there are 2,097,151 possible networks.

Class D

{Answer to Self Test Question #34} {Answer to Self Test Question #63}

Class D addresses have a bit pattern that begins with 1110. This translates into octet values from 224-239. These addresses are not used for standard IP addresses. Instead, a Class D address refers to a group of hosts, who are registered as members of a multicast group. A multicast group is similar to an e-mail distribution list. Just as you can address a message to a group of individuals using a distribution list name, you can send data to a group of hosts by using a multicast address. Multicasting requires special routing configuration; it is not forwarded by default.

Class E

{Answer to Self Test Question #29}

If the first four bits of the first octet are 1111, the address is a Class E address. These are addresses that start with 240-254. This class of address is not used for conventional IP addresses. This address class is sometimes referred to as the experimental or research class.

The bulk of our discussion will focus on address Classes A, B, and C, since these are the classes used for routine IP addressing. Table 3-1 summarizes the characteristics of address classes.

Address Class | Bit Pattern in the first octet | Range of Addresses
Class A | 0xxxxxxx | 1-126
Class B | 10xxxxxx | 128-191
Class C | 110xxxxx | 192-223
Class D | 1110xxxx | 224-239
Class E | 1111xxxx | 240-254

Table 1 IP Address Ranges, Classes, and Bit Patterns

Importance of the Subnet Mask

{Answer to Self Test Question #37}, {Answer to Self Test Question #51}

An IP address cannot exist without an associated subnet mask. {Answer to Self Test Question #65}The subnet mask defines how many of the 32 bits that make up an IP address are used to define the network, or the network and associated subnets. The binary bits in the subnet mask form a filter that only passes that portion of the IP address that should be interpreted as the network address. {Answer to Self Test Question #36}The process by which this is done is called bitwise ANDing. Bitwise ANDing is a logical operation performed on each bit in the address, and the corresponding mask bit. The results of the AND operation are as follows:

1 and 1 = 1

1 and 0 = 0

0 and 0 = 0

So the only time this operation yields a 1 value is when both input values are a 1.

From the example shown in Table 3-2, we can see that an IP address of 189.200.191.239 with a subnet mask of 255.255.0.0 is interpreted as the address of a host on the 189.200.0.0 network, which has a host address of 191.239 on that network.

{Answer to Self Test Question #64}To help you see the relationship of the bits and the dotted-decimal notation, the table shows the addresses and masks in both binary and decimal form. A quick way of doing these conversions is to use the Windows Calculator in scientific mode. It will translate between binary and decimal formats.

| 1st Octet | 2nd Octet | 3rd Octet | 4th Octet
IP Address | 10111101 (189) | 11001000 (200) | 10111111 (191) | 11101111 (239)
AND (each bit) |  |  |  |
Subnet Mask | 11111111 (255) | 11111111 (255) | 00000000 (0) | 00000000 (0)
Result |  |  |  |
Network address | 10111101 (189) | 11001000 (200) | 00000000 | 00000000

Table 2 How the Subnet Mask Determines the Network Address

{Answer to Self Test Question #5}, {Answer to Self Test Question #39}

Each class of IP network has a default subnet mask, which defines how many bits of an IP address, for each address class, will represent the network address with no subnetting. These default masks are shown in Table 3-3.

Address Class | Default Subnet Mask | Network Bits | Networks | Host Bits | Hosts
Class A | 255.0.0.0 | 8 | 126 | 24 | 16,777,206
Class B | 255.255.0.0 | 16 | 16,383 | 16 | 65,533
Class C | 255.255.255.0 | 24 | 2,097,151 | 8 | 254

Table 3 Default Subnet Masks, Maximum Networks, and Hosts

Converting between Binary and Decimal

{Answer to Self Test Question #35}

In order to manage IP addresses, it is necessary to become intimately acquainted with the process of converting between binary and decimal equivalents. Just as the position of a digit in a decimal number indicates its value in powers of 10, the position of a bit in a binary number indicates its value in powers of 2, as described in Table 3-4. In other words, each bit value doubles as the bit position moves from right to left. This table only goes as far as eight bits (one octet). To extend this table, we would simply add bits to the left, with each new bit having a value double that of the previous bit.

| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
Binary Bits | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
Power of 2 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20
Decimal | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

Table 4 Bits and Associated Decimal Values in an Octet

Decimal to Binary Conversion

{Answer to Self Test Question #8}

In order to convert a decimal number to its binary equivalent, the first step is to find the highest-order binary bit that will fit into the number. The highest-order bit means the bit position with the greatest decimal value. The decimal value of this bit is subtracted from the number, and then the highest-order bit that fits into this remainder is determined. This process is repeated until the remainder is zero. All intervening bit positions are set to zero.

As an example, let's convert the decimal 178 to binary.

1. Looking again at Table 3-4, we can see that the highest-order bit that will fit into 178 is the 128 (27), The next higher bit would be 256 (28), which will not fit into 178.
2. 178-128 = 50.
3. Looking again at the table, the highest bit that will fit into 50 is 32 (25).
4. 50-32 = 18.
5. The highest bit that will fit into 18 is 16 (24).
6. 18-16 = 2
7. This remainder fits exactly into the 2 (21), leaving a remainder of 0.

This process we just went through is summarized in Table 3-5.

| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0
ing Study Guide (640-407) Decimal | 128 | 0 | 32 | 16 | 0 | 0 | 2 | 0
Binary Bits | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0

Table 5 Converting 178 Decimal to 1011001 Binary

Binary to Decimal Conversion

{Answer to Self Test Question #7}

To convert from binary to the decimal equivalent needed to express an IP address or a subnet mask, it is simply necessary to associate the decimal values with each bit expressed in a binary number, and then to add these decimal values together. This process is shown in Table 3-6, as we convert a binary number, 10011011, to its decimal equivalent.

Bit Pattern | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | Decimal Values
| 128 |  |  |  |  |  |  |  | 128
|  | 0 |  |  |  |  |  |  | 0
|  |  | 0 |  |  |  |  |  | 0
|  |  |  | 16 |  |  |  |  | 16
|  |  |  |  | 8 |  |  |  | 8
|  |  |  |  |  | 0 |  |  | 0
|  |  |  |  |  |  | 2 |  | 2
|  |  |  |  |  |  |  | 1 | 1
|  |  |  |  |  |  |  | TOTAL | 155

Table 6 Converting 10011011 Binary to 155 Decimal

From the Classroom

Powers of 2-some numbers you really need to know

The most confusing aspect of IP addressing for students to grasp is how to determine where the subnet boundaries lie when the mask does not coincide with an octet boundary. An IP address is a 32-bit number that we represent by using four decimal numbers, each representing eight bits of the 32. This is more convenient to write (who wants to write out 32 ones and zeros, anyhow?), and certainly keeps the decimal numbers we need to know to a minimum, but it can be difficult to see how the subnets and their host addresses are organized. In order to be fluent with this, you will need to spend a lot of time looking at binary numbers and powers of two. I hope I can give you a few ideas that will help you home in on the most important things to know.

The numbers you need to know by heart right now are the powers of two from 20 to 27, and just six others: 192, 224, 240, 248, 252 and 254. How did I get those six numbers? By adding powers of two, starting at the most significant bit in the IP address octet. Let's work out the binary, and watch the pattern as it develops:

- 10000000 in binary equals 128 in decimal.
  This is the value of 27.
- 11000000 in binary equals 192 in decimal.
  This is the sum of the values of 27 and 26.
- 11100000 in binary equals 224 in decimal.
  This is the sum of the values of 27, 26 and 25.
- 11110000 in binary equals 240 in decimal.
  This is the sum of the values of 27, 26, 25, and 24.
- 11111000 in binary equals 248 in decimal.
  This is the sum of the values of 27, 26, 25, 24, and 23.
- 11111100 in binary equals 252 in decimal.
  This is the sum of the values of 27, 26, 25, 24, 23, and 22.
- 11111110 in binary equals 254 in decimal.
  This is the sum of the values of 27, 26, 25, 24, 23, 22, and 21.
- 11111111 in binary equals our friend 255, who needs no further explanation.

These are the only numbers you will ever see in subnet masks, so if you know these you have the subnet masks licked.

Now we need to determine the actual boundaries of the subnets. If the masking is on the octet boundary, it's easy. So let's look at an example that isn't so straightforward.

Take the network 172.16.0.0 with a subnet mask of 255.255.252.0. What are the valid subnet numbers we can use, and the ranges of IP addresses within them?

If there's an octet where the mask is neither all zeros nor all ones, this is where you need to focus your attention. In this example, the third octet is of interest to us. Work out the binary for this mask: 252 is represented in binary by 11111100. In order to find the first valid subnet number we need to look at the least-significant bit that is a one in our subnet mask. The value of that bit position within the octet, in terms of powers of two, is four. So our first valid subnet number is 172.16.4.0. To get the remaining subnet numbers, we just need to count up by fours: 172.16.8.0, 172.16.12.0, 172.16.16.0, 172.16.20.0, all the way up to 172.16.251.0, which is the last of the 63 valid subnet numbers in this example. If our mask happened to be 255.255.248.0 instead, our third-octet mask would be 11111000 in binary, and we would start with 172.16.8.0 as our first subnet, and count up by eights instead of fours, because the value of the last bit position that is a one in the mask is eight.

The last thing to find out is the range of host addresses for each subnet. We won't use all zeros or all ones, because those are reserved for the network number and the directed broadcast. So our first host address for the first subnet is 172.16.4.1, and the last one is 172.16.7.254. Where did the 7 in that third octet come from? Remember, the two least significant bits in the third octet are part of the host number, so they need to be included in the counting. Host addresses for the next subnets would be 172.16.8.1 through 172.16.11.254, 172.16.12.1 through 172.16.15.254, and so on.

One last hint for learning about subnets: work out some other examples for yourself, and don't be afraid to write out the binary numbers if you need to!

-Pamela Forsyth, CCIE, CCSI, CNX

Subnetting and Subnet Masks

Up to this point, we have discussed the structure of an IP address, which contains both a network address and a host address. The portion of the IP address reserved for the network address is indicated by the subnet mask. We also discussed that, for each class of address, there is a default number of bits in the subnet mask. All bits not reserved for use as the network address can be used to indicate specific hosts on the network. We will now discuss how we can further segment a network into subnets by borrowing host address bits, and using them to represent a portion of our network.

Purpose of Subnetting

{Answer to Self Test Question #38}

On a single network, the amount of traffic is proportional to the number of hosts, and the sum of the traffic generated by each host. As the network increases in size, this traffic may reach a level that overwhelms the capacity of the media, and network performance starts to suffer. In a wide-area network, reducing unnecessary traffic on the WAN links is also a major issue.

In looking at such problems, it is typical to discover that groups of hosts tend to communicate routinely with each other, and communicate less frequently outside their group. These groupings may be dictated by common usage patterns of network resources, or may be imposed by geographic distances that necessitate slow WAN links between LANs.

{Answer to Self Test Question #66}By using subnets, we can segment the network, thus isolating the groups' traffic from each other. To communicate between these segments, a means must be provided to forward traffic from one segment to another.

One solution to this problem is to isolate the network segments using a bridge between them. A bridge will learn which addresses reside on each side of itself by looking at the MAC address, and will only forward packets that need to cross network segments. This is a quick and relatively inexpensive solution, but lacks flexibility. For example, a bridge would get confused if it found that it could reach a given address on either side of itself. This makes it generally impossible to build redundant pathways using bridges. Bridges also pass broadcasts.

A more robust solution is to use routers that direct traffic between networks, by using tables that associate network destinations with specific ports on the router. Each of these ports is connected to the source network, the destination network, or some intermediate network that leads to the ultimate destination. By using routers, we can define multiple pathways for data, enhancing the fault tolerance and performance of the network.

One solution to addressing in a routed network might be to simply give each network segment a different network address. This would work in an isolated network, but would not be desirable if the network were connected to the outside world. To connect to the Internet, we must have a unique network address, which must be assigned by a regulating agency. These network addresses are in great demand, and in scarce supply. We also increase the complexity of routing data from the public network to our internal networks if we don't have a common point of entry via a single network address.

To gain the economy and simplicity of a single network address, yet provide the capability to internally segment and route our network, we use subnetting. From the standpoint of external routers, our network would then appear as a single entity. Internally, however, we can still provide segmentation through subnets, and use internal routers to direct and isolate traffic between subnets. The following section will discuss the role of the subnet mask in defining subnets.

Adding Bits to the Default Subnet Mask

{Answer to Self Test Question #9}

We have already learned that an IP address must be interpreted within the context of its subnet mask. The subnet mask defines the network address portion of the address. {Answer to Self Test Question #78}Each class of address has a default mask, which is for Class A is eight bits, Class B is 16 bits, and Class C is 24 bits in length.

If we want to subnet a network, we add some number of bits to this default subnet mask, which reduces the number of bits used for the host address. The number of bits we add to the mask determines the number of subnets we can configure. Therefore, in a subnetted network, each address contains a network address, a subnet portion, and a host address.

{Answer to Self Test Question #40},{Answer to Self Test Question #68}

The subnet bits are taken from the highest-order contiguous bits of the host address, and will start at an octet boundary, since the default masks always end on an octet boundary. As we add subnet bits, we count from the left to right, and convert to decimal using the values associated with their bit positions.

{Answer to Self Test Question #10},{Answer to Self Test Question #11}, {Answer to Self Test Question #42} ,{Answer to Self Test Question #70}

The number of subnets derived from each additional subnet bit is summarized in Table 3-7. Note that the smallest number of useful subnet bits is two, since we can not use all ones or all zeros for our subnet ID. Also, the maximum number of bits must still leave at least two bits for the host address, due to a similar restriction on all zeros and all ones.

Bits Added to Default Mask | Decimal Value | Number of Subnets
1 | 128 | 0
2 | 192 | 2
3 | 224 | 6
4 | 240 | 14
5 | 248 | 30
6 | 252 | 62
7 | 254 | 126
8 | 255 | 254
9 | 255.128 | 510
10 | 255.192 | 1022
11 | 255.224 | 2046
12 | 255.240 | 4094
13 | 255.248 | 8190
14 | 255.252 | 16,382
15 | 255.254 | 32,766
16 | 255.255 | 65,534

Table 7 Subnet Bits, Mask Formats, and Number of Subnets Provided

Subnet Planning

{Answer to Self Test Question #41}, {Answer to Self Test Question #69}

The process of subnet planning involves analyzing the traffic patterns on the network to determine which hosts should be grouped together in the same subnet. We also need to look at the total number of subnets that we will need, generally projecting some growth factor for a safety margin. We will also need to consider the class of network address we are working with, and the total number of hosts per subnet that we anticipate having to support.

Choosing a Subnet Mask

In choosing a subnet, the chief consideration is how many subnets we will need to support. The challenge, of course, is balancing the number of subnets with the maximum number of hosts per subnet. There are only 32 bits available for network, subnet and host portions of the address. If we choose a subnet mask that offers more subnets that we need, this will reduce the potential hosts we can support.

The other consideration in choosing the mask is to remember the restriction on subnet values that are all zeros, or all ones. This most often causes problems with a number like 31 subnets. While this is less than the 32 combinations we could achieve with five subnet bits, it would represent an illegal bit combination, since it would be all ones. We must therefore use six bits, which yields up to 62 available subnets.

For help in choosing an appropriate subnet mask based on number of subnets, refer back to Table 3-7

Impact on the Number of Hosts

Remember that the bits we use for subnetting are subtracted from the bits available to be assigned as host addresses. Each binary bit represents a power of two, so each bit we take away will cut the potential hosts per subnet in half. Since the address class defines the maximum number of host bits, each class of address is impacted differently by subnetting.

{Answer to Self Test Question #14},{Answer to Self Test Question #17},{Answer to Self Test Question #18}, {Answer to Self Test Question #67}

Therefore, if given a network design with a certain number of subnets, proposed hosts per subnet, and a certain class of address, we may find that we have to use fewer subnets, support fewer hosts, or choose a different address class to meet our needs. For each class, the impact of subnetting on the number of hosts is outlined in Table 3-8.

Subnet Bits | Class A Hosts | Class B Hosts | Class C Hosts
0 | 16,777,212 | 65,531 | 254
2 | 4,194,303 | 16,382 | 62
3 | 2,097,147 | 8190 | 30
4 | 1,048,574 | 4094 | 14
5 | 524,286 | 2046 | 6
6 | 262,142 | 1022 | 2
7 | 131,070 | 510 | N/A
8 | 65,533 | 254 | N/A

Table 8 Hosts per Subnet, Based on Mask and Address Class

Determining Address Ranges for Each Subnet

{Answer to Self Test Question #12},{Answer to Self Test Question #16} {Answer to Self Test Question #78}

Once we have determined the appropriate subnet mask, the next challenge is to determine the address of each subnet, and the allowable range of host addresses on each subnet. The addresses for each of the subnets can be determined by looking at the lowest-order bit of the subnet mask. The value of this bit is the first subnet available. Since we can not have a subnet ID whose bits are all zeros (this subnet address is reserved), setting all bits but this first one to zero results in the lowest subnet ID.

The interval range between the subnet IDs will also be equal to the value of the lowest subnet bit. This relates to the powers of 2 associated with the bits. If the lowest bit were a 16, the next bit value above it is a 32. Each time we increment the bits, the subnet value changes by the value of the lowest bit. This will continue up to the subnet value of all ones, which is not useable, since it is a broadcast address.

{Answer to Self Test Question #13}

In Table 3-9, assume a network address of 135.120.0.0 with a subnet mask of 255.255.224.0.

Subnet Bit Pattern | Subnet Value | Subnet Address | Comments
000 | 0 | 135.120.0.0 | Not available
001 | 32 | 135.120.32.0 |
010 | 64 | 135.120.64.0 |
011 | 96 | 135.120.96.0 |
100 | 128 | 135.120.128.0 |
101 | 160 | 135.120.160.0 |
110 | 192 | 135.120.192.0 |
111 | 224 | 135.120.224.0 | Not available

Table 9 Determining Subnet Addresses

Table 3-10 summarizes the process of determining subnet address values, and the interval between the subnets.

Subnet BitsFirst Subnet | Interval between Subnets | Number of Subnets |
2 | 64 | 64 | 2
3 | 32 | 32 | 6
4 | 16 | 16 | 14
5 | 8 | 8 | 30
6 | 4 | 4 | 62
7 | 2 | 2 | 126
8 | 1 | 1 | 254

Table 10 Determining Useable Subnet Addresses for a Given Mask

Once we have determined the addresses of each of the subnets, we can then determine the range of host addresses that are allowed within each subnet. The following example shows the guidelines used to determine the address range.

1. The first available host address is one bit higher than the subnet ID. In other words, if the subnet was 120.100.16.0, the first host address would be 120.100.16.1.
2. Assuming we are using four bits for subnetting, the next higher subnet address would be 120.100.32.0. If we subtract one bit from this address, we obtain the broadcast address for the lower (16) subnet. This would be the address 120.100.31.255
3. The highest available host address is one less than the broadcast address, or 120.100.31.254.

These guidelines are summarized in Table 3-11:

Function | Example | Guideline for Determining Value
First subnet address | 120.100.16.0 | Net.Work.Subnet.0
First host | 120.100.16.1 | Net.Work.Subnet.1
Last host | 120.100.31.254 | Next Subnet Address - 2
Subnet broadcast | 120.100.31.255 | Next Subnet Address-1
Guide (640-407) Next subnet address | 120.100.32.0 | Net.Work.Subnet+Interval.0

Table 11 Determining Address Ranges for Subnets

Complex Subnetting

So far, we have confined our discussion of subnets to straightforward examples using classful IP addresses. This section will introduce more complex subnetting issues and practices. We will start off by considering subnet masks that cross octet boundaries, since these are frequently a source of confusion. We will also consider variable-length subnet masking (VLSM) as a means of gaining more flexibility in using subnet masks. Finally, we will consider a practice called supernetting, which could be described as subnetting in reverse, since we remove bits from the default subnet mask, rather than adding them.

Crossing Octet Boundaries with Subnet Bits

Whenever we use more than eight bits for subnets, we run into the issue of crossing octet boundaries. One challenge of dealing with these subnet masks is to keep straight the prohibitions concerning all ones and all zeros. To do this, we have to simultaneously be aware of the subnet bits as an isolated collection of bits, as well as remembering their bit positions, and associated values, in the 32-bit address.

When we cross octet boundaries with a subnet mask, the top eight bits, which consume an entire octet, will have an interval of 1 between subnets. This means any bit combination of 0-255 is permitted in this octet, as long as the additional subnet bits in the lower octet are not also all ones. At the same time, the bits in the lower octet will increment in values specified by the lowest significant bit in the lower octet. To see how this looks, review Table 3-12, which gives a sample of some of the subnet IDs associated with a Class A network (2.0.0.0) using 10 subnet bits (Mask 255.255.192.0).

Subnet ID | Subnet Bit Values | Comments
2.0.64.0 | 0000 0000 01 | First subnet ID
2.0.128.0 | 0000 0000 10 | Next subnet
2.0.192.0 | 0000 0000 11 | Lower octet bits all ones
2.1.0.0 | 0000 0001 00 | Lower octet bits all zeros
2.255.0.0 | 1111 1111 00 | Upper octet bits all ones
2.255.128.0 | 1111 1111 10 | Last legal subnet

Table 12 Samples of Subnet IDs using Ten Subnet Bits

Variable-Length Subnet Masking

When we define a subnet mask, we have made the assumption that this single mask is going to be consistently used throughout our network. In many cases, this leads to a lot of wasted host addresses, since our subnets may vary widely in size. One prime example of this is where we have a subnet that connects two routers via their serial ports.

There are only two hosts on this subnet-one for each port-but we will have to allocate one entire subnet to these two interfaces. If we could take one of our subnets, and further divide it into a second level of subnetting, we could effectively "subnet the subnet" and retain our other subnets for more productive uses. This idea of "subnetting the subnet" forms the basis for VLSM.

We have talked about an IP address having both a network address portion and a host address portion. With subnetting, we also have a portion of the address devoted to the subnet ID.

{Answer to Self Test Question #43}Collectively, the masked bits representing the network and subnet IDs can be called the prefix. Routers can be generically said to route based on prefix. If there were a way to convey specific prefix information with an address, we could override the network-wide assumptions made on the basis of our single subnet mask. To accomplish this, we add explicit information on the prefix to each address reference. {Answer to Self Test Question #44} ,{Answer to Self Test Question #45} ,{Answer to Self Test Question #71}The format used to express this prefix (subnet mask) is called the bitcount format, which is added to the address using a trailing slash followed by a decimal number. For example, a reference to a Class B address would be represented as 135.120.25.20 /16. The "/16" defines 16 subnet bits, equating to the default mask, 255.255.0.0. (16 bits).

To use VLSM, we generally define a basic subnet mask that will be used to divide our first-level subnets, and then use a second-level mask to subdivide one or more of the primary subnets. VLSM is only recognized by newer routing protocols such as EIGRP or OSPF. When using VLSM, all subnet IDs, including the all-ones and all-zeros subnets, will be valid. Figure 3-3 illustrates the concept of VLSM.

Figure 3 Using variable-length subnet masks

Supernetting

{Answer to Self Test Question #5}

In the introduction to this chapter, we referred to RFC 791 as the document that defined the standards for IP addressing. Part of this standard established the address classes and classful addressing. Implied in classful addressing is the assumption that we know what the default subnet mask is based on the first octet of the address. However, prior to RFC 791, an earlier RFC (760) had proposed an IP address format that was not class-based. Address classes were considered a good idea in 1982, since the class assumptions eliminated having to send masking information with an IP address, but since we are now running out of registered IP addresses, the classes have become a serious problem.

The only available addresses that have not been assigned are the Class C addresses. Since a Class C network can only support 254 hosts, large organizations wishing to have a registered address may request multiple contiguous Class C addresses, and integrate them into a single entity using a process called supernetting. It is also sometimes referred to as classless interdomain routing (CIDR).

{Answer to Self Test Question #15}

What supernetting does is to remove bits from the default mask, starting at the right-most bits and working to the left. To see how this works, let's look at an example.

Suppose we have been assigned the following Class C network addresses:

200.200.192.0

200.200.193.0

200.200.194.0

200.200.195.0

With the default mask of 255.255.255.0, these are separate networks. However, if we were to use a subnet mask of 255.255.192 instead, each of these networks would appear to be part of the 200.200.192.0 network, since all the masked bits are the same. The lower-order bit patterns in the third octet become part of the host address space.

Like VLSM, this technique involves a departure from the standard IP address classes. We have discussed these addressing options to provide a sample of the alternatives that have arisen in response to the limitations of classful addressing. When preparing to take the test, remember to focus on a thorough understanding of standard, class-based IP addressing.

From the Classroom

IP: The Next Generation

IP addressing is at a crossroads. The explosive growth of the Internet has caused a crisis with existing IP address formats. The only registered IP addresses that can be obtained right now are Class C addresses. As we have learned, these have severe limitations in terms of the maximum number of hosts supported, which has led to creative approaches such as supernetting.

The longer-term solution is to revamp the whole specification for IP addressing. The proposed solution is called IP version 6, or Ipv6 for short. The format for version 6 IP addresses will move from the present 32-bit address to an address format of 128 bits. This will be represented as 32 hexadecimal digits, expressed as shown in this example: A923.FF23.BA56.34F3.

Unfortunately, this address format is not compatible with existing IP addresses. Ipv6 will probably be implemented first with external IP addresses on the Internet, which would then be routed through gateways to internal networks that continue to use the existing 32-bit address format.

-John Pherson

Configuring IP Addresses with Cisco IOS

The focus of this section will be to take what we have learned about IP addressing and determine how to implement our IP addressing scheme on a Cisco router, using commands from the Cisco IOS command set.

The syntax of the commands is shown in each section header, to help you remember them.

Setting IP Addresses and Parameters

The set of parameters we are about to discuss have to do with setting the IP address and subnet masks on the router interfaces, as well as global and per-line settings for how we will express our subnet mask.

Router> terminal ip netmask-format {bitcount, decimal, or hex}This command is issued from the first level prompt of the privileged or EXEC mode, which is designated by the # prompt.

{Answer to Self Test Question #46}What it does is to define a global format we will use to view subnet masks during the current session. If we do not set this parameter, the default is to use the dotted-decimal format.

{Answer to Self Test Question #52}

Examples of the different formats are:

Bitcount: /24 (used for classless IP addressing)

Decimal: 255.255.255.0

Hexadecimal: 0xFFFFFF00

Router(config-line)# ip netmask-format {bitcount, decimal, or hex}This command does the same thing as the preceding command, only in this case we are defining the netmask format for a specific terminal line. To get to this command:

1. Enter the Exec mode and issue this command:
2. Router# configure terminal. This puts us at the prompt Router(config)#.
3. From here, type line {aux or console or vty 0 4} to get to the line you wish to configure.
4. You will then see the prompt Router(config-line)#, and can issue the command listed.

Router(config-if)# ip address address subnet-mask

{Answer to Self Test Question #19},{Answer to Self Test Question #20}, {Answer to Self Test Question #53} {Answer to Self Test Question #73} {Answer to Self Test Question #73}

This command is also issued after you have selected an interface and entered the interface configuration mode shown by the Router(config-if)# prompt. {Answer to Self Test Question #51}This command assigns the IP address to a router interface, and both the address and subnet-mask portions must be specified. The format for the subnet-mask would have been assigned using last command we discussed.

Host Name to Address Mappings

Host name to address mapping is a process that allows user-friendly names for network hosts, rather than having to specify them by their IP address. When we use these types of names, some method must be provided to convert from the names to the actual IP addresses. This would typically involve using a mapping file or table, and/or a server called a Domain Name Service (DNS) server.

When an address has been resolved from a host name, a router keeps that information in a local cache. This way it can avoid re-submitting the resolution request to the DNS server again later.

Router(config)# ip host hostname [tcp-port-number] address {ip addresses}This command is issued from the global configuration prompt.

{Answer to Self Test Question #47}It is used to add a mapping entry to the host cache used by the router for name-to-address resolution. It requires that you specify the name of the host, and also the IP address (or addresses) associated with that host. It also allows you to specify a TCP port number. If you don't use this parameter, the entry will default to TCP port 23, used for Telnet connections to that host.

Router(config)#ip domain-name domain name

This command is used to specify the default domain name that will be added by the Cisco IOS to an incomplete or "unqualified" host name. A fully qualified domain name (FQDN) would be:

server 1.abc.com

where server1 is the host in a domain called abc.com.

If we choose to refer to this server only as "server1", then IOS will append the default domain name to the host name for the purpose of submitting a name resolution request to a DNS server.

Router(config)# ip name-server {name server ip addresses}This command is also issued from the global configuration prompt. It is used to specify the address (or addresses) of DNS servers that are available to the router for name-to-address mapping.

{Answer to Self Test Question #48}Up to six name server addresses can be specified with a single command. {Answer to Self Test Question #75} If this parameter is not used, the router will use 255.255.255.255 (local broadcast address) to find the server.

Router(config)# (no) ip domain-lookup

{Answer to Self Test Question #21}

This command simply turns name resolution on and off. The default is on, with the name server address specified as a local broadcast.

Router# show hosts

{Answer to Self Test Question #22}

To avoid "re-inventing the wheel", the router will request a name-to-address once, and then keep that information in a local cache. This will shorten the time required the next time the name needs to be resolved. This command will display the contents of this local cache, along with information about the source of the entry ("static" or "resolved by DNS", for example), and its status and age.

Using Ping

Ping (packet internet groper) is a common utility used with IP to test connectivity between two IP hosts. It operates by sending a set of test packets using ICMP (Internet Control Message Protocol). These packets echo back to the source, showing whether the destination was reachable, and displaying some timing and timeout statistics.

Simple Ping

{Answer to Self Test Question #49}

Simple ping is a command available in the user mode on a CISCO router. It would use the following syntax:

Router> ping 131.199.130.3

{Answer to Self Test Question #23},{Answer to Self Test Question #54} {Answer to Self Test Question #54}

The most common response symbols returned are:

! | successful echo
. | timed out waiting
U | destination unreachable
& | TTL exceeded

It will also summarize the results of sending five packets in a success rate percentage. If a ping is successful, it shows that the network protocol is working at least up to the network layer, and that two hosts can successfully connect up to that layer.

Extended Ping

Sometimes the defaults built into simple ping are insufficient to provide the testing desired. If this is the case, an extended PING command is provided in the EXEC command mode in IOS. This version of ping is interactive, and offers the capability to specify the number and size of test packets, the timeout value, and even data patterns, in response to various prompts.

{Answer to Self Test Question #56}You can access this command by entering the EXEC mode, and typing Router# ping <CR>

You will then be prompted for your settings. You can also access a help file for this command by typing Router# ping ? <CR>.

Using IP TRACE and Telnet

For those occasions when we need more than the PING command to test the operation of the network, there are a few other tools we can use. We may be interested not just in the fact that we can get packets from a source to destination host, but also in the route taken by the packets. We might also be interested in testing host connectivity at protocol layers higher than the network layer.

{Answer to Self Test Question #50}For these tests, we can use IP TRACE for route information, and Telnet, a terminal emulation program that will validate connectivity at higher protocol levels.

Telnet

Telnet is not primarily a testing utility. The purpose of Telnet is to provide a means to emulate a terminal connection into a host system.

{Answer to Self Test Question #55}However, since Telnet is an application that runs at the top of the protocol stack, it can be used to verify the proper functioning of all the intervening layers. Telnet can be used from the user mode in IOS by typing Router>telnet {IP address or hostname} or simply the name/address of the host.

IP TRACE

To issue this command, you may be in User mode or Exec mode (for extended TRACE). Type Router> trace {host name} or {IP address}.

In response, this utility will send out three test probes that will discover any routers on the path. It will list the IP address of each router, host name (if it can be resolved), and the return times for each of the three probes.

This list should conclude with the host name or address of the destination host originally specified.

Certification Summary

In this chapter we learned that an IP address is a 32-bit address, specified using dotted-decimal notation (for example, 125.125.125.100). IP addresses are interpreted using a subnet mask, which defines which portion of the 32 bits represent the network address, and which represent a host number on that network.

IP address classes are assigned based on the value of the first octet of the IP address. These classes range from Class A through Class E. Only Classes A, B, and C are used for normal IP addressing. Each class of address has a default subnet mask, which defines the number of networks and the number of hosts per network for a given address class.

By adding bits to the right of the default subnet mask, we can segment a network into subnets. Subnetting uses bits that were originally reserved for host addresses, thus reducing the number of hosts possible in each subnet.

The following rule applies to the formation of network addresses, subnet IDs, and host numbers: The bit configuration cannot be all ones or all zeros. All zeros would indicate a network, not a specific address. All ones would represent broadcasts.

The addresses of subnets on a subnetted network are determined by taking the least significant bit in a subnet mask as the first subnet, and incrementing by the value of that bit. Host addresses on each subnet range from one above the subnet ID to two less than the value of the next higher subnet. One less than the next subnet ID would be a broadcast address for the lower subnet.

Cisco IOS provides commands that will configure the IP addresses of each router interface. Additional commands set the display format for the subnet mask. Several commands configure IP address-to-name translation for the router. Other commands are available for testing the IP configuration, including PING, TRACE, and Telnet.

Two-Minute Drill

- The IP protocol is used for end-to-end routing of data across a network, which may mean that an IP packet must travel across multiple networks, and may cross several router interfaces to get to its destination.
- The implementation of address classes divided the address space into a limited number of very large networks (Class A), a much larger number of intermediate-sized networks (Class B), and a very large number of small networks (Class C).
- The 32-bit structure of an IP address is comprised of both a network address and a host address.
- The concept of subnetting extends the network portion of the address to allow a single network to be divided into a number of logical sections (subnets).
- Certain addresses in the IP address space have been reserved for special purposes, and are not normally allowed as host addresses.
- When all the bits in the host portion of an IP address are set to zero, it indicates the network, rather than a specific host on that network.
- The network address 127.x.x.x has been designated as a local loopback address. The purpose of this address is to provide a test of the local host's network configuration.
- When all the bits in an IP address are set to ones, the resulting address, 255.255.255.255 , is used to send a broadcast message to all hosts on the local network.
- If you set all the host bits in an IP address to ones, this will be interpreted as a broadcast to all hosts on that network. This is also called a directed broadcast.
- The class of an IP address can be determined by looking at the first (most significant) octet in the address.
- If the highest bit in the first octet is a zero (0), the address is a Class A address.
- A Class B address is characterized by a bit pattern of 10 at the beginning of the first octet.
- A Class C address will have a bit pattern of 110 leading the first octet, which corresponds to decimal values from 192-223.
- Class D addresses have a bit pattern that begins with 1110. A Class D address refers to a group of hosts, who are registered as members of a multicast group.
- If the first four bits of the first octet are 1111, the address is a Class E address.
- An IP address cannot exist without an associated subnet mask. The subnet mask defines how many of the 32 bits that make up an IP address are used to define the network, or the network and associated subnets.
- You can further segment a network into subnets by borrowing host address bits, and using them to represent a portion of our network.
- To gain the economy and simplicity of a single network address, yet provide the capability to internally segment and route our network, use subnetting.
- In a subnetted network, each address contains a network address, a subnet portion, and a host address.
- The process of subnet planning involves analyzing the traffic patterns on the network to determine which hosts should be grouped together in the same subnet.
- In choosing a subnet, the chief consideration is how many subnets you will need to support.
- Once you have determined the appropriate subnet mask, the next challenge is to determine the address of each subnet, and the allowable range of host addresses on each subnet.
- Whenever you use more than eight bits for subnets, you run into the issue of crossing octet boundaries.
- If you could take one of our subnets, and further divide it into a second level of subnetting, you could effectively "subnet the subnet" and retain our other subnets for more productive uses. This idea of "subnetting the subnet" forms the basis for VLSM.
- Supernetting removes bits from the default mask, starting at the right-most bits and working to the left.
- Host name to address mapping is a process that allows user-friendly names for network hosts, rather than having to specify them by their IP address.
- Ping (packet internet groper) is a common utility used with IP to test connectivity between two IP hosts.
- You can use IP TRACE for route information, and Telnet, a terminal emulation program that will validate connectivity at higher protocol levels.

Self Test

The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully, as there may be more than one correct answer. Choose all correct answers for each question.

1. What is the network address for the address 96.2.3.16?

1. 96.2.0.0
2. 96.2.3.0
3. 96.0.0.0
4. Can't tell

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. This is a Class A network address. The default netmask is eight bits, which defines the network.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What class of address is 190.233.27.13?

1. Class A
2. Class B
3. Class C
4. Class D

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. Class B addresses range from 128-191 in the first octet.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- How many bits are in the default subnet mask for the address 219.25.23.56?

1. 8
2. 16
3. 24
4. 32

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. This is a Class C address, which has a default mask of 24 bits.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- How many hosts are supported by a Class C network address, without subnetting?

1. 254
2. 65,000
3. 255
4. 16,000

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. There are 8 bits (256 addresses) available for hosts in a Class C network, but host numbers 0 and 255 are not allowed. Therefore the answer is 254.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the default mask for a Class B network?

1. 255.0.0.0
2. 255.255.255.0
3. 255.255.0.0.
4. 255.225.0.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. A Class B network uses 16 bits to represent the network address. Answer D was added to demonstrate a common typographical error in assigning a subnet mask.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

Approximately how many unique networks are possible with a Class B address?

1. 254
2. 16K
3. 65K
4. 2M

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. A Class B address allocates 16 bits (65K) for the network address, but the address class predetermines three of these bits. In other words, 128 through 191 are the only possible values for the first octet.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the decimal value of the binary number 11001011?

1. 203
2. 171
3. 207
4. 193

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. The decimal value of the binary number 11001011 is 128+64+8+2+1=203

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the binary value of the decimal number 219?

1. 11101011
2. 01011101
3. 11101011
4. 11011011

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. The binary value of the decimal number 219 is 219-128-64-16-8-2-1 = 0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Subnet bits are added to________ to segment the network into subnets.

1. The network address
2. The default subnet mask
3. The host address
4. The subnet ID

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. We add bits to the default mask to create subnets, which reduces the number of available host addresses available on each subnet. The network address for the parent network will remain the same, while each subnet address will include an extended network address identifying the subnet, and zeros in the host portion.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- If eight bits were allocated to subnetting with a Class B address, how many subnets would be possible?

1. 62
2. 256
3. 254
4. 16K

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. Eight bits provide for 256 bit combinations, but the all-zeros and all-ones combinations are not valid, leaving only 254.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Given the subnet mask 255.255.240 on a Class A address, how many bits are allocated to subnetting?

1. 4
2. 5
3. 9
4. 12

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. Because the default mask for a Class A address is 255.0.0.0, this subnet mask has added the entire second octet plus four additional bits for subnetting.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- If the subnet mask for the network 150.25.0.0 is 255.255.224.0, which of these is a valid host address?

1. 150.25.0.27
2. 150.25.30.23
3. 150.25.40.24
4. 150.25.224.30

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. This address is within the address range for the first subnet, which is 150.25.32.0. In both answer A and answer B, the subnet bits are all zeros, which is not valid. In answer D, the subnet bits are all ones, which is not valid for a host address.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the first subnet ID for the network 25.0.0.0 with a subnet mask of 255.192.0.0?

1. 25.192.0.0
2. 25.64.0.0
3. 25.128.0.0
4. 25.192.64.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. The value of the first subnet is equal to the lowest-order bit of the subnet mask. Answer C would be the second subnet. Answer A is an all-ones combination.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the maximum number of subnet bits possible with a Class C address?

1. 6
2. 8
3. 14
4. 12

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. Since there are only eight bits in the host portion of a Class C address, we must leave at least two bits for hosts, which would only provide two legal bit combinations, 01 and 10 for host addresses.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Given the address 220.195.227.12 with a subnet mask of 255.255. 224.0, what advanced subnetting technique is being used?

1. Subnetting across octets
2. VLSM
3. Supernetting
4. None

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The address given is a Class C address, which should have a default mask of 255.255.255.0. The fact that the given mask is less than this indicates that bits have been taken away. This technique for combining multiple Class C networks into one entity is called supernetting.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Given a subnet mask of 255.255.240, which of these addresses is not a valid host address?

1. 150.150.37.2
2. 150.150.16.2
3. 150.150.8.12
4. 150.150.49.15

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The addresses given are Class B, which means the subnet mask includes four bits for subnetting. The lowest-order bit is 16, which means the first legal subnet is 150.150.16.0.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- How many hosts per subnet are possible with a Class B address, if five bits are added to the default mask for subnetting?

1. 510
2. 512
3. 1022
4. 2046

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. A Class B address would have 16 bits available for host addresses if it were not subnetted. Taking five bits away for subnetting leaves 11 bits for host addresses. This would leave host addresses of 0 - 2047. However, all zeros and all ones are not permitted, so the address range becomes 1 - 2046.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- If you were issued a Class C address, and needed to divide the network into seven subnets, with up to 15 hosts in each subnet, what subnet mask would you use?

1. 255.255.255.224
2. 255.255.224
3. 255.255.255.240
4. None of the Above

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. This is an impossible situation. To achieve seven subnets we would need to use four subnet bits. This is because even though three bits would give us eight possible subnet addresses, all zeros and all ones are not permitted. If we use four bits for subnetting, this only leaves four bits for host addresses, which will only accommodate 14 hosts for subnets.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What IOS command would you issue to set the IP address on a terminal line?

1. Router(config-if)# ip address
2. Router(config-line)#ip address
3. Router(config)#ip address
4. None of the Above

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. This is a trick question, in that we do not assign IP addresses to terminal lines. The terminal lines include the console, auxiliary port, and virtual terminal lines 0 - 4, which are used to configure the router. IP addresses are assigned to the interfaces on the router.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What IOS command would you use to define the subnet mask for an interface on the router?

1. Router(config-if)# ip address
2. Router# term ip-netmask format
3. Router(config-line)# ip netmask-format
4. Router(config)# ip subnetmask

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. You would use the command Router(config-if)# ip address to define the subnet mask for an interface on the router. The subnet mask for an interface is assigned as part of assigning the IP address. Answers B and C refer to setting the format for viewing subnet masks. Answer D is not a legitimate command.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What IOS command turns off name-to-address resolution?

1. Router# no ip domain-lookup
2. Router(config)# no domain-lookup
3. Router(config-if)# no ip domain-lookup
4. Router(config)# domain-lookup off

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. To turn off name-to-address resolution, the no domain-lookup command is issued from the global command prompt.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- To view name-to-address mappings cached on the router, what IOS command would you issue?

1. Router> show hosts
2. Router(config)# show hosts
3. Router# ip name-server
4. Router(config)# ip name-server

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. The show hosts command can be issued from the User mode. The ip name-server command is used to define the addresses of DNS servers for name lookup, and is issued from the global configuration prompt.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- If you received a !!!!! in response to a PING command, what would that indicate?

1. Destination Unreachable
2. Successful echoes
3. Timeout
4. None of the above

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. The five exclamation points indicate that each of five ICMP echo packets were returned before the timeout interval expired.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Given an IP address of 125.3.54.56, without any subnetting, what is the network number?

1. 125.0.0.0
2. 125.3.0.0
3. 125.3.54.0
4. 125.3.54.32

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. The network number is 125.0.0.0. Since the address is a Class A address, the default mask is eight bits, so the network number consists of the first octet, and is represented as shown.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The network 154.27.0.0 can support how many hosts, if not subnetted?

1. 254
2. 1024
3. 65,533
4. 16,777,206

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The network 154.27.0.0 can support 65,533 hosts, if not subnetted. The address shown is a Class B address, which allows 16 bits for the host address. These sixteen bits allow 65,533 hosts per network.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Which of the following is a legitimate IP host address?

1. 1.255.255.2
2. 127.2.3.5
3. 225.23.200.9
4. 192.240.150.255

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. 1.255.255.2 is the only legitimate IP host address. Answer B uses the 127 network, which is reserved for loopback testing. Answer C is a Class D address, which is used for multicasting. Answer D is a broadcast address.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the significance of the address 3.255.255.255?

1. It is a host number
2. It is a local broadcast
3. It is a directed broadcast
4. It is an illegal address

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The significance of the address 3.255.255.255 is that it is a directed broadcast to network 3.0.0.0. A host number cannot have all ones. A local broadcast would have all ones (for example, 255.255.255.255). While this is not a legal host address, it is perfectly valid as a broadcast address.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- How many bits are in the default subnet mask for a Class D network?

1. 8
2. 16
3. 24
4. None

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. A Class D network is used for multicasting, not for normal IP network/host addressing, so it doesn't have a default subnet mask.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- A bit pattern of 1111 leading the first octet of an address would imply what class of network?

1. Class A
2. Class B
3. Class C
4. Class D
5. Class E

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

E. The leading bit pattern 1111 is associated with Class E addresses, which range from 240-254 in the first octet.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the binary equivalent of the decimal 234?

1. 11101010
2. 10111010
3. 10111110
4. 10101111

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. The binary equivalent of the decimal 234 is 11101010. 234 uses the 128, 64, 32, 8, and 2 binary bits.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the decimal equivalent of 01011100?

1. 96
2. 92
3. 84
4. 154

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. The decimal equivalent of 01011100 is 92. The bits are set for 64, 16,8, and 4.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The purpose of subnetting is to:

1. Segment and organize a single network at the network layer
2. Divide a network into several different domains
3. Allow bridging between network segments
4. Isolate groups of hosts so they can't communicate

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. The purposes of subnetting are to segment and organize a single network at the network layer. This is the best answer. A subnet does not create separate domains. It provides a way to route between network segments, not bridge between them. It does provide isolation between groups of hosts, but is not implemented to prevent them from communicating.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Subnetting is achieved by the following actions:

1. Subtracting bits from the default subnet mask
2. Subtracting bits from the network address
3. Adding bits to the host address
4. Adding bits to the default subnet mask

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. Subnetting adds bits to the default mask. This has no effect on the network address, but does reduce the bits available for the host address.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- If we add four bits to the default mask, what is the number of subnets we can define?

1. 16
2. 15
3. 14
4. 12

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. Four bits would allow a range of 0 - 15. However, a subnet cannot contain all ones or all zeros (the first and last subnets are reserved), which limits the range from 1 - 14.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the maximum number of subnet bits we can add to a default mask?

1. 8 bits
2. 16 bits
3. 30 bits
4. Depends on address class

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. The number of total host bits available to borrow depends on the address class. We must insure that we leave at least two host bits, so we can have a host address that is not all ones or zeros.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the subnet mask we would use with a Class B address that has three subnet bits added?

1. 255.255.240.0
2. 255.255.224.0
3. 255.224.0.0
4. 255.255.248.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. The default subnet mask for a Class B is 255.255.0.0. To this we add three bits, with a decimal value of 128+64+32 = 224.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What would be the subnet mask if we added 12 subnet bits to a default Class A subnet mask?

1. 255.255.255.240
2. 255.255.240.0
3. 255.240.0.0
4. 255.225.224.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. A default mask for a Class A address would be 255.0.0.0. Adding 12 bits means that we take the entire second octet (255) and four bits of the third octet (240).

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Given a subnet mask of 255.255.255.0 with a Class B address, how many subnets are available?

1. None
2. 254
3. 16K
4. 65K

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. The default mask for a Class B address is 255.255.0.0. The given mask shows that we have added eight bits for subnetting. This will allow us 0 - 255 subnets, with 0 (all-zeros) and 255 (all ones) disallowed.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What happens to the number of hosts per subnet each time we add an additional subnet bit?

1. Hosts are not affected
2. Available hosts are decreased by two
3. Hosts per subnet is approximately halved
4. Hosts per subnet is doubled

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. Each time we take a bit from the host portion of the IP address for use in subnetting, we cut the available number of hosts roughly in half . For example, eight host bits gives us 254 hosts (256-2). Reducing this to seven host bits would result in 126 valid hosts (128-2). In each case we are excluding the all-zeros and all-ones bit combinations.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- In order to accommodate seven subnets, how many subnet bits are required?

1. 3
2. 4
3. 6
4. 7

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. Although three bits will yield eight bit combinations, two of them-the all-zeros and all-ones combinations-are not valid. Therefore we must include four bits, which will provide up to 14 subnets.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- If we included six subnet bits in the subnet mask for a Class C address, how many hosts would each network support?

1. 254
2. 30
3. 4
4. 2

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. If we included six subnet bits in the subnet mask for a Class C address, each network would support two hosts. With only two bits left for host addresses, the only legal bit patterns are 01 and 10, which provides for two hosts.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What class of address would we have to use if we needed 2,000 subnets, with over 5,000 users each?

1. Class A
2. Class B
3. Class C
4. Class D

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. Referring to Table 3-7, We see that it would require 11 subnet bits to accommodate 2,000 subnets. This immediately eliminates a Class C, which can only provide six subnet bits maximum. For a Class B address, using 11 subnet bits would only leave five bits for host addresses, which would allow only 30 hosts per subnet. Class A addresses with 11 subnet bits have 13 bits left for host addresses. This would permit 8,190 hosts per subnet.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Given a subnet address of 140.125.8.0, with a subnet mask of 255.255.252.0, what is the subnet address of the next higher subnet?

1. 140.125.16.0
2. 140.125.17.0
3. 140.125.32.0
4. 140.125.12.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. The subnet mask shows that the lowest bit of the subnet mask is a 4. This means that the first subnet will be 4, and they will increment by 4. The given subnet address is the second in the series, and the third will be 140.125.12.0.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Given a subnet address of 5.32.0.0 and a subnet mask of 255.224.0.0, what is the highest allowed host address on this subnet?

1. 5.32.255.254
2. 5.32.254.254
3. 5.63.255.254
4. 5.63.255.255

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The mask shows that we are using three subnet bits, with the lowest value being 32. The interval between subnets is 32, so the next higher subnet would be 5.64.0.0. Subtracting 1 from this value leaves 5.63.255.255, the "32" subnet's broadcast address. One less than this is the highest host address for the subnet, 5.63.255.254.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- If we saw the following subnet addresses, what would be the subnet mask associated with these subnets?

140.120.4.0
140.120.8.0
140.120.12.0
140.120.16.0

1. 255.255.252.0
2. 255.252.0.0.
3. 255.255.248.0
4. 255.255.4.0.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. The pattern of subnet addresses reveals that the interval is 4 and the lowest subnet has a value of 4. In order to use contiguous high-order bits in our subnet mask, this would mean that we have six bits reserved for subnetting. Since we are dealing with a Class B address, we add these six bits to the default subnet mask of 255.255.0.0.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Given the network 2.0.0.0 with a subnet mask of 255.255.224.0, which of these is not a valid subnet ID for this network?

1. 200.255.192.0
2. 200.0.224.0
3. 200.0.16.0
4. 200.254.192.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The invalid subnet ID is 200.0.16.0. This represents an ID where all the subnet bits are zero.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the subnet mask for an address expressed as 175.25.0.0/24?

1. 255.255.0.0
2. 255.255.255.0
3. Depends on address class
4. 255.255.24.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. The /24 tells us that there are 24 bits in the address prefix, which equates to 255.255.255.0.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- VLSM allows us to:

1. Use different subnet masks in different parts of the network
2. Divide a subnet into secondary subnets
3. Use classless IP addressing
4. Both A and B

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. VLSM allows us to use different subnet masks in different parts of the network and to divide a subnet into secondary subnets. Answer C is not correct, because we can use classless addressing without implementing VLSM.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What class of IP address is usually associated with supernetting?

1. Class A
2. Class B
3. Class C
4. Class D

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. Supernetting is often used to combine several Class C networks.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Supernetting modifies the default subnet mask in what way?

1. Adds bits to the default subnet mask
2. Adds bits to the network address
3. Removes bits from the subnet ID
4. Removes bits from the default subnet mask

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. Supernetting removes some of the rightmost bits of the default subnet mask, which summarizes several contiguous Class C networks into a single network entity.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What is the appropriate prompt from which to enter the ip address command?

1. Router>
2. Router#
3. Router(config-if)#
4. Router(config)#

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The ip address command applies to a specific router interface, and would be entered after selecting the interface to be configured.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Which of the following subnet mask formats do Cisco routers support?

1. Dotted-decimal
2. Hexadecimal
3. Bitcount
4. All the above

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. All the formats listed are supported by Cisco, and can be selected using the ip netmask-format commands.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- To configure a name-to-address mapping in the router mapping table, you would issue which of the following commands?

1. Router(config-if)# ip host
2. Router(config-line)#ip name-server
3. Router(config)#ip host
4. Both A and C

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. Both A and C are correct. These commands will be accepted from any level of configuration prompt, although they are global commands.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- When a PING command returns a series of periods, what does that indicate?

1. Success
2. Non-existent address
3. Timeout
4. Unreachable

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The period (.) indicates that the echo packet did not return within the specified timeout interval. This interval is configurable using the extended PING command.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Which of these commands could verify the operation of the protocol stack all the way to the Application layer?

1. PING
2. TRACE
3. Extended ping
4. TELNET

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. Telnet is the only command that would test all layers of the protocol. PING, in both versions, tests only up to the network layer. TRACE also operates at the network layer to reveal the routing path between two hosts.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- To perform an extended ping to address 1.1.1.1, you would issue which of the following commands?

1. Router> ping 1.1.1.1
2. Router# ping 1.1.1.1
3. Router(config)# ping
4. Router# ping

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. Extended ping requires Privileged mode, and also requires that no command-line options be entered (because it prompts for each option).

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The length of an IP address is:

1. 24 bits
2. 16 bits
3. 32 bits
4. 48 bits

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The IP address is a 32-bit (4 octets) logical address.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Which of the following classes is used for multicasting?

1. Class A
2. Class B
3. Class E
4. None of the above

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. Class D is used for multicasting purposes.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- Which of the following statements is true regarding IP host addresses?

1. The host address part of an IP address can be set to "all binary ones" or to "all binary zeros".
2. The subnet address part of an IP address can not be set to "all binary ones" or to "all binary zeros".
3. The network address part of an IP address can be set to "all binary ones" or to "all binary zeros".

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. For a valid host address, neither network address part, subnet address part, nor host address part can be set to "all binary ones" or "all binary zeros".

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- An IP address reserved for loopback test is:

1. 164.0.0.0
2. 130.0.0.0
3. 200.0.0.0
4. 127.0.0.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. 127.0.0.0 is reserved for assigning local loopback addresses and therefore, can not used as a network address.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- An IP address used for local broadcasting (broadcasting to all hosts on the local network) is:

1. 127.255.255.255
2. 255.255.255.255
3. 164.0.0.0
4. 127.0.0.0

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. An IP address used for local broadcasting is 255.255.255.255. When all the bits in an IP address are set to ones, the resulting address is 255.255.255.255, which is used to send broadcast messages to all hosts on the network.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- An IP address of 100.1.1.1 represents which class of network?

1. Class B
2. Class C
3. Class A
4. Class E

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The Class A network address can take values from 1 - 126.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The Class D IP address pattern begins with:

1. 1111
2. 110
3. 010
4. 1110

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. The Class D addresses have bit pattern which begins with 1110. This allows values from 224 - 239 to be assigned for the purpose of multicasting.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The number 174 is represented in binary form by:

1. 11001110
2. 10101110
3. 10101010
4. 10110010

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. 10101110 = { 27 + 25 + 23 + 22 + 21 }={ 128 + 32 + 8 + 4 + 2 }= 174

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The subnet mask in conjunction with an IP address defines:

1. A multicast address
2. A host address
3. The portion of the address that should be considered the network ID.
4. None of the above

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The subnet mask filters those bits that will be considered network address bits. The remaining bits not filtered form the host address portion.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The purpose of using subnets is:

1. To divide a network into smaller subnetworks
2. To improve network performance due to increased traffic
3. To make the internetwork more manageable
4. All of the above

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. The purposes of using subnets are: to divide a network into smaller subnetworks; to improve network performance due to increased traffic; and to make the internetwork more manageable.1

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The default subnet mask for Class B network is:

1. 8 bits long.
2. 24 bits long.
3. 16 bits long.
4. 32 bits long.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The default subnet mask for Class B is 255.255.0.0, which is 16 bits long.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- To add bits to a default subnet mask, the bits are taken from:

1. The lowest-order contiguous bits of the host address
2. The lowest-order contiguous bits of the host address
3. The highest-order contiguous bits of the host address
4. The highest-order contiguous bits of the host address

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. Subnet bits are taken from the highest-order contiguous bits of the host address.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- In planning subnets, the factors that need to be considered are:

1. The number of subnets needed
2. The number of hosts per subnet
3. The possible growth in number of subnets or hosts per subnet
4. All of the above.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. The number of subnets needed, the number of hosts per subnet, and the possible growth in number of subnets or hosts per subnet are all factors that must be considered when planning subnets.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- How many subnets for Class B are possible if six bits are added to the default mask?

1. 14
2. 30
3. 62
4. 510

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. Six bits could create 64 bit combinations, but the first and last subnet addresses are not available.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The value 24 after / in the IP address 135.120.25.20/24 is called:

1. A robbed bit
2. A default bit
3. A prefix
4. A host bit

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The prefix defines the subnet bits for the network. In this case /24 means the subnet bits are 24.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- An IP address of 199.119.99.1/24 defines

1. 24 subnet mask bits for Class A network
2. 24 subnet mask bits for Class B network
3. 24 subnet mask bits for Class C network
4. 24 subnet mask bits for Class E network

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. An IP address of 199.119.99.1/24 defines 24 subnet mask bits for Class C network. Class C address range is 192 - 223.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- What IOS command would you use to define a global format to view the subnet mask during the "current session"?

1. Router # ip address
2. Router # term domain-lookup
3. Router # set format
4. Router # term ip netmask-format

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

D. The IOS command you would use to define a global format to view the subnet mask during the "current session" is Router # term ip netmask-format. Note: Answer C is not a valid router command.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The router command Router(config)# ip host {hostname address} is used for:

1. Viewing the route the packet has taken from source to destination
2. Viewing the host name and host address
3. Adding a static mapping of a host name to an address in the router's host cache
4. Showing source destination network's interfaces with other networks

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

C. The command Router(config)# ip host {hostname address} adds a static entry to the router's host cache, where it is used for resolving the host name to an address. It requires the user to specify the name of the host and also the IP address associated with the host.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The maximum number of name server addresses that can be specified using the Router(config)# ip name-server command is:

1. Four
2. Six
3. Five
4. Three

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

B. Up to six name server addresses can be specified using the Router(config)# ip name-server command.

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

- The following is a response to the Router > Ping 120.1.1.2 command:

.!!!!
Success rate is 80 percent (4/5), round trip min/avg/max = 28/75/112 ms
The success rate 80 percent in this response means:

1. Four out of five times, the response came back
2. Five packets were received at destination, and four were received at the source
3. Four times out of five, there was no response
4. Four packets out of a total of five packets reached the IP address 120.1.1.2

CCNA Routing and Switching Study Guide: Self Test for Exam 640-407

Exit and Return to Home Page

A. Success rate indicates the percentage of packets originating at the source that are successfully echoed by the destination. Destination may receive every packet, but you will receive a timeout if the reply does not come back.

- A user on a Washington DC network receives the following response after issuing a router command:

Tracing the route to Honolulu
1Tokyo(127.893.81.2) 800 ms 6 ms 4 ms
2 Lisbon(141.925.64.7) 600 ms 8 ms 6 ms
Honolulu(151.666.59.4) 400 ms 10 ms 8 ms
Washington dc#
This response was most likely obtained by issuing the command:

1. Router# telnet 151.666.59.4)
2. Lisbon# show iproute
3. washingtondc# show iproute
4. washigngtondc# trace honolulu
5. honolulu# show ip route

D. This response was most likely obtained by issuing the command washigngtondc# trace honolulu. The response tells that it is tracing the route to Honolulu. Also note that the last line of response is washingtondc#

- For an IP address of 165.3.34.35, netmask of 255.255.255.224, and a subnet ID of 165.3.34.32, the usable host address range is:

1. From 165.3.34.34 to 165.3.34.64
2. From 165.3.34.35 to 165.3.34.65
3. From 165.3.34.33 to 165.3.34.62
4. From 165.3.34.33 to 165.3.34.63

C. The usable host address range is from 165.3.34.33 to 165.3.34.62. The netmask tells us that three bits are taken from the host address for subnet mask. This leaves five bits for host addresses, which is {25} 32 possible addresses for the host. However, we cannot use all zeros or all ones. Therefore, there are 30 possible hosts. The address 165.3.32.32 is already assigned to the subnet. Therefore, the starting address for the host is 165.3.34.33. The address 165.3.34.63 is used for broadcasting.