Вы находитесь на странице: 1из 26

subnetting

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

IP Address Classes
IP addresses are divided into classes to define the large, medium, and small networks. Class A addresses are assigned to larger networks. Class B addresses are used for medium-sized networks, Class C for small networks, Class D for Multicasting Class E for Experimental purposes

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Identifying Address Classes

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

IP address types
IP address could be one of three categories Network address Host address Broadcast address

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Network / Broadcast Addresses


- Network address : the first IP address in it which all host part bits = 0 - Broadcast address: the last IP address in the network which all host part bits = 1
no. of host bits

- other addresses are host addresses = 2 -Here are some examples: Class A B C
ITE PC v4.0 Chapter 1

-2

Network Address 12.0.0.0 172.16.0.0 192.168.1.0

Broadcast Address 12.255.255.255 172.16.255.255 192.168.1.255


2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnet Mask

- 32 bit mask ( 1s followed by 0s ) - Used by routers and hosts to determine the number of network- significant bits ( identified by 1s ) and host- significant bits in an IP address (identified by 0s) - example :
Class A B C
ITE PC v4.0 Chapter 1

Network Address 12.0.0.0 172.16.0.0 192.168.0.0

Default subnet mask 255.0.0.0 or 255.255.0.0 or 255.255.255.0 or


2007 Cisco Systems, Inc. All rights reserved. Cisco Public

/8 /16 /24
6

Octet Values of a Subnet Mask

Subnet masks like IP addresses can be represented in the dotted decimal format like 255.255.255.0.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Subnetting
- Subnetting a network means to use the subnet mask to divide the network and break a large network up into smaller, more efficient and manageable segments, or subnets. - Subnetting is done by taking part of host bits then add it to the network part

IP address

Network part

Host part

Subnet bits

Network part
ITE PC v4.0 Chapter 1

Host part
Cisco Public

2007 Cisco Systems, Inc. All rights reserved.

Subnetting Example
Divide network 192.168.1.0/24 into 4 subnets
Solution: 4 subnets need 2 bits
192.168.1 . 0 192.168.1 . 0000 0000 to 0011 1111 192.168.1 . 0100 0000 to 0111 1111 192.168.1 . 1000 0000 to 1011 1111 192.168.1 . 1100 0000 to 1111 1111

0 - 63
64 - 127

128 - 191
192 - 255

subnet mask is 255.255.255.192 or /26


The first subnet is 192.168.1.0/26

The second subnet is


The third subnet is

192.168.1.64/26
192.168.1.128/26

The fourth subnet is

192.168.1.192/26

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Subnetting Example
Divide network 192.168.1.0/24 into 4 subnets
-

Solution :
4 subnets need 2 bits

- subnet mask = 255.255.255.192


- interesting octet is 192 - hop count = 256 192 = 64

- The first subnet is - The third subnet is


- The fourth subnet is
ITE PC v4.0 Chapter 1

192.168.1.0/26

0 - 63 64 - 127 128 - 191

- The second subnet is 192.168.1.64/26


192.168.1.128/26
192.168.1.192/26

192 - 255
Cisco Public

2007 Cisco Systems, Inc. All rights reserved.

10

Subnetting Example
Divide network 172.16.0.0/16 into 8subnets
Solution :
- 8 subnets need 3 bits

- subnet mask = 255.255.224.0


- interesting octet is 224 - hop count = 256 224 = 32

- The first subnet is


- The third subnet is

172.16.0.0/19

172.16.0.1-172.16.31.254
172.16.32.1 -172.16.63.254 172.16.64.1-172.16. 95.254

- The second subnet is 172.16.32.0/19


172.16.64.0/19

-The 8th subnet is

172.16.224.0/19

172.16.224.1-172.16.255.254

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

11

Subnetting Example
Divide network 10.0.0.0/10 into 4subnets
Solution :
- 4subnets need 2 bits - subnet mask = 255.240.0. 0

- interesting octet is 240 - hop count = 256 240= 16


- The first subnet is
10.0.0.0/12
10.0.0.1-10.15.255.254

- The second subnet is 10.16.0.0/12

10.16.0.1-10.31.255.254 10.32.0.1-10.47.255.254 10.48.0.1-10.63.255.254

- The third subnet is


- The fourth subnet is
ITE PC v4.0 Chapter 1

10.32.0.0/12
10.48.0.0/12

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

12

How Many Networks

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

13

Given the Class C network of 204.15.5.0/24, subnet the network in order to create the network in the figure below, with the host requirements shown

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

14

Calculating Addresses without VLSM


Looking at the network shown, you can see that you are required to create five subnets. The largest subnet must support 28 host addresses. You can start by looking at the subnet requirement.

In order to create the 5 needed subnets you would need to use 3 bits from the Class C host bits.
Two bits would only allow you four subnets (22).

How many hosts will this support? 25 = 32 (30 usable).


This meets the requirement
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

15

Calculating Addresses without VLSM


Subnet Mask = 255. 255. 255. 224 /27

Interesting Octet is 224


Hope Count = 256-224 = 32 Subnet A: 204.15.5.0/27 Subnet B: 204.15.5.32/27 host address range 1 to 30 host address range 33 to 62

Subnet C: 204.15.5.64/27 Subnet D: 204.15.5.96/27


Subnet E: 204.15.5.128/27

host address range 65 to 94 host address range 97 to 126


host address range 129 to 158

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

16

Waste of IP Addresses ?

Subnet A: 204.15.5.0/27 Only 14 Addresses Used


Subnet B: 204.15.5.32/27 Only 28 Addresses Used. Subnet C: 204.15.5.64/27

host address range 1 to 30

host address range 33 to 62

host address range 65 to 94

Only 2 Addresses Used Subnet D: 204.15.5.96/27


Only 7 Addresses Used Subnet E: 204.15.5.128/27 Only 28 Addresses Used
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

host address range 97 to 126

host address range 129 to 158

17

In many cases, having the same subnet mask for all subnets ends up wasting address space. Solution ? Using Variable Length Subnet Masks (VLSM)

VLSM allows you to use different masks for each subnet, thereby using address space efficiently
How ? The easiest way to assign the subnets is to assign the largest first and work your way down. In our case: Proceed in the following order: Network B, E, A, D, C
ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

18

Calculating Addresses with VLSM


Subnet B: requires a /27 (255.255.255.224) mask to support 28 hosts We have calculated that before: Subnet B: 204.15.5.0/27 host address range 1 to 30

Subnet E: requires a /27 (255.255.255.224) mask to support 28 hosts


We have also calculated that before: Subnet E: 204.15.5.32/27 host address range 33 to 62

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

19

Calculating Addresses with VLSM


Subnet A: Needs 14 Hosts
Take one of the subnets from the last subnetting procedure (other than the ones given to B and E.

Example: 204.15.5.64/27 (Apply Subnetting on this one) To support 14 hosts (at least 4 bits are needed for the hosts)
Subnet Mask = 255. 255.255.240 Interesting Octet = 240 Number of Subnets = 2 ^ 1 = 2 /28 Hop Count = 256 240 = 16

204.15.5.64/28 -> Host address range 65 to 78 that to Subnet A)


204.15.5.80/28
ITE PC v4.0 Chapter 1

(Assign

-> Host Address Range 81 to 95


2007 Cisco Systems, Inc. All rights reserved. Cisco Public

20

Calculating Addresses with VLSM


Subnet D: Needs 7 Hosts
Take one of the subnets from the last subnetting procedure (other than the ones given to A and D

Example: 204.15.5.80/28 (Apply Subnetting on this one) To support 7 hosts (at least 4 bits are needed for the hosts, 3 bits has only 6 valid hosts) Hence no need for any more subnetting 204.15.5.80/28 -> Host Address Range 81 to 94

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

21

Calculating Addresses with VLSM


Subnet C: Needs 2 Hosts
Take one of the subnets from the last procedure (other than the ones given to A

Example: 204.15.5.96/28 (Apply Subnetting on this one) To support 2 hosts (at least 2 bits are needed for the hosts)
Subnet Mask = 255. 255.255.252 Interesting Octet = 252 Number of Subnets = 2 ^ 2 = 4 /30 Hop Count = 256 252 = 4

204.15.5.96/30 -> Host address range 97 to 98 that to Subnet C)


204.15.5.100/30
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved.

(Assign

-> Host Address Range 101 to 102


Cisco Public

22

Calculating Addresses with VLSM


Finally:
Subnet B: 204.15.5.0/27 host address range 1 to 30 Subnet E: 204.15.5.32/27 host address range 33 to 62 Subnet A 204.15.5.64/28 host address range 65 to 78

Subnet D 204.15.5.80/28 host address range 81 to 94 Subnet C 204.15.5.96/30 host address range 97 to 98

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

23

Calculating Addresses: Case 2

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

24

Calculating Addresses: Case 2

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

25

Calculating Addresses: Case 2


Calculate the address ranges for sub networks

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

26

Вам также может понравиться