1 of 21

Computer Networks�Lecture – X3

2 of 21

Introduction

  • Determining the Network, Broadcast and useable Host range in obviously important when designing an IP scheme.
  • It is important to chart the usable IP ranges as well as plan for future growth.
  • We start by determining whether you are working with a Class A, B or C address.
  • Create your chart with the SNM (Subnet Mask) on the first line and your IP address on the second line.
  • Label the left column with the appropriate titles of what you are trying to determine which are the
    • Subnet Address
    • Broadcast Address
    • Last and first Usable host

2

3 of 21

Step 1

  • Draw the table and insert the IP address and SNM

3

4 of 21

Step 2

  • Determining the ‘255’ octet range.
  • With any SNM octet of 255, you bring down the octets in the IP Address since this part of the IP address will not change.

4

5 of 21

Step 3

  • Determine the ‘0’ octet range.
  • The 4th octet in the SNM is 0. We know that for a ‘0’octet the range is 0-255. We simply place the 0 in the Subnet Address space and the 255 in the Broadcast Address space.

5

6 of 21

Step 4

  • Determine the subnet address
  • To determine the Subnet, we have to find the missing number. To do this we subtract the non 0/255 octet number from 256; in this case the number is 240. This will give us our “magic” number 256-240=16. 16 is our “magic” number.

  • We now increment starting at 0 using 16. What we are looking for is a number that is either equal to but not greater then 96, (in this case the 3rd octet in the IP Address.)

0-16-32-48-64-80-96-112…

  • As you can see, 96≤112, so it goes into the empty octet completing the Subnet address. If the number had been anything between 96-111, our subnet would still be 96.

6

7 of 21

Step 4

7

8 of 21

Step 5

  • Determine the Broadcast address.
  • To determine the Broadcast address we look at the range of the 96 subnet.

  • Since the last bit in the 96 subnet is 111, our broadcast address is 111.

8

9 of 21

Step 6

  • Determine the 1st valid Host range.
  • To determine the 1st valid Host range, start with the Subnet address and bring down the 3rd octet of 96. Then bring down the last octet and add 1. (0+1=1)
  • This (172.16.96.1) is the first valid host for the subnet 172.16.96.0.

9

10 of 21

Step 7

  • Determine the last valid Host range.
  • To determine the last valid Host, start with the Broadcast address and move up the 3rd octet of 111 and the last octet while subtracting 1. (255-1)
  • This, (172.16.111.254) is the last valid host for the subnet 172.16.96.0
  • The host range for the subnet is 172.16.96.1 to 172.16.111.254

10

11 of 21

11

Class Work 1

Subnet Mask

255

248

0

0

IP Address

10

30

200

16

Subnet

10

24

0

0

1st valid Host

10

24

0

1

Last Valid Host

10

31

255

254

Broadcast Address

10

31

255

255

Class Work 1

12 of 21

12

Class Work 2

Subnet Mask

255

255

255

224

IP Address

172

16

47

36

Subnet

172

16

47

32

1st valid Host

172

16

47

33

Last Valid Host

172

16

47

62

Broadcast Address

172

16

47

63

Class Work 2

13 of 21

13

Class Work 3

Subnet Mask

255

255

255

192

IP Address

192

168

75

150

Subnet

192

168

75

128

1st valid Host

192

168

75

129

Last Valid Host

192

168

75

190

Broadcast Address

192

168

75

191

Class Work 3

14 of 21

Problem 1

  • A company is granted the site address 201.70.64.0 (class C). The company needs six subnets. Design the subnet.

  • Solution:
  • The company needs six subnets. This number 6 is not a power of 2. The next number that is a power of 2 is 8 (23). We need 3 more 1s in the subnet mask. The total number of 1s in the subnet mask is 27 (24 + 3).
  • The total number of 0s is 5 (32 - 27). The subnet mask is

14

15 of 21

Problem (Cont.)

  • The number of addresses in each subnet is 25 (5 is the number of 0s) or 32.

15

16 of 21

Problem (Cont.)

16

17 of 21

Problem 2

  • You are given two address / mask combinations, written with the prefix/length notation, which have been assigned to two devices. Your task is to determine if these devices are on the same subnet or different subnets. You can do this by using the address and mask of each device to determine to which subnet each address belongs.
  • Device A: 172.16.17.30/20 Device B: 172.16.28.15/20
  • Solution:
  • Determining the Subnet for Device A:
  • 172.16.17.30 - 10101100.00010000.00010001.00011110
  • 255.255.240.0 - 11111111.11111111.11110000.00000000 subnet

= 10101100.00010000.00010000.0000000

  • = 172.16.16.0
  • Device A belongs to subnet 172.16.16.0.

17

18 of 21

Problem (Cont.)

  • Determining the Subnet for Device B:
  • 172.16.28.15 - 10101100.00010000.00011100.00001111
  • 255.255.240.0 - 11111111.11111111.11110000.00000000
  • Subnet = 10101100.00010000.00010000.00000000

= 172.16.16.0

  • From these determinations, Device A and Device B have addresses that are part of the same subnet.

18

19 of 21

Problem 3

  • A company is granted the site address 181.56.0.0 (class B). The company needs 1000 subnets. Design the subnets.
  • Solution:
  • The number of 1s in the default mask is 16 (class B).
  • The company needs 1000 subnets. This number is not a power of 2. The next number that is a power of 2 is 1024 (210). We need 10 more 1s in the subnet mask. The total number of 1s in the subnet mask is 26 (16 + 10).
  • The total number of 0s is 6 (32 - 26).
  • The subnet mask is

19

20 of 21

Problem (Cont.)

  • The number of subnets is 1024.
  • The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.

20

21 of 21

Thanks!

Any questions?

You can find me at:

minhazularefin21@gmail.com

21