1 / 142

CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks

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. 10.

tonih
Download Presentation

CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Network Segmentation

  3. Analogy 10 baskets x 10 apples = 100 apples 10 10 10 100 Apples 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 10 10 10

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

  5. IPv4 Unicast Address /? Subnet portion Network portion Host portion 32 bits IPv6 Global Unicast Address /64 /48 16-bit Subnet ID Global Routing Prefix Interface ID 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

  6. 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.

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

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

  9. 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?

  10. 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).

  11. 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.

  12. Private Addresses and NAT has kept IPv4 going

  13. Communication Between Subnets • Each router interface is in a different subnet and in its own broadcast domain. • 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.

  14. 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.

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

  16. Calculating Subnets

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

  18. 150 150 150 150 150 150 150 Network 50 50 Network 50 50 50 50 50 1 Subnet 0 255 254 Etc. 3 2 Host 0 0 0 0 0 0 0 Subnet Example 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 Subnets Addresses 256 Subnets 28

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

  20. Host IP Address: 150.50.3.50/16 • A host of the 150.50.3.0 /16 network With NO subnetting: NetworkFirst HostLast HostBroadcast 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

  21. Host IP Address: 150.50.3.50/24 • A host of the 150.50.3.0 /24 network With subnetting: NetworkFirst HostLast HostBroadcast 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

  22. With subnetting: NetworkFirst HostLast HostBroadcastHosts 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.255254 … 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.

  23. Rick’s calculating the number subnets/hosts needed

  24. 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

  25. 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 • Network 192.168.1.0/24 • Need: • As many subnets as possible, 60 hosts per subnet 6 host bits Network Host

  26. 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 • 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 6 host bits Network Host

  27. 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

  28. 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

  29. 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 • Network 192.168.1.0/24 • Need: • As many subnets as possible, 12 hosts per subnet 4 host bits Network Host

  30. 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 11 1 0 0 0 0 255.255.255.240 • 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 4 host bits Network Host

  31. 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 11 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

  32. 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

  33. 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 • Network 192.168.1.0/24 • Need: • Need 6 subnets, as many hosts per subnet as possible 3 subnet bits Network Host

  34. 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 10 0 0 0 0 255.255.255.224 • 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 3 subnet bits Network Host

  35. 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 1 10 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

  36. 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 • S0/0/0: 192.168.1.64 /27

  37. 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)# R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address 192.168.1.33 255.255.255.224 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 192.168.1.65 255.255.255.224 R1(config-if)# no shutdown R1(config-if)# exit R1(config)#

  38. 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)# R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address 192.168.1.97 255.255.255.224 R2(config-if)# no shutdown R2(config-if)# exit R2(config)# R2(config)# interface gigabitethernet 0/1 R2(config-if)# ip address 192.168.1.129 255.255.255.224 R2(config-if)# no shutdown R2(config-if)# exit R2(config)#

  39. 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)# R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address 192.168.1.33 255.255.255.224 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 192.168.1.65 255.255.255.224 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# 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)# R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address 192.168.1.97 255.255.255.224 R2(config-if)# no shutdown R2(config-if)# exit R2(config)# R2(config)# interface gigabitethernet 0/1 R2(config-if)# ip address 192.168.1.129 255.255.255.224 R2(config-if)# no shutdown R2(config-if)# exit R2(config)#

  40. 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

  41. 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

  42. 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

  43. 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

  44. 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

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

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

  47. VLSM Subnetting Subnets

  48. 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

  49. 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

More Related