49

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Embed Size (px)

Citation preview

Page 1: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

1 of 92

Page 2: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

2 of 92

NetworkingNetworking TCP/IPTCP/IP

IP Addressing and Subnetting

Sandullah Epsicokhan

Page 3: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

3 of 92

Converting IP addresses from binary to decimal

• If you’re given a 32 bit binary number, break it into four groups of eight bits each.

Write

10010110100101100000001000000001

As

10010110 10010110 00000010 00000001

Page 4: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

4 of 92

Boolean AND operation

• The Boolean AND operation is a logical operation. It means exactly what it says. In order for the statement to be true we must have two things present.

Page 5: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

5 of 92

Boolean AND operation

• For example if I said: “I have my right shoe and left shoe.” the statement would not be true if:

– If I only had my left shoe.

– If I only had my right shoe.– If I’m missing both shoes.

Page 6: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

6 of 92

Boolean AND operation

• Similar logic is applied inside computers. Instead of shoes we use binary digits of 0 and 1.

• In computers the binary number 1 means we have something whereas the binary number 0 means we have nothing. Another way to look at it is that the binary number 1 means true in a binary number 0 means false.

Page 7: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

7 of 92

Boolean AND operation

• Consider the following.

– 0 AND 0 = 0

– 0 AND 1 = 0

– 1 AND 0 = 0

– 1 AND 1 = 1

Page 8: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

8 of 92

Subnetting Practice

• AppA_CD.pdf on the Intro CD has 25 additional subnetting questions with answers.

• You can also check your results by using a subnet calculator.

http://www.subnet-calculator.com/

Page 9: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

9 of 92

Prefix notation

• Subnet masks made up of 1s and 0s. The 1s and 0s must be consecutive in a subnet mask. You cannot have 1s and 0s interspersed throughout the mask.

• The subnet mask always starts with 1s followed by 0s.

Page 10: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

10 of 92

Prefix location

• Prefix notation is simply a slash (/) followed by the number binary 1s in a mask. For example:– Binary 11111111 11111111 11111111 00000000

– Prefix notation /24

• We say the subnet has a 24 bit prefix or a slash 24 prefix.

Page 11: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

11 of 92

How many hosts, and how many subnets?

• Finding the sizes of the network, subnet, and host parts of the IP address.– The network part the address is always

defined by class rules.– The host part of the address is always

defined by the subnet mask. Binary 0s in the mask mean that the corresponding address bits are part of the host field.

– The subnet part of the address is what’s left over in the 32 bit address.

Page 12: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

12 of 92

Address 130.4.102.1

Mask 255.255.255.0

Number of network bits

?

Number of host bits ?

Number of subnet bits ?

How many hosts, and how many subnets?

Page 13: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

13 of 92

Address 130.4.102.1

Mask 255.255.255.0

Number of network bits

16 (Class B)

Number of host bits 8 (Subnet mask has 8 zero bits)

Number of subnet bits 32 – (16 + 8) = 8

How many hosts, and how many subnets? NNNNNNNN . NNNNNNNN . NNNNNNNN. HHHHHHHH 8N 8N 8N 8H 24N + 8H

Page 14: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

14 of 92

Address 199.1.1.100

Mask 255.255.255.0

Number of network bits

?

Number of host bits ?

Number of subnet bits ?

How many hosts, and how many subnets?

Page 15: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

15 of 92

Address 199.1.1.100

Mask 255.255.255.0

Number of network bits

24 (Class C)

Number of host bits 8 (Subnet mask has 8 zero bits)

Number of subnet bits 32 – (16 + 16) = 0

No subnetting.

How many hosts, and how many subnets? NNNNNNNN . NNNNNNNN . NNNNNNNN. HHHHHHHH 8N 8N 8N 8H 24N + 8H

Page 16: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

16 of 92

Understanding IP addressing

Address 130.4.102.1

Mask 255.255.252.0

Number of network bits

16 (Class B)

Number of host bits 8 (Subnet mask has 8 zero bits)

Number of subnet bits 32 – (16 + 8) = 8

NNNNNNNN . NNNNNNNN . SSSSSSS. HHHHHHHH 8N 8N 8S 8H 24N + 8H

Page 17: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

17 of 92

Understanding IP addressing

Address 199.1.1.100

Mask 255.255.255.224

Number of network bits

?

Number of host bits ?

Number of subnet bits ?

NNNNNNNN . NNNNNNNN . NNNNNNNN. SSSSSSSH 8N 8N 8N 8H 24N + 7S + 1H

Page 18: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

18 of 92

Key methods

• Convert the mask binary, using any method for conversion at your disposal, and count the number of zeros.

• Convert the mask to binary after memorizing the nine decimal and binaries values and tables 12-8

• Create your own binary conversion table.

How many hosts, and how many subnets?

Page 19: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

19 of 92

Subnetting formulas

Number of subnets =

2(number-of-subnet bits)-2

Number of hosts per subnet =

2(number-of-hosts-bits)-2

Page 20: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

20 of 92

Create a decimal conversion table

• When working with binary numbers and octets, one way to do the math is the start with a decimal conversion table. Start by creating the following table.

Page 21: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

21 of 92

Create a decimal conversion table

BitCounts 1 2 3 4 5 6 7 8

Table S-1 Number of bits in a byte

Page 22: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

22 of 92

Create a decimal conversion tableTable S-2 Value of each bit (working from right to left)

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Page 23: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

23 of 92

Create a decimal conversion table

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal

Value 128 64 32 16 8 4 2 1

Table S-3 Decimal Value of the powers of two. Each is twice as much as the bit to the left.

Page 24: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

24 of 92

Align the binary number to the table

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal

Value 128 64 32 16 8 4 2 1

BinaryNumber 1 0 0 1 0 1 1 0

Table S-4 Align the bits to the decimal values.

Page 25: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

25 of 92

Keep the decimal values where the number 1s appear Then add the results

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal

Value 128 64 32 16 8 4 2 1

BinaryNumber 1 0 0 1 0 1 1 0

Result 128 0 0 16 0 4 2 0

Sum 128 + 16 + 4 + 2 = 150

Table S-5 Multiple the binary value times the decimal value above it. Then add up the result.

Page 26: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

26 of 92

Exercise 1: Build the conversion tableExercise S-1 Build the conversion table

Page 27: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

27 of 92

Exercise 1: Build the conversion table

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Exercise S-1 Lay out the bit positions

Page 28: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

28 of 92

Exercise 1: Build the conversion table

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal

Value 128 64 32 16 8 4 2 1

Exercise S-1 Double the values

Page 29: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

29 of 92

Exercise 2: Convert to decimal

00000000

Page 30: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

30 of 92

Exercise 2: Convert to decimal

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal

Value 128 64 32 16 8 4 2 1

BinaryNumber 0 0 0 0 0 0 0 0

Result 0 0 0 0 0 0 0 0

Sum 0

Table S-5 Multiple the binary value times the decimal value above it. Then add up the result.

Page 31: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

31 of 92

Exercise 3: Convert to decimal

01010011

Page 32: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

32 of 92

Exercise 3: Convert to decimal

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal

Value 128 64 32 16 8 4 2 1

BinaryNumber 0 1 0 1 0 0 1 1

Result 0 64 0 16 0 0 2 1

Sum 64 + 16 + 2 + 1 = 83

Table S-5 Multiple the binary value times the decimal value above it. Then add up the result.

Page 33: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

33 of 92

Exercise 4: Convert to decimal

11111111

Page 34: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

34 of 92

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal

Value 128 64 32 16 8 4 2 1

BinaryNumber 0 0 0 0 0 0 0 0

Result 128 64 32 16 8 4 2 1

Sum 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

Table S-5 Multiple the binary value times the decimal value above it. Then add up the result.

Exercise 4: Convert to decimal

Page 35: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

35 of 92

Exercise 5: Convert to decimal

10101101

Page 36: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

36 of 92

BitCounts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal

Value 128 64 32 16 8 4 2 1

BinaryNumber 1 0 1 0 1 1 0 1

Result 128 0 32 0 8 4 0 1

Sum 128 + 32 + 8 + 4 + 1 = 173

Table S-5 Multiple the binary value times the decimal value above it. Then add up the result.

Exercise 5: Convert to decimal

Page 37: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

37 of 92

Convert decimal to binary• If X is a number we wish to convert

from decimal to binary, perform the following steps building the binary number from right to left until X = 0.

1. If X is odd, write down the number “1” and subtract 1 from X.

2. If X is even, write down “0”. 3. Divide X by 2. 4. Go back to step 1 using the result from

step 3.

Page 38: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

38 of 92

Convert decimal to binary

•For example, let's take the decimal value 157:157 - 1 = 156, 156 ÷ 2 = 78 78 - 0 = 78, 78 ÷ 2 = 39 39 - 1 = 38, 38 ÷ 2 = 19 19 - 1 = 18, 18 ÷ 2 = 9 9 - 1 = 8, 8 ÷ 2 = 4 4 - 0 = 4, 4 ÷ 2 = 2

2 - 0 = 2, 2 ÷ 2 = 1 1 - 1 = 0, Result from bottom up

10011101

Page 39: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

39 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 40: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

40 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0

128

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 41: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

41 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0 + 128

128

192

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 42: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

42 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0 + 128 + 192

128

192

224

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 43: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

43 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0 + 128 + 192 + 224

128

192

224

240

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 44: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

44 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0 + 128 + 192 + 224 + 240

128

192

224

240

248

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 45: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

45 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0 + 128 + 192 + 224 + 240 + 248

128

192

224

240

248

252

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 46: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

46 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0 + 128 + 192 + 224 + 240 + 248 + 252

128

192

224

240

248

252

254

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 47: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

47 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0 + 128 + 192 + 224 + 240 + 248 + 252 + 254

128

192

224

240

248

252

254

255

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 48: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

48 of 92

Bit Counts 1 2 3 4 5 6 7 8

Power 27 26 25 24 23 22 21 20

Decimal Value 128 64 32 16 8 4 2 1

Masks + 0 + 128 + 192 + 224 + 240 + 248 + 252 + 254

128

192

224

240

248

252

254

255

Build a subnetting tableTable S-5 Add current subnet value to current decimal value

Page 49: Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico 1 of 92

Subnetting Tips - CCNA Power Camp, Ver. 1.00 Copyright 2005, Epsico

49 of 92

Questions?