Addressing Activities 6.5.4 Calculating network address from host IP and subnet mask. 6.5.5 Calculating the number of Hosts (note you only need to know the mask). Addressing the Network – Examples 6.5.6 Calculating host IP range, broadcast address from network address and mask. Network Fundamentals – Chapter 6 6.5.7, 6.5.8 Packet Tracer 6.5.3.2 to 6.5.3.5 VLSM example ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. 1 Cisco Public Network Classes Class First octet ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. 2 2 Cisco Public 6.5.3.1 Classful Subnetting Network and Default subnet Host bits mask Hosts per network N.H.H.H /8 16,777,214 A 1 to 126 255.0.0.0 B 128 to 191 N.N.H.H /16 255.255.0.0 C 192 to 223 N.N.N.H /24 255.255.255.0 65,534 Classful network address: 192.168.20.0 /24 (Class C addr) Require 7 subnets, i.e. borrow 3 bits, Subnetmask: 24 + 3 bits = /27 2^3 = 8 subnets which is 255.255.255.224 254 This leaves 30 – 27 = 5 bits for host bits, 2^5 – 2 = 30 hosts 3 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. 4 3 Cisco Public Classful Subnetting ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 4 Classful Subnetting A class A, B or C network is used with a custom mask The same mask is used on all interfaces making the subnets all the same size What subnet mask should be used? How many hosts can each subnet connect? This is inefficient use of addresses The WAN links only require 2 addresses, so 28 are 6 not used, limiting future growth 5 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public The number of bits borrowed is determined by 1. Number of subnets required 2. Max number of hosts on a subnet 5 ITE PC v4.0 Chapter 1 Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 6 1 Variable Length Subnet Masking (VLSM) Subnetting a Subnet Using more than one subnet mask on a network is called Variable Length Subnet Masking Use one of the subnets for the WAN links say 192.168.20.192 /27 Require 2 host IPs per subnet VLSM is a more efficient way of assigning addresses than classful subnetting 2^2 – 2 = 2, so use /30 mask With VLSM the subnets do not have to be all the same size, so fewer addresses are wasted Borrow 3 bits gives 2^3 = 8 subnets In particular, a WAN link only requires a subnet with 2 addresses, so use /30 subnets for these Subnets 4, 5 and 7 are now available for growth, plus 5 subnets for additional WAN links 192.168.20.192/30 7 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. 8 7 Cisco Public Subnetting a Subnet ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. 8 Cisco Public Variable Length Subnet Masking (VLSM) VLSM is a more efficient way of assigning addresses than classful subnetting, but it can only be used with modern routing protocols Determine how many addresses required for each subnet, number of hosts + router interface Work out largest subnet first, WAN links last How many bits must be borrowed for the subnet? Number of hosts = 2 ^ (no. of bits) - 2 This determines the size of the subnet 9 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. 10 9 Cisco Public 6.5.3.2 Scenario ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. 10 Cisco Public 6.5.3.2 Scenario This scenario has the following requirements: AtlantaHQ 58 host addresses PerthHQ 26 host addresses SydneyHQ 10 host addresses CorpusHQ 10 host addresses WAN links 2 host addresses (each) Design an addressing scheme using the network address 192.168.15.0 /24 Classful subnetting will not work. Why not? 11 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 11 12 Use VLSM instead. ITE PC v4.0 Chapter 1 Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 12 2 6.5.3.2: Given address 192.168.15.0 /24 Num of Host Subnet Broadcast Prefix A IP’s 58 bits 6 address 192.168.15.0 address 192.168.15.63 /26 B 26 5 192.168.15.64 192.168.15.95 /27 C 10 4 192.168.15.96 192.168.15.111 /28 D 10 4 192.168.15.112 192.168.15.127 /28 W1 2 2 192.168.15.128 192.168.15.131 /30 W2 2 2 192.168.15.132 192.168.15.135 /30 W3 2 2 192.168.15.136 192.168.15.139 /30 13 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 13 Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr 3