1. Trang chủ
  2. » Công Nghệ Thông Tin

CompTIA Network+ Certification Study Guide part 32 docx

10 284 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 150,12 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

If not, this Table 7.6 Calculating Binary Bits from Dotted Decimal Converting decimal to Binary Subtraction Largest binary number in octet that can be subtracted from this number –128 La

Trang 1

the number is 1 How do we get to 2? We set the next bit, bit 1, to 1 and reset bit 0 to 0 This is just like in the decimal numbering system in which you count, in the right-most position, from 0 to 9 After nine, you move to the next position, set it to 1 and reset the first position to 0, resulting in the decimal number 10 Binary works the same way, except that each bit posi-tion can be only 0 or 1, thus you need more posiposi-tions in order to represent decimal numbers

To create a binary number, we set the desired bit to 1 For instance, to represent the number 128, we would set the eighth position, or bit 7 (remember, we’re counting from 0 to 7, not 1 to 8), to 1 What if we wanted to create the number 132? We’d set bit 7 and bit 2 to 1 The rest of the bits would remain 0

as shown in Table 7.5 Any number can be expressed this way, limited only by the number of bits in a defined field (in TCP/IP, we use only eight bits for each number)

To convert a binary number to decimal, add the value of each bit position set to 1 Thus, the binary number 10000100 converts to decimal 132

To convert a decimal number to a binary number, look at the decimal number and find the largest binary bit represented If we want to convert 184

to binary, we do the math shown in Table 7.6 For each number we subtract,

we set the corresponding bit to 1

Using this example, 184 can be notated as 10111000 with the 128, 32,

16, and 8 bits set to 1, and the rest set to 0 As you become accustomed to working with both binary and decimal conversions, you may not need to do this lengthy math; eventually you might simply be able to do this in your head Let’s look at Exercise 7.1, which will help you master the concept of converting decimal and binary numbers

Table 7.4 Binary and Decimal Values Bit number Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

Table 7.5 Setting Bits to Create Dotted Decimal Values Bit number Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

Trang 2

ExErcisE 7.1 converting Decimal and Binary Numbers

This exercise is designed to reinforce what we’ve learned about binary and

decimal conversions Remember, you will not get a question that explicitly

asks you to do these steps, but you may be required to do them to figure out if

a subnet mask is incorrectly shown on the exam Understanding this

conver-sion process is the cornerstone of understanding the IP addressing system

Convert the following number to binary: 24 Using the technique

1

described in this section, we first write out the bit values of an octet:

128 64 32 16 8 4 2 1 Next, we look for the highest value that is

less than the number given In this case, the highest number is 16

We set bit 4, which is equivalent to decimal 16, to 1 Next we subtract

16 from our number: 24  16  8 We set bit 3, equivalent to decimal

8, to 1 We subtract 8  8  0 and we have no remainder Thus, we

have the 16 and 8 bits set to 1, and all other bits are zero: 00011000

Convert the following number to decimal: 00001011 In this case,

2

we have to do just the opposite of what we did in the first

conver-sion Now, we write the bit values of the octet and add up any bit

values set to 1 The octet numbers are 128 64 32 16 8 4 2 1 The

following bits are set to 1: 8, 2, 1 We add 8  2  1 to yield 11,

the decimal equivalent of this binary notation

Convert the following number to binary: 255.0.132.2 Let’s work

3

on each octet, one at a time Let’s begin with the left-most octet,

255 By now, you might recognize that the 255 is all 1s If not, this

Table 7.6 Calculating Binary Bits from Dotted Decimal

Converting decimal to Binary Subtraction

Largest binary number (in octet) that can be subtracted from this number –128

Largest binary number that can be subtracted –32

Largest binary number that can be subtracted –16

Largest binary number that can be subtracted –8

Trang 3

is a handy fact to remember To calculate its value, we begin by subtracting the highest bit value less than 255 (The bit value being

subtracted is in bold to make it easier to read) In this case, that’s

128 255  128  127 Again, we subtract the largest bit value:

127  64  63 Repeating this process we get: 63  32  31 31 

16  15 15  8  7 7  4  3 3  2  1 1  1  0 For each

bit value we subtract (128, 64, etcetera) we set the corresponding bit position to 1 Thus, the binary equivalent is 11111111 The

next octet (x) is easy; it’s all 0s The octet is written as 00000000 The third octet (y) is equal to 132 Using our subtraction

tech-nique, we know that the 128 bit will be set to 1 132  128  4 Thus, we set the 4 bit to 1, yielding this octet: 10000100 The final

octet (z) is 2 This is easy to figure out – the second bit is set to 1,

the rest of the bits are 0 The octet is 00000010 Putting this all together, we have 11111111.00000000.10000100.00000010 Convert the following number to dotted decimal notation:

4

00001000.00001111.00101101.10101010 In this case, we need to convert this number to dotted decimal by adding the values of each bit position set to 1 Again, we’ll start on the left In the first octet, the only position set to 1 is the 8 position In the second octet, the right-most four bits are set to 1 If you’re becoming familiar with the different bit patterns, you’ll immediately recognize 15 Other-wise, add the bit values of 1, 2, 4, and 8 together to yield 15 The

next octet (y) has the following bit positions set to 1: 32, 8, 4, 1 If

you have difficulty with this, write out the bit values 128 64 32 16

8 4 2 1, and then write out the octet underneath You’ll see which bit positions are set to 1 and you can add those values In this case,

it equals 45 The final octet, z, has the following bit positions set

to 1: 128, 32, 8, 2 Adding these results yields 170 The resulting dotted decimal notation for this is 8.15.45.170

Convert the following number to binary: 112.64.117.3 Again, we’ll

5

use our subtraction method to find the largest bit value that is lower than the number and subtract it from the number We’ll repeat the process until the remainder is 0 For each number we subtract (shown in bold), we set the corresponding bit to 1 Our answer looks like this:

First octet (w): 112  64  48 48  32  16 16  16  0 

01110000

Second octet (x): 64  64  0  01000000

Trang 4

Third octet (y): 117  64  53 53  32  21 21  16  5 5  4

 1 1  1  0  01110101

Fourth octet (z): 3  2  1 1  1  0  00000011

Putting the four octets together yields this dotted decimal notation:

01110000.01000000.01110101.00000011

Although the adding and subtracting may seem simplistic, it’s

impor-tant to practice this over and over, so that you can actually look at an octet

and add up the values in your head or at least recognize the values and add

them with a calculator It’s simple math that simply requires close attention

to detail It’s easy to inadvertently miss a bit position Writing down the

sequence can help you avoid these kinds of errors

It’s a good idea to practice converting binary to decimal, as you’ll need

to know how to do this when working on your network and as well as the

Network exam The key is to break each octet down individually and

check your work by adding up the value of the bits you’ve set This will

help to ensure that your math and your logic are both correct and will

reduce common errors when you set up subnets, subnet masks, and other

IP addresses

Network Id and host Id

Now that you’ve learned how to convert binary to decimal and back again,

let’s look at the principals underlying networking with IP addresses An IP

address has two elements, the network address and the host address As

we’ve discussed, the IP address is a unique address assigned to a computer

Test day Tip

After you’re situated in the exam room at the testing computer, take a minute or two

before starting the test to write down all your tips and tricks for the exam on the blank

paper provided (and make sure that you do this before you start the exam because

your allocated time doesn’t begin until you actually start) It’s a good idea to write down

128 64 32 16 8 4 2 1 Then, when you’re asked a question about binary or decimal

conversions, you won’t make an error simply because you forgot that 32 is in between

16 and 64 If you practice these conversions enough, you’ll actually begin to recognize

patterns immediately – you’ll know that 00001111 is 15 and 00001010 is 10, and so

on It’s not difficult math, but you have to pay very careful attention to the details One

missed bit changes everything!

Trang 5

or device (printer, router, etc.) connected to the network The network address is a fixed address used to identify a common network Within each

IP address is a network address (shared by all computers on that network) and a unique host address When combined, the result is a single unique IP address on the network

All hosts (also called nodes when talking about connected network

devices) on the same network segment must have the same network ID

A good analogy is the U.S zip code system There are many houses on a street, each with a unique street address (host ID) but all of them have the same zip code within a certain area (network ID) The street address com-bined with the zip code is a unique combination that identifies a particular house or building just as an IP address identifies a particular host Figure 7.3 illustrates this concept

Large networks are usually divided by routers Routers (first covered in Chapter 3, “Network Devices”) separate one segment from another and only pass along data destined for external networks (those on the other side of the router) If the data is intended for a host within the segment,

FIGurE 7.3 Network And Host IDs.

Trang 6

the router does not forward it to the external segment(s) This reduces

net-work traffic and increases response times In order for this to net-work,

how-ever, each segment of the network must have a unique identifier, which

is the network address or network ID Primary network IDs are managed

by the Internet Network Information Center (InterNIC), an organization

that manages top-level network addresses to prevent two organizations

from using the same network ID Two networks connected to the Internet

cannot use the same network ID (networks that are completely

stand-alone and have no connection to the Internet can use any network ID you

wish)

Originally, network IDs were divided into classes: Class A, B, C, and D

Each class had a specific purpose and a defined range of allowable addresses

The goal was to provide for three common scenarios in networking:

Small number of very large networks (large number of nodes per

network)

Moderate number of medium-sized networks

Large number of very small networks (small number of nodes per

network)

This class-based system worked well for quite some time However, in

the 1990s, when the Internet boom period (the massive growth of the

Inter-net) began, it became clear that the addressing scheme would not support

the many hundreds of thousands of networks that were popping up (and

get-ting connected to the global network) around the world A new classless

sys-tem was devised It still uses IP addressing fundamentals, but it extends the

original concept The class-based system now often is referred to as classful,

to differentiate it from the classless addressing system We’ll discuss the

classless system (also called variable length subnet masking or VLSM) later

in this chapter For now, let’s look at the class-based system to understand

network addressing fundamentals

The 32-bit IP address is subdivided into two portions: the network address

space and the host address space The use of 32-bits does not change, but

the use of the bits within the 32-bit address changes to define four classes

of addresses There are currently five defined address classes: Class A, B, C,

D, and E Microsoft Windows Server 2003 supports four address classes: A,

B, C, and D It does not support Class E addresses, which are considered

experimental at this time In addition, there are several guidelines regarding

allowable or legal addresses for network IDs and for host IDs As we learned

earlier, the notation used is called dotted decimal and is also represented as

w.x.y.z to denote the four octets used.

Trang 7

Rules for Network IDs

The following rules apply to creating or using network IDs in a class-based system

Network IDs cannot begin with 127 as the first octet, such as

■ 127.14.102.6 127.x.y.z is reserved for loopback addresses A loop-back address is used to test IP software on the host computer and is not associated with the computer’s hardware

A Network ID cannot have all bits set to 1 This configuration is

■ reserved for broadcast addresses

A Network ID cannot have all bits set to 0 This configuration is

■ reserved for indicating a host on the local network

A Network ID must be unique to the IP network If you have three

■ network segments in your corporate network, each segment must have a unique network ID

Rules for Host IDs

The following rules apply to creating and assigning host IDs

A host ID cannot have all bits set to 1 This configuration is

■ reserved for broadcast addresses

A host ID cannot have all bits set to 0 This configuration is

■ reserved for the expression of IP network IDs

A host ID must be unique to the network on which it resides

Exam warning

The 32-bit IP address is subdivided into two portions: the network address space and the host address space You must know how to identify IP addresses correctly on the Network+ exam You must also know how to identify an IP address by its class, as well as its default subnet masks Please pay very close attention to these areas as you proceed through the text A lot of the material here is to get you to learn how to do this, not just memorize it for the exam You can’t fake the understanding of IP address-ing on the exam, and rote memorization is no cure either You must be able to clearly identify IP addressing issues on the Network+ exam and how to solve them You will not be asked to create an elaborate design for a complex network, but you may see diagrams of segments that you need to work with Understanding IP addressing will help you to successfully navigate these questions and pass these section objectives on the exam.

Trang 8

Just like modern day humanity, there is obviously a class system with IP

addressing and this one is needed to keep the IP address space organized and

readily available for use In the next section, we will cover the IP addressing

class system

Class A Addresses

Class A addresses are designed for very large networks with few logical

net-work segments and many hosts Class A addresses always have the

order bit (or left-most bit) set to zero The first octet (the left-most eight

bits) is used to define the network ID The host addresses use the second,

third, and fourth octets This can also be represented as w  network ID,

x.y.z  host ID (using the convention that all IP addresses are composed of

four octets and represented as w.x.y.z) Let’s look at an example: 01110000

00000000 00001100 00001111 is a Class A address The network ID (in bold)

is 112 The host ID is 0.12.15 Thus, this IP address is 112.0.12.15 Other

hosts on the same network would all have IP addresses that begin with 112

With the high-order bit set to 0, by definition, a Class A address cannot

be greater than 127 because a value of 128 would require the left-most bit be

set to 1 To calculate the number of possible networks, use the formula 2∧n

or 2n, where n is the number of bits in the octet that can be used In this case,

we cannot use the left-most bit, so n in this case is 7 2∧7 or 27 equals 128

However, we know that we cannot have a network set to 127 (loopback) and

we cannot have a network of all 0s or all 1s Therefore, we have 126 useable

network addresses We can also calculate how many possible host addresses

we have in a Class A network by using the same formula In this case, we’re

using three octets for host IDs Therefore, we have 224 or 16,777,216 Again,

we cannot use addresses of all 0s or all 1s, so we have 16,777,214 useable

host addresses available

Class B

Class B addresses are used for medium-sized networks that have a moderate

number of hosts connected to them Class B addresses always have the first

two high-order bits (left-most) set to 10 The Class B network ID uses the first

two octets for the network ID This allows for more network IDs and fewer

hosts than a Class A network Because it uses an additional octet for the

net-work, there is one fewer octet available for host IDs, reducing the number of

hosts that can be addressed on this network by approximately a factor of two

Here’s a Class B IP address: 10010001 00001100 00001010 00001001

This translates into 160.12.10.9 The first two octets (160.12) represent

the network ID and the last two octets (10.9) represent the host ID portion

Trang 9

of this IP address Thus, the schema is w.x  network ID, y.z  host ID

Notice that the two high-order bits are set to 10

Class B networks use the first two octets for the network ID However,

we cannot set the second bit to 1 (Class B left-most two bits must be 10) Therefore, we can calculate that there are a total of 214 or 16,384 Class B network addresses (16 bits for network ID, but we cannot use the first two bits because they must be set to 10) As we are required to set the first two bits to 10, we will not end up with a network address that is all 0s or all 1s; therefore we do not need to subtract from our total network IDs to find avail-able network IDs To calculate the number of hosts on a Class B network, we know that we use 16 bits (two octets) for the host ID Thus, we have 65,536 total host IDs and we cannot use all 0s or all 1s, resulting in 65,534 available host IDs on a Class B network

Class C

Class C addresses are for small networks with few hosts These addresses

have the first three high-order bits set to 110 Class C addresses use the first

three octets for the network ID and the last octet for the host ID Using your

understanding of IP addressing at this point, how many host addresses will

be available in each Class C network? If you answered 256 (0 through 255), you’d be close If you add each bit (128  64  32  16  8  4  2  1), it totals 256, but remember we cannot use an address of all 0s or all 1s We’re left with 254 possible addresses The schema for the Class C IP address is

w.x.y  network ID, z  host ID.

Class C networks use the left-most three bits set to 110 To calculate the number of networks available, we calculate the total bits available, in this case 24 (three octets)  3 (first three bits must be 110)  21 Using the formula 221 we see that the number of Class C networks is 2,097,152 Again, because the left-most three bits must be set to 110, we do not need

to subtract for network IDs of all 0s or all 1s As we saw, the number of host IDs is 254 based on 28  2  256  2 or 254

Class d and Class E

Class D is reserved for IP multicast addresses The first four high-order bits are set to 1110 The remaining 28 bits are used for individual IP

multi-cast addresses Multimulti-cast Backbone on the Internet (MBONE) is an

exten-sion to the Internet that supports IP multicasts and uses Class D addresses MBONE allows a single packet to have multiple destinations and is most often used in real-time audio and video applications Multicasting will be covered later in this chapter

Trang 10

Class E addresses are reserved for future use This class is considered

experimental and the addresses are defined as “reserved for future use.” The

first five high-order bits are set to 11110

Address Class Summary

This is by far one of the most important sections for the Network exam IP

addresses are 32-bit addresses divided into four octets Each octet has eight

bits and a maximum value of 255, which is when all eight bits are set to 1

Each address class defines the maximum number of networks (or subnets,

actually) and hosts These are summarized in Tables 7.7 and 7.8

uNdErSTANdING SuBNETTING

A Class A network could theoretically have 16,777,214 hosts However, in a

real-world application, this would be impractical Most networks are broken

down into smaller segments that are easier to manage It is possible to assign

such a network, although it would be very flat, and very large by default As

Table 7.7 Network Address Classes

Address Class octets used First Network Id last Network Id Number of Networks

* Remember that a valid network address cannot begin with 127.0.0.0, which is reserved for loopback

addresses.

Table 7.8 Host Address Classes

Address Class octets used First host Id last host Id Number of hosts

Test day Tip

It would be helpful for you to be able to recall this information (especially the default

address classes and ranges) for the Network+ exam It’s always helpful to practice writing

this information down; therefore, when you get to the test center, you can jot this down

before the exam and have it handy while you are taking the exam.

Ngày đăng: 04/07/2014, 13:21

TỪ KHÓA LIÊN QUAN