CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks

Slides:



Advertisements
Similar presentations
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 8: Subnetting IP Networks Network Fundamentals.
Advertisements

Chapter 9: Subnetting IP Networks
思科网络技术学院理事会. 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
IP Addressing and Subnetting
Prepared By: Eng.Ola M. Abd El-Latif
Chapter 21 IP Addressing “If we all did the things we are capable of doing, we would literally astound ourselves” - Thomas Alva Edison,
Introduction to Networking (Yarnfield) Variable Length Subnet Masking (VLSM)
IP Addressing & Subnetting Made Easy. Part 1: Working with IP Addresses.
Introduction to Networking
Types of Addresses in IPv4 Network Range
1 26-Aug-15 Addressing the network using IPv4 Lecture # 2 Engr. Orland G. Basas Prepared by: Engr. Orland G. Basas IT Lecturer.
Chapter 12 Subnetting CIS 1140.
4: Addressing Working At A Small-to-Medium Business or ISP.
Chap 10 Routing and Addressing Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 4: Addressing in an Enterprise Network Introducing Routing and Switching in the.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Addressing in an Enterprise Network Introducing Routing and Switching in the.
IP Addressing & Subnetting
The Saigon CTT Semester 1 CHAPTER 10 Le Chi Trung.
Chapter 6 VLSM and CIDR.
CCNA2-1 Chapter 6 Variable Length Subnet Masking (VLSM) Classless Inter-Domain Routing (CIDR)
Chapter 6 VLSM and CIDR CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College Last Updated: 3/30/2008.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 VLSM and CIDR Routing Protocols and Concepts – Chapter 6 05/07/2009.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Addressing in an Enterprise Network Introducing Routing and Switching in the.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 4: Addressing in an Enterprise Network Introducing Routing and Switching in the.
Addressing the Network - IPV4 Part II
CCNA1-1 Chapter 6-3 Chapter 6 Addressing the Network - IPV4 Part III.
Addressing IP v4 W.Lilakiatsakun. Anatomy of IPv4 (1) Dotted Decimal Address Network Address Host Address.
Layer 3: Internet Protocol.  Content IP Address within the IP Header. IP Address Classes. Subnetting and Creating a Subnet. Network Layer and Path Determination.
© Cengage Learning 2014 How IP Addresses Get Assigned A MAC address is embedded on a network adapter at a factory IP addresses are assigned manually or.
Routing and Addressing
1 Network Principles FdSc Computing Technologies TCP-IP – Addressing & Sub-Netting Carl Smith – 2004 (Revised 2013)
Network layer (Part III)
IP Addressing.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Subnetting IP Networks.
Lecture#7: Subnetting IP Networks
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the network IPv4 CCNA Exploration Semester 1 – Chapter 6.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 9: Subnetting IP Networks Introduction to Networks.
1 Layer 3: Routing & Addressing Honolulu Community College Cisco Academy Training Center Semester 1 Version
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 15 PPT for IPV4 and IPV6 Working with IP Addresses.
Planning the Addressing Structure
IP Addressing, Sub-netting & VLSM
Internet Architecture
IP – Subnetting and CIDR
IP Addressing and Subnetting
Binary Concepts By: Nathan Miller.
Instructor Materials Chapter 8: Subnetting IP Networks
Instructor Materials Chapter 4: Network Addressing
Networking for Home and Small Businesses – Chapter 5
Instructor Materials Chapter 8: Subnetting IP Networks
Lecture#7: Subnetting IP Networks
Introduction to Networking (Yarnfield)
Chapter 8: Subnetting IP Networks
Addressing the Network - IPV4 Part III
Subnetting Basics benefits Reduced network traffic
Chapter 5 Working with IP Addresses
Chapter 9: Subnetting IP Networks
Chapter 8: Subnetting IP Networks
Addressing the Network - IPV4 Part III
Chapter 9: Subnetting IP Networks
Routing Protocols and Concepts – Chapter 6 Modified by Tony Chen
CIS 82 Routing Protocols and Concepts Chapter 11 NAT
Subnetting Surasak Sanguanpong
Planning the Addressing Structure
Planning the Addressing Structure
Planning the Addressing Structure
IP Addressing & Subnetting
Networking for Home and Small Businesses – Chapter 5
IP Addressing & Subnetting
Presentation transcript:

CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College graziani@cabrillo.edu Fall 2013

Network Segmentation

Analogy 10 baskets x 10 apples = 100 apples 10 10 10 100 Apples 10 10                                                                                                                                                                                                 100 Apples 10 10 10 10 10 10 10 It is the same as taking a barrel of 100 apples and dividing it into 10 barrels of 10 apples each.

10 barrels x 8 apples = 80 apples                                                                                                                                                                                                 (less 2) (less 2) (less 2) 98 Apples (100 – 2) 8 8 8 (less 2) (less 2) (less 2) 8 8 8 (less 2) (less 2) (less 2) However, in subnetting we will see that we lose two apples per subnet: one for the network address one for the broadcast address 8 (less 2)

/? IPv4 Unicast Address IPv6 Global Unicast Address Network portion Subnet portion Host portion 32 bits IPv6 Global Unicast Address /48 /64 16-bit Subnet ID Global Routing Prefix Interface ID /48 global routing prefix could be more or less depending on what you service provider gives you – we will talk about this in a moment Most orgs that go to ARIN are more likely to get a /40 w/ the ARIN assignment policy based on the number of sites. So you actually end w/ a more variable length “subnet” range that you can use. The /48 boundary was initially recommended by the first IPv6 standards but it is changing. 128 bits In the beginning, like the world, networks were flat. Organization would acquire a new network address (Class A, B, C) if it wanted another network. 1985 – IETF provides process for subnetting. Subnetting IPv4 was an afterthought

Reasons for Subnetting Note: The term “subnet” and “network” are interchangeable. Most networks are a subnet of some larger address block. Reasons for Subnetting Segmenting networks in subnets creates smaller groups of devices and services in order to: Control traffic by containing broadcast traffic within subnetwork  Reduces overall network traffic and improves network performance Specifically, subnets: Creates smaller broadcast domains. Limit the amount of traffic on the other network segments. Provide low-level security. Can be created to match the physical layout or administrative structure of the organization. Can be reserved for future growth.

How your provider (ISP) sees you…. 150.50.0.0 /16 Subnetting does not change how the outside world sees the network but provides additional structure within the organization.

How your provider (ISP) sees you…. 150.50.0.0 /16 150.50.1.0 /24 150.50.2.0 /24 150.50.3.0 /24 150.50.4.0 /24 150.50.5.0 /24 150.50.0.0 /16 150.50.0.0 /16 Subnetting does not change how the outside world sees the network but provides additional structure within the organization.

How do I divide the barrel? 10 baskets of 10 apples/basket?                                                                 100 Apples 5 baskets of 20 apples/basket? 5 baskets of 20 apples/basket and divide one of the 20 apple baskets into 2 10 apple baskets?

Designing a Network Addressing Scheme Planning network subnets requires examining the needs of an organization’s network usage. Start by doing a network requirement study. Examine the main sections of the network and how they will be segmented. Consider the address plan based on: The number of hosts per subnet How host addresses will be assigned Which hosts will require static IP addresses Which hosts can use DHCP for obtaining their addressing information. Also, depends on whether you are an enterprise network or a service provider (ISP).

Public and Private Addresses The number of my public addresses are limited, so I need to conserve. I have plenty of private addresses, so I can be mostly about network management.

Private Addresses and NAT has kept IPv4 going

Communication Between Subnets A router is required to subnet a network.  Each router interface is on a different subnet. Devices on a subnet use the router interface as the default gateway. Each router interface is in a different subnet and in its own broadcast domain.

Designing a Network Addressing Scheme LAN subnets are typically assigned from the private address ranges. 10.0.0.0 with a subnet mask of 255.0.0.0 172.16.0.0 with a subnet mask of 255.240.0.0 192.168.0.0 with a subnet mask of 255.255.0.0 Create standards for IP address assignments within each subnet range such as: Routers are assigned the first available host addresses in the range Printers and servers will be assigned static IP addresses User will receive IP addresses from DHCP servers using /24 subnets Group hosts that are accessible from the Internet into their own subnet.

Designing a Network Addressing Scheme Two factors influencing subnet addresses are: The number of subnets required The maximum number of hosts needed per subnet

Calculating Subnets

Subnetting 150.50.0.0 /16 150.50.1.0 /24 150.50.2.0 /24 150.50.3.0 /24 150.50.4.0 /24 150.50.5.0 /24 150.50.3.50 150.50.0.0 /16 150.50.0.0 /16

Subnet Example Network Subnet Host Subnets Addresses 150 50 150 50 1 Network address 150.50.0.0 with /16 Base Network Mask Using Subnets: Subnet Mask 255.255.255.0 or /24 Subnet addresses: All 0’s in host portion Network Subnet Host Subnets Addresses 150 50 150 50 1 150 50 2 256 Subnets 28 150 50 3 150 50 Etc. 150 50 254 150 50 255

Subnet Example Network Subnet Hosts 150 50 1 254 255 150 50 1 254 255 Network address 150.50.0.0 with /16 Base Network Mask Using Subnets: Subnet Mask 255.255.255.0 or /24 Network Subnet Hosts Broadcast 150 50 1 254 255 150 50 1 254 255 150 50 2 1 254 255 150 50 3 1 254 255 150 50 Etc. 1 254 255 150 50 254 1 254 255 150 50 255 1 254 255 Each subnet has 254 hosts, 28 – 2

Host IP Address: 150.50.3.50/16 A host of the 150.50.3.0 /16 network With NO subnetting: Network First Host Last Host Broadcast 150.50.0.0 150.50.0.1 150.50.255.254 150.50.255.255 65,534 host addresses, one for network address and one for broadcast address. Host IP Address: 150.50.3.50 A host of the 150.50.0.0 /16 network

Host IP Address: 150.50.3.50/24 A host of the 150.50.3.0 /24 network With subnetting: Network First Host Last Host Broadcast 150.50.0.0 150.50.0.1 150.50.0.254 150.50.0.255 150.50.1.0 150.50.1.1 150.50.1.254 150.50.1.255 150.50.2.0 150.50.2.1 150.50.2.254 150.50.2.255 150.50.3.0 150.50.3.1 150.50.3.254 150.50.3.255 150.50.4.0 150.50.4.1 150.50.4.254 150.50.4.255 150.50.5.0 150.50.5.1 150.50.5.254 150.50.5.255 150.50.6.0 150.50.6.1 150.50.6.254 150.50.6.255 150.50.7.0 150.50.7.1 150.50.7.254 150.50.7.255 … 150.50.254.0 150.50.254.1 150.50.254.254 150.50.254.255 150.50.255.0 150.50.255.1 150.50.255.254 150.50.255.255

With subnetting: Total address = 256 subnets * (256 hosts – 2) Network First Host Last Host Broadcast Hosts 150.50.0.0 150.50.0.1 150.50.0.254 150.50.0.255 254 150.50.1.0 150.50.1.1 150.50.1.254 150.50.1.255 254 150.50.2.0 150.50.2.1 150.50.2.254 150.50.2.255 254 150.50.3.0 150.50.3.1 150.50.3.254 150.50.3.255 254 150.50.4.0 150.50.4.1 150.50.4.254 150.50.4.255 254 150.50.5.0 150.50.5.1 150.50.5.254 150.50.5.255 254 150.50.6.0 150.50.6.1 150.50.6.254 150.50.6.255 254 150.50.7.0 150.50.7.1 150.50.7.254 150.50.7.255 254 … 150.50.254.0 150.50.254.1 150.50.254.254 150.50.15.255 254 150.50.255.0 150.50.255.1 150.50.255.254 150.50.255.255 254 --- 65,024 Total address = 256 subnets * (256 hosts – 2) = 256 * 254 = 65,024 NOTE: It is common for some network administrator to not use the last subnet.

Rick’s calculating the number subnets/hosts needed

Calculating the number subnets/hosts needed 192.168.1.0 255.255.255.0 Network Host Network 192.168.1.0/24 Need: As many subnets as possible, 60 hosts per subnet

Calculating the number subnets/hosts needed Number of hosts per subnet 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 0 0 0 0 0 0 0 0 6 host bits Network Host Network 192.168.1.0/24 Need: As many subnets as possible, 60 hosts per subnet

Calculating the number subnets/hosts needed Number of subnets 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 1 0 0 0 0 0 0 255.255.255.192 6 host bits Network Host Network 192.168.1.0/24 Need: As many subnets as possible, 60 hosts per subnet New Subnet Mask: 255.255.255.192 (/26) Number of Hosts per subnet: 6 bits, 64-2 hosts, 62 hosts Number of Subnets: 2 bits or 4 subnets

Calculating the number subnets/hosts needed Number of subnets 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 1 0 0 0 0 0 0 255.255.255.192 192.168.1. 0 0 0 0 0 0 0 0 192.168.1.0/26 192.168.1. 0 1 0 0 0 0 0 0 192.168.1.64/26 192.168.1. 1 0 0 0 0 0 0 0 192.168.1.128/26 192.168.1. 1 1 0 0 0 0 0 0 192.168.1.192/26 Number of Hosts per subnet: 6 bits, 64-2 hosts, 64 TOTAL hosts, 62 usable hosts Number of Subnets: 2 bits or 4 subnets

Calculating the number subnets/hosts needed 192.168.1.0 255.255.255.0 Network Host Network 192.168.1.0/24 Need: As many subnets as possible, 12 hosts per subnet

Calculating the number subnets/hosts needed Number of hosts per subnet 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 0 0 0 0 0 0 0 0 4 host bits Network Host Network 192.168.1.0/24 Need: As many subnets as possible, 12 hosts per subnet

Calculating the number subnets/hosts needed Number of hosts per subnet Number of subnets 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 1 1 1 0 0 0 0 255.255.255.240 4 host bits Network Host Network 192.168.1.0/24 Need: As many subnets as possible, 12 hosts per subnet New Subnet Mask: 255.255.255.240 (/28) Number of Hosts per subnet: 4 bits, 16-2 hosts, 14 hosts Number of Subnets: 4 bits or 16 subnets

Number of Subnets: 4 bits or 16 subnets 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 1 1 1 0 0 0 0 255.255.255.240 192.168.1. 0 0 0 0 0 0 0 0 192.168.1.0/28 192.168.1. 0 0 0 1 0 0 0 0 192.168.1.16/28 192.168.1. 0 0 1 0 0 0 0 0 192.168.1.32/28 192.168.1. 0 0 1 1 0 0 0 0 192.168.1.48/28 192.168.1. 0 1 0 0 0 0 0 0 192.168.1.64/28 192.168.1. 0 1 0 1 0 0 0 0 192.168.1.80/28 192.168.1. 0 1 1 0 0 0 0 0 192.168.1.96/28 192.168.1. 0 1 1 1 0 0 0 0 192.168.1.112/28 192.168.1. 1 0 0 0 0 0 0 0 192.168.1.128/28 192.168.1. 1 0 0 1 0 0 0 0 192.168.1.144/28 192.168.1. 1 0 1 0 0 0 0 0 192.168.1.160/28 192.168.1. 1 0 1 1 0 0 0 0 192.168.1.176/28 192.168.1. 1 1 0 0 0 0 0 0 192.168.1.192/28 192.168.1. 1 1 0 1 0 0 0 0 192.168.1.208/28 192.168.1. 1 1 1 0 0 0 0 0 192.168.1.224/28 192.168.1. 1 1 1 1 0 0 0 0 192.168.1.240/28 New Subnet Mask: 255.255.255.240 (/28) Number of Hosts per subnet: 4 bits, 16-2 hosts, 16 TOTAL hosts, 14 usable hosts Number of Subnets: 4 bits or 16 subnets

Calculating the number subnets/hosts needed 192.168.1.0 255.255.255.0 Network Host Network 192.168.1.0/24 Need: Need 6 subnets, as many hosts per subnet as possible

Calculating the number subnets/hosts needed Number of subnets 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 0 0 0 0 0 0 0 0 3 subnet bits Network Host Network 192.168.1.0/24 Need: Need 6 subnets, as many hosts per subnet as possible

Calculating the number subnets/hosts needed Number of hosts per subnet Number of subnets 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 1 1 0 0 0 0 0 255.255.255.224 3 subnet bits Network Host Network 192.168.1.0/24 Need: Need 6 subnets, as many hosts per subnet as possible New Subnet Mask: 255.255.255.224 (/27) Number of Hosts per subnet: 5 bits, 32-2 hosts, 30 hosts Number of Subnets: 3 bits or 8 subnets

Number of Subnets: 3 bits or 8 subnets 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 1 1 0 0 0 0 0 255.255.255.224 192.168.1. 0 0 0 0 0 0 0 0 192.168.1.0/27 192.168.1. 0 0 1 0 0 0 0 0 192.168.1.32/27 192.168.1. 0 1 0 0 0 0 0 0 192.168.1.64/27 192.168.1. 0 1 1 0 0 0 0 0 192.168.1.96/27 192.168.1. 1 0 0 0 0 0 0 0 192.168.1.128/27 192.168.1. 1 0 1 0 0 0 0 0 192.168.1.160/27 192.168.1. 1 1 0 0 0 0 0 0 192.168.1.192/27 192.168.1. 1 1 1 0 0 0 0 0 192.168.1.224/27 New Subnet Mask: 255.255.255.224 (/27) Number of Hosts per subnet: 5 bits, 32-2 hosts, 32 TOTAL hosts, 30 usable hosts Number of Subnets: 3 bits or 8 subnets

Configuring Subnets in an IPv4 Network For example, to configure R1: G0/0: 192.168.1.0 /27 G0/1: 192.168.1.32 /27 S0/0/0: 192.168.1.64 /27 To configure R2: G0/0: 192.168.1.96 /27 G0/1: 192.168.1.128 /27

Configuring Subnets in an IPv4 Network It is common practice to give the router (default gateway) the first host IP address on the network (subnet). R1(config)# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.224 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address 192.168.1.33 255.255.255.224 R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 192.168.1.65 255.255.255.224

Configuring Subnets in an IPv4 Network It is common practice to give the router (default gateway) the first host IP address on the network (subnet). R2(config)# R2(config)# interface Serial 0/0/0 R2(config-if)# ip address 192.168.1.66 255.255.255.224 R2(config-if)# no shutdown R2(config-if)# exit R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address 192.168.1.97 255.255.255.224 R2(config)# interface gigabitethernet 0/1 R2(config-if)# ip address 192.168.1.129 255.255.255.224

Configuring Subnets in an IPv4 Network R1(config)# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.224 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address 192.168.1.33 255.255.255.224 R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 192.168.1.65 255.255.255.224 It is common practice to give the router (default gateway) the first host IP address on the network (subnet). R2(config)# R2(config)# interface Serial 0/0/0 R2(config-if)# ip address 192.168.1.66 255.255.255.224 R2(config-if)# no shutdown R2(config-if)# exit R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address 192.168.1.97 255.255.255.224 R2(config)# interface gigabitethernet 0/1 R2(config-if)# ip address 192.168.1.129 255.255.255.224

Borrow 1 Bit .1000 0000 SNM: Network Prefix: # of Subnets: /25 255.255.255.128 (2 subnets, 126 host) .0 (.1 - .126) BA: .127 .128 (.129 - .254) BA: .255 Borrow 1 Bit .1000 0000 (11111111.11111111.11111111.10000000) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: 255.255.255.128 /25 2 126 128

Borrow 2 Bits .1100 0000 SNM: Network Prefix: # of Subnets: /25 255.255.255.128 (2 subnets, 126 host) .0 (.1 - .126) BA: .127 .128 (.129 - .254) BA: .255 /26 255.255.255.192 (4 subnets, 62 host) .0 (.1 - .62) BA: .63 .64 (.65 - .126) BA: .127 .128 (.129 - .190) BA: .191 .192 (.193 - .254) BA: .255 Borrow 2 Bits .1100 0000 (11111111.11111111.11111111.11000000) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: 255.255.255.192 /26 4 62 64

Borrow 3 Bits .1110 0000 SNM: Network Prefix: # of Subnets: /25 255.255.255.128 (2 subnets, 126 host) .0 (.1 - .126) BA: .127 .128 (.129 - .254) BA: .255 /26 255.255.255.192 (4 subnets, 62 host) .0 (.1 - .62) BA: .63 .64 (.65 - .126) BA: .127 .128 (.129 - .190) BA: .191 .192 (.193 - .254) BA: .255 /27 255.255.255.224 (8 subnets, 30 host) .0 (.1 - .30) BA: .31 .32 (.33 - .62) BA: .63 .64 (.65 - .94) BA: .95 .96 (.97 - .126) BA: .127 .128 (.129 - .158) BA: .159 .160 (.161 - .190) BA: .191 .192 (.193 - .222) BA: .223 .224 (.225 - .254) BA: .255 Borrow 3 Bits .1110 0000 (11111111.11111111.11111111.11100000) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: 255.255.255.224 /27 8 30 32

Borrow 4 Bits .1111 0000 SNM: Network Prefix: # of Subnets: /25 255.255.255.128 (2 subnets, 126 host) .0 (.1 - .126) BA: .127 .128 (.129 - .254) BA: .255 /26 255.255.255.192 (4 subnets, 62 host) .0 (.1 - .62) BA: .63 .64 (.65 - .126) BA: .127 .128 (.129 - .190) BA: .191 .192 (.193 - .254) BA: .255 /27 255.255.255.224 (8 subnets, 30 host) .0 (.1 - .30) BA: .31 .32 (.33 - .62) BA: .63 .64 (.65 - .94) BA: .95 .96 (.97 - .126) BA: .127 .128 (.129 - .158) BA: .159 .160 (.161 - .190) BA: .191 .192 (.193 - .222) BA: .223 .224 (.225 - .254) BA: .255 /28 255.255.255.240 (16 subnets, 14 host) .0 (.1 - .14) BA: .15 .16 (.17 - .30) BA: .31 .32 (.33 - .46) BA: .47 .48 (.49 - .62) BA: .63 .64 (.65 - .78) BA: .79 .80 (.81 - .94) BA: .95 .96 (.97 - .110) BA: .111 .112 (.113 - .126) BA: .127 .128 (.129 - .142) BA: .143 .144 (.145 - .158) BA: .159 .160 (.161 - .174) BA: .175 .176 (.177 - .190) BA: .191 .192 (.193 - .206) BA: .207 .208 (.209 - .222) BA: .223 .224 (.225 - .238) BA: .239 .240 (.241 - .254) BA: .255 Borrow 4 Bits .1111 0000 (11111111.11111111.11111111.11110000) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: 255.255.255.240 /28 16 14 16

Borrow 5 Bits .1111 1000 SNM: Network Prefix: # of Subnets: /25 255.255.255.128 (2 subnets, 126 host) .0 (.1 - .126) BA: .127 .128 (.129 - .254) BA: .255 /26 255.255.255.192 (4 subnets, 62 host) .0 (.1 - .62) BA: .63 .64 (.65 - .126) BA: .127 .128 (.129 - .190) BA: .191 .192 (.193 - .254) BA: .255 /27 255.255.255.224 (8 subnets, 30 host) .0 (.1 - .30) BA: .31 .32 (.33 - .62) BA: .63 .64 (.65 - .94) BA: .95 .96 (.97 - .126) BA: .127 .128 (.129 - .158) BA: .159 .160 (.161 - .190) BA: .191 .192 (.193 - .222) BA: .223 .224 (.225 - .254) BA: .255 /28 255.255.255.240 (16 subnets, 14 host) .0 (.1 - .14) BA: .15 .16 (.17 - .30) BA: .31 .32 (.33 - .46) BA: .47 .48 (.49 - .62) BA: .63 .64 (.65 - .78) BA: .79 .80 (.81 - .94) BA: .95 .96 (.97 - .110) BA: .111 .112 (.113 - .126) BA: .127 .128 (.129 - .142) BA: .143 .144 (.145 - .158) BA: .159 .160 (.161 - .174) BA: .175 .176 (.177 - .190) BA: .191 .192 (.193 - .206) BA: .207 .208 (.209 - .222) BA: .223 .224 (.225 - .238) BA: .239 .240 (.241 - .254) BA: .255 /29 255.255.255.248 (32 subnets, 6 host) .0 (.1 - .6) BA: .7 .8 (.9 - .14) BA: .15 .16 (.17 - .22) BA: .23 .24 (.25 - .30) BA: .31 .32 (.33 - .38) BA: .39 .40 (.41 - .46) BA: .47 .48 (.49 - .54) BA: .55 .56 (.57 - .62) BA: .63 .64 (.65 - .70) BA: .71 .72 (.73 - .78) BA: .79 .80 (.81 - .86) BA: .87 .88 (.89 - .94) BA: .95 .96 (.97 - .102) BA: .103 .104 (.105 - .110) BA: .111 .112 (.113 - .118) BA: .119 .120 (.121 - .126) BA: .127 .128 (.131 - .136) BA: .137 .136 (.137 - .142) BA: .143 .144 (.145 - .150) BA: .151 .152 (.153 - .158) BA: .159 .160 (.161 - .166) BA: .167 .168 (.169 - .174) BA: .175 .176 (.177 - .182) BA: .183 .184 (.185 - .190) BA: .191 .192 (.193 - .198) BA: .199 .200 (.201 - .206) BA: .207 .208 (.209 - .214) BA: .215 .216 (.217 - .222) BA: .223 .224 (.225 - .230) BA: .231 .232 (.232 - .238) BA: .239 .240 (.241 - .246) BA: .247 .248 (.249 - .254) BA: .255 Borrow 5 Bits .1111 1000 (11111111.11111111.11111111.11111000) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: 255.255.255.248 /29 32 6 8

Borrow 6 Bits .1111 1100 SNM: Network Prefix: # of Subnets: (11111111.11111111.11111111.11111100) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: 255.255.255.252 /30 64 2 4

Subnet Calculators The IP address The subnet mask (SNM) The number of bits borrowed The network prefix. The number of subnets that can be created The maximum number of host per subnet Host address range. Network address The broadcast address

VLSM Subnetting Subnets

Same Size Subnets So far, every subnet was the same size and all accommodated the same number of hosts. If all the subnets have the same requirements for the number of hosts, these fixed size address blocks would be efficient. However, that’s rarely the case. For example, how many subnets are required? 7 subnets of varying size. Point-to-point link Point-to-point link Point-to-point link

Same Size Subnets = Wasted Addresses Acronym Alert Same Size Subnets = Wasted Addresses To meet the host requirement of the largest LAN we could borrow 3 bits (/27) to create 8 subnets of 30 hosts each. But it also wastes addresses on the point-to-point links and limits future growth by reducing the total number of subnets available. Solution: “Subnet a subnet” using Variable Length Subnet Mask (VLSM). Point-to-point link Point-to-point link Point-to-point link

Before VLSM In all previous subnetting examples, the same subnet mask was applied for all the subnets. For example, a 255.255.255.224 (/27) mask creates 8 of 30 hosts each:

With VLSM VLSM allows a network space to be divided in unequal parts. With VLSM the subnet mask will vary depending on how many bits have been borrowed for a particular subnet, thus the “variable” part of the VLSM.

With VLSM VLSM subnetting is similar to traditional subnetting. Bits are still borrowed to create subnets. The formulas to calculate the number of hosts per subnet and the number of subnets created still apply. The difference is that subnetting is not a single pass activity. With VLSM, the network is first subnetted, and then the subnets are subnetted again. This process can be repeated multiple times to create subnets of various sizes.

Variable-Length Subnet Masks (VLSM) In 1987, RFC 1009 specified how a subnetted network could use more than one subnet mask. VLSM = Subnetting a Subnet “If you know how to subnet, you can do VLSM!”

Variable-Length Subnet Masks (VLSM) VLSM enables a network number to be configured with different subnet masks on different interfaces. Subnet an already subnetted network address. Conserves IP addresses. More efficient use of available address space. Allows for more hierarchical levels within an addressing plan. Allows for better route summarization.

VLSM Example The four LANs in our previous example can be accommodated using a /27 subnet mask. This would create subnets with increments of 32, therefore: Building A: 192.168.20.0 /27 Building B: 192.168.20.32 /27 Building C: 192.168.20.64 /27 Building D: 192.168.20.96 /27 This leaves four /27 subnets. Building A 192.168.20.0/27 .224 - 255 .0 - .31 Building B 192.168.20.32/27 .32 - .63 .192 - 223 .160 - 191 .64 - 95 Building C 192.168.20.64/27 .128 - 159 .96 - .127 Building D 192.168.20.96/27

VLSM Example The WAN interfaces of the routers are assigned the IP addresses and mask for the /30 subnets (2 hosts). In this example, the last subnet is subnetted into /30 subnets to accommodate WAN interfaces: R1 to R2: 192.168.20.224 /30 R2 to R3: 192.168.20.228 /30 R3 to R4: 192.168.20.232 /30 This leaves 3 /27 and five /30 subnets. Building A 192.168.20.0/27 Building B 192.168.20.32/27 Building C 192.168.20.64/27 Building D 192.168.20.96/27

Additional Slides (same only different)

If 2 bits are borrowed = 255.255.255.192 192. 168. 1. 00 00 0000 192. 168. 1. 192. 168. 1. 01 00 0000 192. 168. 1. 64 192. 168. 1. 10 00 0000 192. 168. 1. 128 192. 168. 1. 11 00 0000 192. 168. 1. 192 If 2 bits are borrowed, 4 subnets can be created

If 2 bits are borrowed = 255.255.255.192 Therefore, each subnet has its own: Network address Broadcast address 1st host Last host address

Configuring Subnets in an IPv4 Network For example, to configure R1: G0/0: 192.168.1.0 /26 G0/1: 192.168.1.64 /26 S0/0/0: 192.168.1.128 /26 R1(config)# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.192 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address 192.168.1.65 255.255.255.192 R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 192.168.1.129 255.255.255.192

If 3 bits are borrowed = 255.255.255.224 192. 168. 1. 000 0 0000 192. 168. 1. 192. 168. 1. 001 0 0000 192. 168. 1. 32 192. 168. 1. 010 0 0000 192. 168. 1. 64 192. 168. 1. 011 0 0000 192. 168. 1. 96 192. 168. 1. 100 0 0000 192. 168. 1. 128 192. 168. 1. 101 0 0000 192. 168. 1. 160 192. 168. 1. 110 0 0000 192. 168. 1. 192 192. 168. 1. 111 0 0000 192. 168. 1. 224 If 3 bits are borrowed, 8 subnets can be created

If 3 bits are borrowed = 255.255.255.224 Therefore, each subnet has its own: Network address Broadcast address 1st host Last host address

If 3 bits are borrowed = 255.255.255.224 Therefore, each subnet has its own: Network address Broadcast address 1st host Last host address

Configuring Subnets in an IPv4 Network For example, to configure R1: G0/0: 192.168.1.0 /27 G0/1: 192.168.1.32 /27 S0/0/0: 192.168.1.64 /27 To configure R2: G0/0: 192.168.1.96 /27 G0/1: 192.168.1.128 /27

Configuring Subnets in an IPv4 Network It is common practice to give the router (default gateway) the first host IP address on the network (subnet). R1(config)# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.224 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address 192.168.1.33 255.255.255.224 R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 192.168.1.65 255.255.255.224

Configuring Subnets in an IPv4 Network It is common practice to give the router (default gateway) the first host IP address on the network (subnet). R2(config)# R2(config)# interface Serial 0/0/0 R2(config-if)# ip address 192.168.1.66 255.255.255.224 R2(config-if)# no shutdown R2(config-if)# exit R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address 192.168.1.97 255.255.255.224 R2(config)# interface gigabitethernet 0/1 R2(config-if)# ip address 192.168.1.129 255.255.255.224

Configuring Subnets in an IPv4 Network R1(config)# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.224 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address 192.168.1.33 255.255.255.224 R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 192.168.1.65 255.255.255.224 It is common practice to give the router (default gateway) the first host IP address on the network (subnet). R2(config)# R2(config)# interface Serial 0/0/0 R2(config-if)# ip address 192.168.1.66 255.255.255.224 R2(config-if)# no shutdown R2(config-if)# exit R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address 192.168.1.97 255.255.255.224 R2(config)# interface gigabitethernet 0/1 R2(config-if)# ip address 192.168.1.129 255.255.255.224

Calculating Subnets Examples

Answering Subnet Requirements Answering subnet related problems is always based on one of two things: The number of subnets do you need to create. The number of hosts each subnet can support.

How many subnets do you need to create ... For example: A company with a public address of 30.30.30.0 /24 It has three departments and for security reasons, each department must be segmented from the others. How many subnets do you need to create? 3 subnets are required. A /25 only provides two subnets. A /26 provides 4 subnets and each subnet can have up to 62 hosts each.

How many subnets do you need to create ... 30.30.30.0 /26 30.30.30.64 /26 30.30.30.0 /24 30.30.30.128 /26 30.30.30.192 /26 Since only 3 subnets are required, the fourth subnet (30.30.30.192) would be available for future expansion.

255.255.255.224 Subnetting Problem 1 Network I.D.: 192.168.55.0 You require 25 hosts in each subnet and the largest amount of subnets available. What is the subnet mask? 255.255.255.224

Problem #2 Which IPv4 subnetted addresses represent valid host addresses? (Choose three.) 192.168.4.127 /26 192.168.4.155 /26 192.168.4.193 /26 192.168.4.95 /27 192.168.4.159 /27 192.168.4.207 /27

Problem #3 Given the IP address and subnet mask of 192.168.4.64 255.255.255.224, which of the following would describe this address? This is a useable host address. This is a broadcast address. This is a network address. This is not a valid address

Problem #4 192.168.10.30 /27 Host address: 192.168.10.33 Subnet Mask: 255.255.255.224 Default Gateway: 192.168.10.30 Host A is connected to the LAN, but it cannot get access to any resources on the Internet. What could be the cause of the problem? The host subnet mask is incorrect. The default gateway is a network address. The default gateway is a broadcast address. The default gateway is on a different subnet from the host.

9.1.3.6 11000000 10101000 01101100 01011000 192 168 108 88

1

1

Practice Quiz: http://www.quia.com/quiz/168122.html http://networking.ringofsaturn.com/Tools/quizzes.cgi?Action=Take&Quizid=8

Fun with /24 Subnets 255.255.255.224 193.1.1.0 193.1.1.1 193.1.1.30 193.1.1.31 193.1.1.32 193.1.1.33 193.1.1.62 193.1.1.63 193.1.1.224 193.1.1.225 193.1.1.254 193.1.1.255

14 255.255.255.240 192.135.16.0 192.135.16.16 192.135.16.240 8 255.255.255.224 198.36.15.0 198.36.15.32 198.36.15.224

Calculating Advanced Subnets

Planning Subnets There are two considerations when planning subnets: The number of host addresses required for each network The number of individual subnets needed. Notice that there is an inverse relationship between the number of subnets and the number of hosts. The more bits borrowed to create subnets the fewer host bits are available; therefore, fewer hosts per subnet. If more host addresses are needed, more host bits are required, resulting in fewer subnets.

Number of Host Addresses per Subnet How many hosts can a /24 network support? 254 hosts! What if you had to create a subnet to support 300 hosts? Use a /23 mask!

Number of Host Addresses per Subnet With a /24 mask, we can borrow 6 host bits. 11111111.11111111.11111111.11111100 With a /16 mask, we can borrow 14 host bits. /16 subnets can create as: Few as 2 subnets, capable of supporting 16,382 hosts Many as 16,382 subnets capable of supporting 2 hosts.

Calculating Host Addresses in 4th Octet 11111111.11111111.11111111.111111 00 2^2 – 2 = 2 hosts 2^3 – 2 = 6 hosts 2^4 – 2 = 14 hosts 2^5 – 2 = 30 hosts 2^6 – 2 = 62 hosts 2^7 – 2 = 126 hosts 2^8 – 2 = 254 hosts

Calculating Host Addresses in 3rd Octet 11111111.11111111.11111111.111111 00 2^9 – 2 = 510 hosts 2^10 – 2 = 1,022 hosts 2^11 – 2 = 2,046 hosts 2^12 – 2 = 4,094 hosts 2^13 – 2 = 8,190 hosts 2^14 – 2 = 16,382 hosts 2^15 – 2 = 32,766 hosts 2^16 – 2 = 65,234 hosts

Number of Subnets Required Sometimes a certain number of subnets is required, with less emphasis on the number of host addresses per subnet. May be required in large networks with many departments. Note: The key is to balance the number of subnets needed and the number of hosts required for the largest subnet. The more bits borrowed to create additional subnets means fewer hosts available per subnet.

Calculating Subnets for Large Networks /16 172 .16 .0000 0000 # of Subnets: # of add/subnet: 65,234 255 .255 .0 /17 172 .16 .1000 0000 .0000 0000 # of Subnets: # of add/subnet: 2 32,766 255 .255 .128 .0 /18 172 .16 .1100 0000 .0000 0000 # of Subnets: # of add/subnet: 4 16,382 255 .255 .192 .0 /19 172 .16 .1110 0000 .0000 0000 # of Subnets: # of add/subnet: 8 8,190 255 .255 .224 .0 /20 172 .16 .1111 0000 .0000 0000 # of Subnets: # of add/subnet: 16 4,094 255 .255 .240 .0

Calculating Subnets for Large Networks /21 172 .16 .1111 1000 .0000 0000 # of Subnets: # of add/subnet: 32 2,046 255 .255 .248 .0 /22 172 .16 .1111 1100 .0000 0000 # of Subnets: # of add/subnet: 64 1,022 255 .255 .252 .0 /23 172 .16 .1111 1110 .0000 0000 # of Subnets: # of add/subnet: 128 510 255 .255 .254 .0 /24 172 .16 .1111 1111 .0000 0000 # of Subnets: # of add/subnet: 256 254 255 .255 .0 /25 172 .16 .1111 1111 .1000 0000 # of Subnets: # of add/subnet: 512 126 255 .255 .128

Calculating Subnets for Large Networks /26 172 .16 .1111 1111 .1100 0000 # of Subnets: # of add/subnet: 1024 62 255 .255 .192 /27 172 .16 .1111 1111 .1110 0000 # of Subnets: # of add/subnet: 2,048 30 255 .255 .224 /28 172 .16 .1111 1111 .1111 0000 # of Subnets: # of add/subnet: 4,096 14 255 .255 .240 /29 172 .16 .1111 1111 .1111 1000 # of Subnets: # of add/subnet: 8,192 6 255 .255 .248 /30 172 .16 .1111 1111 .1111 1100 # of Subnets: # of add/subnet: 16,384 2 255 .255 .252

What is the Network address of 172.16.132.70/20? Therefore, host 172.16.132.70 is on network 172.16.128.0

/16 Subnet Table # of Bits Borrowed Subnet Mask # of usable Subnets # of available Hosts 255.255.192.0 4 16,382 255.255.224.0 8 8,190 255.255.240.0 16 4,094 255.255.248.0 32 2,046 255.255.252.0 64 1,022 255.255.254.0 128 510 255.255.255.0 256 254 .11000000.00000000 .11100000.00000000 .11110000.00000000 .11111000.00000000 .11111100.00000000 .11111110.00000000 .11111111.00000000 .11111111.10000000 .11111111.11000000 .11111111.11100000 .11111111.11110000 .11111111.11111000 .11111111.11111100 255.255.255.128 512 126 255.255.255.192 1,024 62 255.255.255.224 2,048 255.255.255.240 4,096 255.255.255.248 8,192 255.255.255.252 16,384 30 14 6 2

Subnet Example A 172.16.0.0/16 network needs 100 subnets capable of supporting 100 users each. A /23 network could accommodate this requirement. Net 0 = 172.16.00000000.0 = 172.16.0.0 Net 1 = 172.16.00000010.0 = 172.16.2.0 Net 2 = 172.16.00000100.0 = 172.16.4.0 Net 3 = 172.16.00000110.0 = 172.16.6.0 Net 4 = 172.16.00001000.0 = 172.16.8.0 Net 5 = 172.16.00001010.0 = 172.16.10.0 … /23 172 .16 .1111 1110 .0000 0000 # of Subnets: # of add/subnet: 128 510 255 .255 .254 .0

Subnet Example Alternative A 172.16.0.0/16 network needs 100 subnets capable of supporting 100 users each. A /25 network could also accommodate this requirement. Net 0 = 172.16.0000000.00000000 = 172.16.0.0 Net 1 = 172.16.0000000.10000000 = 172.16.0.128 Net 2 = 172.16.0000001.00000000 = 172.16.1.0 Net 3 = 172.16.0000001.00000000 = 172.16.1.128 Net 4 = 172.16.0000001.00000000 = 172.16.2.0 Net 5 = 172.16.0000001.00000000 = 172.16.2.128 … /25 172 .16 .1111 1111 .1000 0000 # of Subnets: # of add/subnet: 512 126 255 .255 .128

“Clean” Subnet Example Alternative A 172.16.0.0/16 network needs 100 subnets capable of supporting 100 users each. A /24 network could also accommodate this requirement. Net 0 = 172.16.00000000.0 = 172.16.0.0 Net 1 = 172.16.00000001.0 = 172.16.1.0 Net 2 = 172.16.00000010.0 = 172.16.2.0 Net 3 = 172.16.00000011.0 = 172.16.3.0 Net 4 = 172.16.00000100.0 = 172.16.4.0 Net 5 = 172.16.00000101.0 = 172.16.5.0 /24 172 .16 .1111 1111 .0000 0000 # of Subnets: # of add/subnet: 256 254 255 .255 .0

“Clean” Subnet Mask Borrowing all of the bits from an octet is a “clean” method of subnetting. Network Host 16 172 IP Address 255 Default Subnet Mask Subnet Host 255 8 bit Subnet Mask

/16 Subnet Examples

255.255.224.0 Subnetting Problem 1 Network I.D.: 172.16.0.0/16 You need to support 8 subnets and allow for the largest possible number of host IDs per subnet. What is the subnet mask? 255.255.224.0

255.255.252.0 Subnetting Problem 2 Network I.D.: 172.16.0.0/16 You require 600 hosts in each subnet. What is the subnet mask? 255.255.252.0

255.255.255.128 Subnetting Problem 3 Network I.D.: 172.16.0.0/16 You require 500 subnets, capable of supporting 100 hosts each. What is the subnet mask? 255.255.255.128

9.1.4.5 11111111.11111111.11111111.11100000 255.255.255.224 /27 11111111.11111111.11111100.00000000 255.255.252.0 /22 11111111.11111111.11111111.10000000 255.255.255.128 /25 11111111.11111111.11111111.11110000 255.255.255.240 /28 11111111.11111111.11111110.00000000 255.255.254.0 /23

VLSM Subnetting Subnets

Same Size Subnets So far, every subnet was the same size and all accommodated the same number of hosts. If all the subnets have the same requirements for the number of hosts, these fixed size address blocks would be efficient. However, that’s rarely the case. For example, how many subnets are required? 7 subnets of varying size. Point-to-point link Point-to-point link Point-to-point link

Same Size Subnets = Wasted Addresses Acronym Alert Same Size Subnets = Wasted Addresses To meet the host requirement of the largest LAN we could borrow 3 bits (/27) to create 8 subnets of 30 hosts each. But it also wastes addresses on the point-to-point links and limits future growth by reducing the total number of subnets available. Solution: “Subnet a subnet” using Variable Length Subnet Mask (VLSM). Point-to-point link Point-to-point link Point-to-point link

Before VLSM In all previous subnetting examples, the same subnet mask was applied for all the subnets. For example, a 255.255.255.224 (/27) mask creates 8 of 30 hosts each:

With VLSM VLSM allows a network space to be divided in unequal parts. With VLSM the subnet mask will vary depending on how many bits have been borrowed for a particular subnet, thus the “variable” part of the VLSM.

With VLSM VLSM subnetting is similar to traditional subnetting. Bits are still borrowed to create subnets. The formulas to calculate the number of hosts per subnet and the number of subnets created still apply. The difference is that subnetting is not a single pass activity. With VLSM, the network is first subnetted, and then the subnets are subnetted again. This process can be repeated multiple times to create subnets of various sizes.

Variable-Length Subnet Masks (VLSM) In 1987, RFC 1009 specified how a subnetted network could use more than one subnet mask. VLSM = Subnetting a Subnet “If you know how to subnet, you can do VLSM!”

Variable-Length Subnet Masks (VLSM) VLSM enables a network number to be configured with different subnet masks on different interfaces. Subnet an already subnetted network address. Conserves IP addresses. More efficient use of available address space. Allows for more hierarchical levels within an addressing plan. Allows for better route summarization.

VLSM Example The four LANs in our previous example can be accommodated using a /27 subnet mask. This would create subnets with increments of 32, therefore: Building A: 192.168.20.0 /27 Building B: 192.168.20.32 /27 Building C: 192.168.20.64 /27 Building D: 192.168.20.96 /27 This leaves four /27 subnets. Building A 192.168.20.0/27 .224 - 255 .0 - .31 Building B 192.168.20.32/27 .32 - .63 .192 - 223 .160 - 191 .64 - 95 Building C 192.168.20.64/27 .128 - 159 .96 - .127 Building D 192.168.20.96/27

VLSM Example The WAN interfaces of the routers are assigned the IP addresses and mask for the /30 subnets (2 hosts). In this example, the last subnet is subnetted into /30 subnets to accommodate WAN interfaces: R1 to R2: 192.168.20.224 /30 R2 to R3: 192.168.20.228 /30 R3 to R4: 192.168.20.232 /30 This leaves 3 /27 and five /30 subnets. Building A 192.168.20.0/27 Building B 192.168.20.32/27 Building C 192.168.20.64/27 Building D 192.168.20.96/27

VLSM Example

Configuring VLSM R3(config)# interface gigabitethernet 0/0 R3(config-if)# ip address 192.168.20.65 255.255.255.224 R3(config-if)# exit R3(config)# interface serial 0/0/0 R3(config-if)# ip address 192.168.20.230 255.255.255.252 R3(config)# interface serial 0/0/1 R3(config-if)# ip address 192.168.20.233 255.255.255.252 R3(config-if)# end R3# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address 192.168.20.1 255.255.255.224 R1(config-if)# exit R1(config)# interface serial 0/0/0 R1(config-if)# ip address 192.168.20.225 255.255.255.252 R1(config-if)# end R1# R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address 192.168.20.33 255.255.255.224 R2(config-if)# exit R2(config)# interface serial 0/0/0 R2(config-if)# ip address 192.168.20.226 255.255.255.252 R2(config)# interface serial 0/0/1 R2(config-if)# ip address 192.168.20.229 255.255.255.252 R2(config-if)# end R2# R4(config)# interface gigabitethernet 0/0 R4(config-if)# ip address 192.168.20.97 255.255.255.224 R4(config-if)# exit R4(config)# interface serial 0/0/0 R4(config-if)# ip address 192.168.20.234 255.255.255.252 R4(config-if)# end R4#

Always satisfy the requirements of the BIGGEST LAN FIRST VLSM Trick Always satisfy the requirements of the BIGGEST LAN FIRST and then work your way down ….

Example: Network 220.20.20.0 Internet LAN A = 255.255.255.192 /26 ISP Router LAN A 40 hosts 220.20.20.64 /26 WAN 2 hosts Internet LAN B 28 hosts LAN D 28 hosts RTA LAN A = 255.255.255.192 /26 220.20.20.0 – 63 = ? 220.20.20.64 – 127 = LAN A 220.20.20.128 – 191 = ? 220.20.20.192 – 255 = ? LAN C 7 hosts

Example: Network 220.20.20.0 VLSM Internet ISP Router LAN A 40 hosts 220.20.20.64 /26 WAN 2 hosts Internet LAN B 28 hosts LAN D 28 hosts RTA 220.20.20.128 /27 220.20.20.160 /27 LAN B & D = 255.255.255.224 /27 220.20.20.0 – 63 = ? 220.20.20.64 – 127 = LAN A 220.20.20.128 – 159 = LAN B 220.20.20.160 – 191 = LAN D 220.20.20.192 – 255 = ? LAN C 7 hosts VLSM

Example: Network 220.20.20.0 Internet LAN C = 255.255.255.240 /28 ISP Router LAN A 40 hosts 220.20.20.64 /26 WAN 2 hosts Internet LAN B 28 hosts LAN D 28 hosts RTA 220.20.20.128 /27 220.20.20.160 /27 LAN C = 255.255.255.240 /28 220.20.20.0 – 63 = ? 220.20.20.64 – 127 = LAN A 220.20.20.128 – 159 = LAN B 220.20.20.160 – 191 = LAN D 220.20.20.192 – 207 = LAN C 220.20.20.208 – 255 = ? LAN C 7 hosts 220.20.20.192 /28

Example: Network 220.20.20.0 Internet ISP Router RTA LAN A 40 hosts 220.20.20.64 /26 WAN 2 hosts 220.20.20.224 /30 Internet LAN B 28 hosts LAN D 28 hosts RTA 220.20.20.128 /27 220.20.20.160 /27 WAN = 255.255.255.252 /30 220.20.20.0 – 63 = ? 220.20.20.64 – 127 = LAN A 220.20.20.128 – 159 = LAN B 220.20.20.160 – 191 = LAN D 220.20.20.192 – 207 = LAN C 220.20.20.208 – 223 = ? 220.20.20.224 – 227 = WAN 220.20.20.228 – 255 = ? LAN C 7 hosts 220.20.20.192 /28

VLSM Allocation /26 /27 /28 /30 220.20.20.0 - .63 220.20.20.64 – .127 220.20.20.128 - .191 220.20.20.128 – .159 220.20.20.160 – .191 220.20.20.192 - .255 220.20.20.192 – 223 220.20.20.192 - .207 220.20.20.208 - .223 220.20.20.224 – 255 220.20.20.224 – .239 220.20.20.224 - .227 220.20.20.228 - .231 220.20.20.240 - .255 220.20.20.32 - 255

2

2

2

2

Structured Network Design

The Need for Structure Network Design The allocation of network layer address space within the corporate network needs to be well designed. There are three primary considerations when planning address allocation. Preventing Duplication of Addresses - Each host in an internetwork must have a unique address. Providing and Controlling Access - Some devices such as servers, printers, and routers require static IP addresses. Monitoring Security and Performance – A properly planned and documented network addressing scheme makes it easier to troubleshoot.

Assigning Addresses within a Network There are different types of devices in a network, including: End user clients Servers and peripherals Hosts that are accessible from the Internet Intermediary devices Gateway When developing an IP addressing scheme, it is generally recommended to have a set pattern of how addresses are allocated to each type of device. This benefits administrators when adding and removing devices, filtering traffic based on IP, as well as simplifies documentation.

Assigning Addresses within a Network A network addressing plan might include using a different range of addresses within each subnet, for each type of device. For example, on every subnetted LAN: Use First Last Router Gateway .1 Intermediary devices .2 .7 Servers .8 .12 Printers .13 .15 Hosts .20 .254

Subnetting IPv6

Subnetting IPv6 An IPv6 address space is not subnetted to conserve addresses; It is subnetted to support hierarchical, logical design of the network. IPv4 subnetting is about managing IP address. IPv6 subnetting is about building an IP addressing hierarchy based on the number of routers and networks they support.

Subnetting IPv6 Recall that an IPv6 address with a /48 prefix has 16 bits for subnet ID. Subnetting using the 16 bit subnet ID yields a possible 65,536 /64 subnets.

Subnetting IPv6 Subnets created from the subnet ID are easy to represent because there is no conversion to binary required. To determine the next available subnet, just count up in hexadecimal in the subnet ID portion. For example, to subnet the address 2001:DB8:ACAD/48 IPv6 address. 2001:0DB8:ACAD:0000::/64 2001:0DB8:ACAD:0001::/64 2001:0DB8:ACAD:0002::/64 2001:0DB8:ACAD:0003::/64 2001:0DB8:ACAD:0004::/64 2001:0DB8:ACAD:0005::/64 2001:0DB8:ACAD:0006::/64 2001:0DB8:ACAD:0007::/64 2001:0DB8:ACAD:0008::/64 2001:0DB8:ACAD:0009::/64 2001:0DB8:ACAD:000A::/64 2001:0DB8:ACAD:000B::/64 2001:0DB8:ACAD:000C::/64 Subnets 13 – 65,534 not shown 2001:0DB8:ACAD:FFFF::/64

Configuring IPv6 Subnets R1(config)# ipv6 unicast-routing R1(config)# interface gigabitethernet 0/0 R1(config-if)#ipv6 address 2001:db8:acad:1::1/64 R1(config-if)#exit R1(config)#interface gigabitethernet 0/1 R1(config-if)#ipv6 address 2001:db8:acad:2::1/64 R1(config)#interface serial 0/0/0 R1(config-if)#ipv6 address 2001:db8:acad:3::1/64 R1(config-if)#end R1#

Subnetting into the Interface ID IPv6 bits can be borrowed from the interface ID to create additional IPv6 subnets. This is typically done for security reasons to create fewer hosts per subnet and not necessarily to create additional subnets. When extending the subnet ID by borrowing bits from the interface ID, the best practice is to subnet on a nibble boundary. A nibble is 4 bits or one hexadecimal digit. Valid nibble boundaries include /64, /68, /72, /76, /80, etc. 9.3.1.3 Subnetting into the Interface ID

Subnetting into the Interface ID A nibble is a hex digit (four bits), therefore nibble boundaries occur at multiples of four bits. Subnetting on nibble boundaries means only using nibble aligned subnet masks (i.e., /64, /68, /72, /76, /80, etc.) 9.3.1.3 Subnetting into the Interface ID

CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College graziani@cabrillo.edu Fall 2013