Notes Odom, Chapter 12 Flashcards Set:

EDTECH
552
(SP11)

 Susan
Ferdon
 
 Notes – Odom, Chapter 12 Flashcards Set: http://www.flashcardmachine.com/1199236/9tw1 Mask A 32-bit binary numb...
Author: Elwin Welch
0 downloads 3 Views 260KB Size
EDTECH
552
(SP11)

 Susan
Ferdon
 


Notes – Odom, Chapter 12 Flashcards Set: http://www.flashcardmachine.com/1199236/9tw1

Mask

A 32-bit binary number, usually written in dotted decimal format whose purpose is to define the structure on an IP address. It defines the size of the host part of the address, representing the host part of the IP address with binary 0s in the mask. An IP address that is part of a registered network Public IP number, asassigned by an Internet Assigned Numbers Address Authority (IANA) member agency, so that only the organization to which the address is registered is allowed to use the address. Routers in the Internet should have routes allowing them to forward packets to all the publicly registered IP addresses. IP addresses in several Class A, B, and C networks that Private IP are set aside for use inside private organizations. These Address addresses, as defined in RFC 1918, are not routable through the Internet. A math operation performed on a pair of one-digit binary Boolean AND numbers. The result is another one-digit binary number. 1 AND 1 yields 1; all other combinations yield a 0. Bitwise Boolean A Boolean AND between two numbers of the same length in which the first bit in each number is ANDed, and then AND the second bit in each number, and then the third, and so on. Prefix Notation A shorter way to write a subnet mask in which the number of binary 1s in the mask is simply written in / CIDR decimal. For instance, /24 denotes the subnet mask with Notation 24 binary 1 bits in the subnet mask. The number of bits of value binary 1 in the mask is considered to be the prefix length. For every classful IPv4 network that is subnetted, the one Zero Subnet subnet whose subnet number has all binary 0s in the subnet part of the number. In decimal, the zero subnet can be easily identified because it is the same number as the classful network number.

Broadcast Subnet

Resident Subnet Subnet Broadcast Address Classful Network Default Mask

Subnet

Subnet Mask

Subnet Number/ Subnet Address

When subnetting a Class A, B, or C network, the one subnet in each classful network for which all subnet bits have a value of binary 1. The subnet broadcast address in this subnet has the same numeric value as the classful network’s network-wide broadcast address. The subnet in which an IP address resides. A special address in each subnet, specifically the largest numeric address in the subnet, designed so that packets sent to this address should be delivered to all hosts in that subnet. Also called directed broadcast address. An IPv4 Class A, B, or C network; called a classful network because these networks are defined by the class rules for IPv4 addressing. The mask used in a Class A, B, or C network that does not create any subnets; specifically, mask 255.0.0.0 for Class A networks, 255.255.0.0 for Class B networks, and 255.255.255.0 for Class C networks. Subdivisions of a Class A, B, or C network, as configured by a network administrator. Subnets allow a single Class A, B, or C network to be used instead of multiple networks, and still allow for a large number of groups of IP addresses, as is required for efficient IP routing. A 32-bit number that numerically describes the format of an IP address by representing the combined network and subnet bits in the address with mask bit values of 1, and representing the host bits in the address with mask bit values of 0. In IP v4, a dotted decimal number that represents all addresses in a single subnet. Numerically, the smallest value in the range of numbers in a subnet, reserved so that it cannot be used as a unicast IP address by a host.

IP Addressing and Routing This section primarily reviews addressing and routing concepts from earlier chapters, particularly in Chapter 5.  When subnetting is not used, binary 1s in the mask represent the network part of the address.  When subnetting is used, binary 1s in the mask represent both the network and subnet parts of the address. Public and Private Addressing (p. 341)

 Public IP addresses are assigned by ICANN and routers on the Internet can learn routes to reach them; they can be reached by packets in the public Internet.  Computers that are not connected to the Internet can be assigned any IP Address, but that is not necessary because TCP/IP RFC 1918 defines a set of private networks. This set of IP Addresses are never assigned by ICANN. This allows a network to be a combination of public and private.  Private IP Addresses can never be advertised in routing protocols on the Internet.

IPv6 Addressing (p. 342)  Goal of IPv6 is to significantly increase the number of IP addresses available.  IPv6 is a 128-bit address written in hexadecimal notation, with colons between each quartet of symbols. IPv6 allows for abbreviation, however. IP Subnetting Review (p. 343)  A single Class A, B or C network is subdivided into many smaller groups.  Subnetting treats a subdivision of a single Class A, B or C network as if it were a network itself.  Subnetting steals/borrows bits from the host part of the address – the size of the network part never shrinks.

IP Routing Review (p. 345)  IP addressing RFCs define subnetting so that consecutively numbered IP addresses can be represented as a subnet number (subnet address) and a subnet mask. This allows routers to succinctly list subnets in their routing tables.  One reason you need to be able to figure out the range of addresses in a subnet is to understand, analyze, and troubleshoot routing problems.

Math Operations Used When Subnetting (p. 347) Converting IP Addresses and Masks from Decimal to Binary and Back Again  When you convert from one format to the other, each decimal number represents 8 bits.  When you convert from decimal to binary, each decimal number converts to an 8-bit number  When you convert from binary to decimal, each set of 8 consecutive bits converts to one decimal number.  To practice conversions, use the Cisco Binary Game. Performing a Boolean AND Operation (p. 349)  A Boolean AND is a math operation performed on a pair of one-digit binary numbers whose result is another one-digit binary number.  0 = false, 1 = true.  Four possible results: o 0 AND 0 yields a 0 o 0 AND 1 yields a 0 o 1 AND 0 yields a 0 o 1 AND 1 yields a 1  When ANDing numbers with more digits, line up the digits of each number and perform AND operation on each digit. AND first digit of each number, second digit of each number, etc.

Prefix Notation/CIDR Notation (p. 351)  Subnet masks are actually 32-bit numbers, but for convenience, they are typically written as dotted decimal numbers.  Another way to represent a mask, called prefix notation, and sometimes referred to as CIDR notation, provides an even more succinct way to write, type, or speak the value of a subnet mask.  All subnet masks have some number of consecutive binary 1s, followed by binary 0s.  Prefix notation denotes the number of binary 1s in a mask, preceded by a /. Example: 11111111.11111111.11111111.00000000 = / 24 (“slash 24”) Binary Process to Convert Between Dotted Decimal and Prefix Notation (p. 352)  Routers display masks in both formats, depending on the show command, and configuration commands typically require dotted decimal notation.  To convert from dotted decimal to prefix notation: o Step 1: Convert the dotted decimal mask to binary o Step 2: Count the number of 1s in the 32-bit binary mask; this is the value of the prefix notation mask.  To convert from prefix notation ato dotted decimal: o Step 1: Write down x binary 1s, where x is the value listed in the prefix version of the mask. o Step 2: Write down binary 0s after the binary 1s unitl you have written down a 32-bit number o Step 3: Convert this binary number, 8-bits at a time, to decimal, to create a dotted decimal number. Decimal Process to Convert Between Dottend Decimal and Prefix Notaiotn (p. 353)  There are nine possible decimal numbers (nine binary equivalents) that can be used in a subnet mask.  Practice questions in Appendix D.

Analyzing and Choosing Subnet Masks The choice of the subnet mask revolves around some key design requirements – the need for some number of subnets, and some number of

hosts per subnet. The choice of subnet mask then defines how many subnets of that classful network can exist, and how many host addresses exist in each subnet, as well as the specific subnets. (p. 355) Analyzing the Subnet Mask in an Existing Subnet Design (p. 356)  The network part of the address is always defined by class rules.  The host part of the address is always defined by the subnet mask (it’s where the 0s are).  32 – # of network bits – # of host bits = # of subnet bits  The mask’s binary 1s define the combined network and subnet parts of the address. Determining the Number of Subnets and Number of Hosts Per Subnet (p. 359)  Number of subnets = 2s where s equals the number of subnet bits.  Number of hosts per subnet = 2h – 2 where h equals the number of host bits. The first subnet (subnet number) and last subnet (subnet broadcast address) are not useable.  Both formulas are based on the fact that to calculate the number of things that can be numbered using a binary system, you take 2 to the power of the number of bits used. Number Subnets: Subtract 2, or Not? (p. 360)  Two subnets are possibly reserved: zero subnet and broadcast subnet. o The zero subnet has the smallest numeric value and is the same number as the classful number itself. o The broadcast subnet has the highest numeric value as is the same number as the network-wide broadcast address.  Three main factors dictate when you can use these two subnets and when you cannot: o Routing protocol: Classless – use them, Classful – don’t (-2). o VLSM (using different masks in the same classful network): If using VLSM, they can be used. o Global configuration command: ip subnet zero. If router is configured this way, zero subnet can be used. If router is configured with no ip subnet zero command, zero subnet can’t be used. If ip subnet zero is configured (default) then both the zero subnet and broadcast subnet may be used. o On the CCNA exam, if a question does not give any clues, use the 2s formula.

Choosing a Subnet Mask that Meets Design Requirements (p. 362)  When a new internetwork is designed, the engineer must choose a subnet mask to use, based on the requirements for the new internetwork.  The mask needs to define enough host and subnet bits so that the design allows for enough hosts in each network (2h – 2 formula) and enough different subnets (2s or 2s – 2 formula). Finding the Only Possible Mask (p. 363)  Example: Class B network 130.1.0.0 needs at most 200 subnets, with at most 200 hosts per subnet. o Step 1: Use formula 2s and plug in values until one of the numbers is at least 200. 28=256 (27 = 128, not enough). Need 8 subnet bits to allow for 200 subnets. o Step 2: Plug in values for h in formula 2h – 2 until the smallest value of h results in 200 or more. Also 8 bits (28 – 2 = 254). o Result: network is 16 bits (Class B), Subnet needs 8, host needs 8 --- NNNNNNNN NNNNNNNN SSSSSSSS HHHHHHHH o All bits are allocated so there is just one possible answer here. 255.255.255.0, or /24 (N+S all 1s)  Memorizing powers of 2 is recommended (quicker than doing the math every time). Finding Multiple Possible Masks (p. 365)  In some cases, more than one mask may meet design requirements.  Example: Class B needs 50 subnets, with largest subnet having 200 hosts. o Network = 16 bits – NNNNNNNN NNNNNNNNN

o Host bits = 8 bits (28 – 2 = 254) o Subnet bits = 6 bits (26 = 64) o NNNNNNNN NNNNNNNN SSSSSSXX HHHHHHHHH o “X” are “wildcard” bits – can be either host or subnet.  Three valid subnet masks: o 11111111 11111111 11111111 00000000 (8s, 8s, /24) o 11111111 11111111 11111110 00000000 (7s, 9h, /23) o 11111111 11111111 11111100 00000000 (6s, 10h, /22)  Steps: o Step 1: Find network bits based on class rules. o Step 2: Find subnet bits based on 2s => required number of subnets. o Step 3: Find host buts based on 2h – 2 => required number of hosts per subnet. o Step 4: Write, from left, N + S binary 1s. o Step 5: Write, from right, H binary 0s o Step 6: Fill in “wildcard” bit positions with “X.” Then fill in with all combinations with consecutive 1s and 0x. o Step 7: Convert to decimal or prefix format as appropriate. o Step 8: Mask that maximizes subnets has most binary 1s, mask that maximizes

Analyzing Existing Subnets One of the most common subnetting tasks is to analyze and understand key facts abut existing subnets – subnet number, subnet nbroadcast address, range of usable IP addresses. Text goes through process in binary and decimal – decimal is faster in the longrun. (p. 368) Finding the Subnet Number: Binary (p. 369)  Each subnet might contain hundreds of consecutively numbered IP addresses but routers typically represent the range as a subnet number and mask in its IP routing table.  To find subnet number convert the IP address and mask to binary, perform bitwise Boolean AND, then convert result back to dotted decimal. Finding the Subnet Number: Binary Shortcut (p. 371)  For any mask octet of 255, copy the IP address’s octet to subnet number.  For any mask octet of 0, write 0 for the same octet on subnet number.

 Convert the remaining octet (if there is one) to binary, do ANDing, then convert back to decimal. Finding the Subnet Broadcast Address: Binary (p. 372)  Knowing the broadcast address helps you calculate the largest valid IP address in the subnet.  A subnet’s broadcast address has the same value as the subnet number in the network and subnet parts of the address, but all binary 1s in the host part of the broadcast address. (The subnet number has all binary 0s in the host part of the address.)  The calculate the subnet broadcast address (binary), change all the host bits in the subnet number to binary 1s.  For octets that have a number that is NOT 255 in the mask, you will have to do the ANDing to figure out the network and broadcast addresses. o Address AND Mask = network address o AND result, with 1s to replace 0s = broadcast address o For octets that have a number that is NOT 255 in the mask, you will have to do the ANDing to figure out the network and broadcast addresses.  Steps: o Step 1: Write down subnet number (or IP address) and subnet mask in binary – line them up vertically. o Step 2: Draw vertical line to separate network/subnet part from host part – between rightmost binary 1 and leftmost binary 0 in the mask. o Step 3: Copy the bits of the subnet number (or IP address) that are to the left of the line, write binary 1s for what is to the right of the line. o Step 4: convert to decimal. Finding the Range of Valid IP Addresses in a Subnet (p. 375)  The range of valid IP addresses starts with the IP address that is 1 more than the subnet number, and ends with the IP address that is 1 less than the broadcast address. Finding the Subnet, Broadcast Address, and Range of Addresses: Decimal Process (p. 377)  “Easy masks” – those that use only 255s and 0s – don’t require any actual math. o For each octet that is 255, copy the IP address octet value. o For each remaining octet, write 0.  “Difficult masks” require using binary math. Process: o Step 1: Write subnet mask and IP address in chart (p. 379).

o Step 2: Find the octet for which the subnet mask’s value is NOT 255 or 0 – draw rectangle around that column in the chart (see p. 379). This is called the “interesting octet.” o Step 3: Record subnet number’s value for uninteresting octets.  Copy the bits of the subnet number (or IP address) that are to the left of the rectangle  For each octet that is to the right of the rectangle, write a decimal 0. o Step 4: Find subnet value for interesting octet.  Calculate magic number – subtract subnet mask’s interesting octet value from 256.  Calculate multiples of magic number, starting at 0, up through 256.  Find multiple of magic number that is closest to, but not greater than, the IP address’s interesting octet value.

Design: Choosing the Subnets of a Classful Network (p. 384) Finding All Subnets with Fewer Than 8 Subnet Bits  Calculate magic number  Start with network number and add magic number to the interesting octet, generating new addresses, until you reach 256. 256 not valid, previous is broadcast address. Finding All Subnets with Exactly 8 Subnet Bits  Mask will be 255.255.0.0 (Class A) or 255.255.255.0 (Class B) – subnet part is exactly one octet.  256 – 255 is 1 so magic number is 1 so each goes up by one in that octet. Finding All Subnets with More Than 8 Subnet Bits  The subnet part of the address exists in at least two different octets.  When any step’s addition results in 256, write “0” for that octet and add 1 to the previous octet’s value.  For any other octets, copy the value.  Continue with subnets until all non-network octets are maxed out.

Exam Prep: p. 394 - 396

“Do I Know This Already” Quiz, Chapter 12 - pp. 332-335 TOPIC Exam Preparation Tools for Subnetting IP Addressing and Routing Math Operations Used When Subnetting

Analyzing and Choosing Subnet Masks

Q#

Design: Choosing the Subnets of a Classful Network

2nd Try

Answer

none 1 2 3 4 5 6 7

9 10 11 12

A and C B D E B D C B, C, D, E E, F E, F __ , E, F B, D

13

A, B

14

A

8 Analyzing Existing Subnets

1st Try

C

F D, E, F C, D, E, F

Q6: If mask 255.255.255.240 were used with a Class C network, how many subnets could exist, with how many hosts per subnet, respectively? Answer: C Explanation: My binary math was wrong initially --- I had SSSHHHHH (224 mask) instead of SSSSHHHH (240 mask)

Q10: Which of the following IP addresses is not in the same subnet as 190.4.80.80, mask 255.255.240.0? Answer: C Explanation: First time I did it in my head (my bad) because I didn’t notice the “240” – I thought it was an easy mask. 255 255 190 4 190 4 256 – 240 = 16 [magic number]

240 80

0 80 0

Subnets: Subnet address

First IP Address

Last IP Address

Broadcast Address

190.4.0.0 (zero subnet) 190.4.16.0 190.4.32.0 190.4.48.0 190.4.64.0 190.4.80.0 190.4.96.0

190.4.16.1 190.4.32.1 190.4.48.1 190.4.64.1 190.4.80.1 190.4.96.1

190.4.31.254 190.4.47.254 190.4.63.254 190.4.79.254 190.4.95.254

190.4.31.255 190.4.47.255 190.4.63.255 190.4.79.255 190.4.95.255

a. 190.4.80.1 b. 190.4.80.50 c. 190.4.80.100 d. 190.4.80.200 e. 190.4.90.1 f. 10.1.1.1

YES, YES, YES, YES, YES, NO

in in in in in

range range range range range

Q11: Which of the following IP addresses are not in the same subnet as 190.4.80.80/25? Answer: D, E, F Explanation: /25 =

11111111 NNNNNNNN 255 190 190

11111111 NNNNNNNN 255 4 4

11111111 SSSSSSSS

10000000 SHHHHHHH

255 128 80 80 0 0 256 – 128 = 128 [magic number]

Subnets: Subnet address

First IP Address

Last IP Address

Broadcast Address

190.4.0.0 (zero subnet) 190.4.0.128

190.4.0.129

190.4.31.254

190.4.0.255

190.4.1.0

190.4.1.1

190.4.1.126

190.4.1.127

190.4.79.0 190.4.79.128 190.4.80.0 190.4.80.128

190.4.79.1 190.4.64.1 190.4.80.1 190.4.80.129

190.4.79.126 190.4.79.254 190.4.80.126

190.4.79.127 190.4.79.255 190.4.80.127

a. 190.4.80.1 b. 190.4.80.50 c. 190.4.80.100 d. 190.4.80.200 e. 190.4.90.1 f. 10.1.1.1

YES, in range YES, in range YES, in range NO NO NO

Q13: Which of the following are valid IP subnet numbers in network 180.1.0.0 when using mask 255.255.248.0? Answer: C, D, E, F Explanation: /25 =

11111111 NNNNNNNN 255 180 180

11111111 NNNNNNNN 255 1 1

11111111 SSSSSHHH

10000000 HHHHHHHH

248 0 0 256 – 248 = 8

Subnets: multiples of 8: 8, 16, 32, 48, 64

a. 180.2.2.0 b. 180.1.4.0 c. 180.1.8.0 d. 180.1.16.0 e. 180.1.32.0 f. 180.1.40.0

No --- different Class B network No --- not a multiple of 8 Yes Yes Yes Yes

0 0 0 [magic number]