Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks

Similar presentations


Presentation on theme: "CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks"— Presentation transcript:

1 CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks
CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College Fall 2013

2 Network Segmentation

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

4 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)

5 /? 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

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

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

8 How your provider (ISP) sees you….
/16 /24 /24 /24 /24 /24 /16 /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
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.

14 Designing a Network Addressing Scheme
LAN subnets are typically assigned from the private address ranges. with a subnet mask of with a subnet mask of with a subnet mask of 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 /16 /24 /24 /24 /24 /24 /16 /16

18 Subnet Example Network Subnet Host Subnets Addresses 150 50 150 50 1
Network address with /16 Base Network Mask Using Subnets: Subnet Mask 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

19 Subnet Example Network Subnet Hosts 150 50 1 254 255 150 50 1 254 255
Network address with /16 Base Network Mask Using Subnets: Subnet Mask 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

20 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 65,534 host addresses, one for network address and one for broadcast address. Host IP Address: A host of the /16 network

21 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

22 With subnetting: Total address = 256 subnets * (256 hosts – 2)
Network First Host Last Host Broadcast Hosts 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
Network Host Network /24 Need: As many subnets as possible, 60 hosts per subnet

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

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

27 Calculating the number subnets/hosts needed
Number of subnets /26 /26 /26 /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
Network Host Network /24 Need: As many subnets as possible, 12 hosts per subnet

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

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

31 Number of Subnets: 4 bits or 16 subnets
/28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 New Subnet Mask: (/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
Network Host Network /24 Need: Need 6 subnets, as many hosts per subnet as possible

33 Calculating the number subnets/hosts needed
Number of subnets 3 subnet bits Network Host Network /24 Need: Need 6 subnets, as many hosts per subnet as possible

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

35 Number of Subnets: 3 bits or 8 subnets
/27 /27 /27 /27 /27 /27 /27 /27 New Subnet Mask: (/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: /27 G0/1: /27 S0/0/0: /27 To configure R2: G0/0: /27 G0/1: /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 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address R1(config)# interface Serial 0/0/0 R1(config-if)# ip address

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

39 Configuring Subnets in an IPv4 Network
R1(config)# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 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 R2(config-if)# no shutdown R2(config-if)# exit R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address R2(config)# interface gigabitethernet 0/1 R2(config-if)# ip address

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

41 Borrow 2 Bits .1100 0000 SNM: Network Prefix: # of Subnets:
/ (2 subnets, 126 host) .0 ( ) BA: .127 .128 ( ) BA: .255 / (4 subnets, 62 host) .0 ( ) BA: .63 .64 ( ) BA: .127 .128 ( ) BA: .191 .192 ( ) BA: .255 Borrow 2 Bits ( ) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: /26 4 62 64

42 Borrow 3 Bits .1110 0000 SNM: Network Prefix: # of Subnets:
/ (2 subnets, 126 host) .0 ( ) BA: .127 .128 ( ) BA: .255 / (4 subnets, 62 host) .0 ( ) BA: .63 .64 ( ) BA: .127 .128 ( ) BA: .191 .192 ( ) BA: .255 / (8 subnets, 30 host) .0 ( ) BA: .31 .32 ( ) BA: .63 .64 ( ) BA: .95 .96 ( ) BA: .127 .128 ( ) BA: .159 .160 ( ) BA: .191 .192 ( ) BA: .223 .224 ( ) BA: .255 Borrow 3 Bits ( ) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: /27 8 30 32

43 Borrow 4 Bits .1111 0000 SNM: Network Prefix: # of Subnets:
/ (2 subnets, 126 host) .0 ( ) BA: .127 .128 ( ) BA: .255 / (4 subnets, 62 host) .0 ( ) BA: .63 .64 ( ) BA: .127 .128 ( ) BA: .191 .192 ( ) BA: .255 / (8 subnets, 30 host) .0 ( ) BA: .31 .32 ( ) BA: .63 .64 ( ) BA: .95 .96 ( ) BA: .127 .128 ( ) BA: .159 .160 ( ) BA: .191 .192 ( ) BA: .223 .224 ( ) BA: .255 / (16 subnets, 14 host) .0 ( ) BA: .15 .16 ( ) BA: .31 .32 ( ) BA: .47 .48 ( ) BA: .63 .64 ( ) BA: .79 .80 ( ) BA: .95 .96 ( ) BA: .111 .112 ( ) BA: .127 .128 ( ) BA: .143 .144 ( ) BA: .159 .160 ( ) BA: .175 .176 ( ) BA: .191 .192 ( ) BA: .207 .208 ( ) BA: .223 .224 ( ) BA: .239 .240 ( ) BA: .255 Borrow 4 Bits ( ) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: /28 16 14 16

44 Borrow 5 Bits .1111 1000 SNM: Network Prefix: # of Subnets:
/ (2 subnets, 126 host) .0 ( ) BA: .127 .128 ( ) BA: .255 / (4 subnets, 62 host) .0 ( ) BA: .63 .64 ( ) BA: .127 .128 ( ) BA: .191 .192 ( ) BA: .255 / (8 subnets, 30 host) .0 ( ) BA: .31 .32 ( ) BA: .63 .64 ( ) BA: .95 .96 ( ) BA: .127 .128 ( ) BA: .159 .160 ( ) BA: .191 .192 ( ) BA: .223 .224 ( ) BA: .255 / (16 subnets, 14 host) .0 ( ) BA: .15 .16 ( ) BA: .31 .32 ( ) BA: .47 .48 ( ) BA: .63 .64 ( ) BA: .79 .80 ( ) BA: .95 .96 ( ) BA: .111 .112 ( ) BA: .127 .128 ( ) BA: .143 .144 ( ) BA: .159 .160 ( ) BA: .175 .176 ( ) BA: .191 .192 ( ) BA: .207 .208 ( ) BA: .223 .224 ( ) BA: .239 .240 ( ) BA: .255 / (32 subnets, 6 host) .0 ( ) BA: .7 .8 ( ) BA: .15 .16 ( ) BA: .23 .24 ( ) BA: .31 .32 ( ) BA: .39 .40 ( ) BA: .47 .48 ( ) BA: .55 .56 ( ) BA: .63 .64 ( ) BA: .71 .72 ( ) BA: .79 .80 ( ) BA: .87 .88 ( ) BA: .95 .96 ( ) BA: .103 .104 ( ) BA: .111 ( ) BA: .119 ( ) BA: .127 ( ) BA: .137 ( ) BA: .143 ( ) BA: .151 ( ) BA: .159 ( ) BA: .167 ( ) BA: .175 ( ) BA: .183 ( ) BA: .191 ( ) BA: .199 ( ) BA: .207 ( ) BA: .215 ( ) BA: .223 ( ) BA: .231 ( ) BA: .239 ( ) BA: .247 ( ) BA: .255 Borrow 5 Bits ( ) SNM: Network Prefix: # of Subnets: # of add/subnet: Subnet increment: /29 32 6 8

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

46

47 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

48 VLSM Subnetting Subnets

49 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

50 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

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

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

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

54 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!”

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

56 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: /27 Building B: /27 Building C: /27 Building D: /27 This leaves four /27 subnets. Building A /27 Building B /27 Building C /27 Building D /27

57 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: /30 R2 to R3: /30 R3 to R4: /30 This leaves 3 /27 and five /30 subnets. Building A /27 Building B /27 Building C /27 Building D /27

58 Additional Slides (same only different)

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

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

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

62 If 3 bits are borrowed = 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

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

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

65 Configuring Subnets in an IPv4 Network
For example, to configure R1: G0/0: /27 G0/1: /27 S0/0/0: /27 To configure R2: G0/0: /27 G0/1: /27

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

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

68 Configuring Subnets in an IPv4 Network
R1(config)# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address R1(config)# interface Serial 0/0/0 R1(config-if)# ip address 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 R2(config-if)# no shutdown R2(config-if)# exit R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address R2(config)# interface gigabitethernet 0/1 R2(config-if)# ip address

69 Calculating Subnets Examples

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

71 How many subnets do you need to create ...
For example: A company with a public address of /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.

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

73 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?

74 Problem #2 Which IPv4 subnetted addresses represent valid host addresses? (Choose three.) /26 /26 /26 /27 /27 /27

75 Problem #3 Given the IP address and subnet mask of , 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

76 Problem #4 /27 Host address: Subnet Mask: Default Gateway: 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.

77 192 168 108 88

78 1

79 1

80 Practice Quiz: http://www.quia.com/quiz/168122.html

81 Fun with /24 Subnets

82 14 8

83 Calculating Advanced Subnets

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

85 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!

86 Number of Host Addresses per Subnet
With a /24 mask, we can borrow 6 host bits. 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.

87 Calculating Host Addresses in 4th Octet
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

88 Calculating Host Addresses in 3rd Octet
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

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

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

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

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

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

94 /16 Subnet Table # of Bits Borrowed Subnet Mask # of usable Subnets
# of available Hosts 4 16,382 8 8,190 16 4,094 32 2,046 64 1,022 128 510 256 254 512 126 1,024 62 2,048 4,096 8,192 16,384 30 14 6 2

95 Subnet Example A /16 network needs 100 subnets capable of supporting users each. A /23 network could accommodate this requirement. Net 0 = = Net 1 = = Net 2 = = Net 3 = = Net 4 = = Net 5 = = /23 172 .16 # of Subnets: # of add/subnet: 128 510 255 .255 .254 .0

96 Subnet Example Alternative
A /16 network needs 100 subnets capable of supporting users each. A /25 network could also accommodate this requirement. Net 0 = = Net 1 = = Net 2 = = Net 3 = = Net 4 = = Net 5 = = /25 172 .16 # of Subnets: # of add/subnet: 512 126 255 .255 .128

97 “Clean” Subnet Example Alternative
A /16 network needs 100 subnets capable of supporting users each. A /24 network could also accommodate this requirement. Net 0 = = Net 1 = = Net 2 = = Net 3 = = Net 4 = = Net 5 = = /24 172 .16 # of Subnets: # of add/subnet: 256 254 255 .255 .0

98 “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

99 /16 Subnet Examples

100 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?

101 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?

102 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?

103 /27 /22 /25 /28 /23

104 VLSM Subnetting Subnets

105 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

106 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

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

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

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

110 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!”

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

112 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: /27 Building B: /27 Building C: /27 Building D: /27 This leaves four /27 subnets. Building A /27 Building B /27 Building C /27 Building D /27

113 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: /30 R2 to R3: /30 R3 to R4: /30 This leaves 3 /27 and five /30 subnets. Building A /27 Building B /27 Building C /27 Building D /27

114 VLSM Example

115 Configuring VLSM R3(config)# interface gigabitethernet 0/0
R3(config-if)# ip address R3(config-if)# exit R3(config)# interface serial 0/0/0 R3(config-if)# ip address R3(config)# interface serial 0/0/1 R3(config-if)# ip address R3(config-if)# end R3# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address R1(config-if)# exit R1(config)# interface serial 0/0/0 R1(config-if)# ip address R1(config-if)# end R1# R2(config)# interface gigabitethernet 0/0 R2(config-if)# ip address R2(config-if)# exit R2(config)# interface serial 0/0/0 R2(config-if)# ip address R2(config)# interface serial 0/0/1 R2(config-if)# ip address R2(config-if)# end R2# R4(config)# interface gigabitethernet 0/0 R4(config-if)# ip address R4(config-if)# exit R4(config)# interface serial 0/0/0 R4(config-if)# ip address R4(config-if)# end R4#

116 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 ….

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

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

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

120 Example: Network 220.20.20.0 Internet ISP Router RTA
LAN A 40 hosts /26 WAN 2 hosts /30 Internet LAN B 28 hosts LAN D 28 hosts RTA /27 /27 WAN = /30 – 63 = ? – 127 = LAN A – 159 = LAN B – 191 = LAN D – 207 = LAN C – 223 = ? – 227 = WAN – 255 = ? LAN C 7 hosts /28

121 VLSM Allocation /26 /27 /28 /30 – .127 – .159 – .191 – 223 – 255 – .239

122 2

123 2

124 2

125 2

126 Structured Network Design

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

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

129 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

130 Subnetting IPv6

131

132

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

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

135 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

136 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#

137 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. Subnetting into the Interface ID

138 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.) Subnetting into the Interface ID

139

140

141

142 CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks
CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College Fall 2013


Download ppt "CIS 81 Fundamentals of Networking Chapter 9: Subnetting IP Networks"

Similar presentations


Ads by Google