1 / 82

What is S ubnetting ?

Subnetting is the process of dividing a single network into smaller networks, resulting in multiple subnetworks with equally distributed host addresses. This helps control traffic, improve network performance, and provide security.

reyesc
Download Presentation

What is S ubnetting ?

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. What is Subnetting?

  2. What is Subnetting? Network 65,536 addresses • Subnetting the process of taking a single network and dividing it into smaller networks. • Result: A single network and all of its host addresses are divided into multiple subnetworks with the host addresses equally divided amongst the subnetworks. Network-1 Network-2 Network-3 256 addresses 256 addresses 256 addresses Network-256 . . . Network-4 Network-5 256 addresses 256 addresses 256 addresses

  3. Analogy 10 baskets x 10 apples = 100 apples 10 10 10 100 Apples 10 10 10 10 10 10 10

  4. 10 barrels x 8 apples = 80 apples 8 8 8 (-2) (-2) (-2) 8 8 8 98 Apples (100 – 2) (-2) (-2) (-2) 8 8 8 • However, in subnetting we will see that we lose two addresses (two apples) per subnet. • Similar to any network, devices cannot be assigned the: • Network address • Broadcast address (-2) (-2) (-2) 8 (-2)

  5. Reasons for Subnetting • These reasons for subnetting will make more sense the more you learn about networks… so don't worry if these are a little vague right now  • The term “subnet” and “network” are interchangeable. • Most networks are a subnet of some larger address block. • Segmenting networks into subnets creates smaller groups of devices and services in order to: • Control traffic by containing broadcast traffic within the 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. • Provides a low-level security. • Can be created to match the physical layout or administrative structure of the organization.

  6. How your provider (ISP) sees you…. 10.50.1.0 /24 10.50.2.0 /24 10.50.3.0 /24 10.50.4.0 /24 10.50.5.0 /24 10.50.0.0 /16 10.50.0.0 /16 • Upstream provider forwards all traffic with the IPv4 packet's destination address matching the first 16 bits (/16) of 10.50.0.0 to the organization. • Subnettingdoes not change how the outside world sees the network but provides additional structure within the organization.

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

  8. What is Subnetting?

  9. Designing a Network Addressing Scheme

  10. Designing a Network Addressing Scheme • Planning network subnets requires examining the needs and requirements of an organization’s network usage. • Start by doing a network requirement study. • Examine how the network will be segmented. • Consider the address plan and network segmentation (subnetting) based on: • Performance: Analyzing traffic flow and traffic patterns • Security: Controlling access to devices and areas of your network • Address assignment (address plan or schema): How device addresses will be assigned, either statically or dynamically • SubnettingIPv4 vsIPv6 • IPv4: • With public IPv4 addresses will most likely have to consider address conservation • Address conservation may also be required for private IPv4 addresses • IPv6: • Address conservation is notan issue • IPv6 addressing schema and subnetting is much easier

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

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

  13. Address Schema • Internal LANsubnets are typically assigned from the private address ranges. • Create standards for IP address assignments within each subnet range such as: • Routers are assigned the first (or last) available host addresses in the range • Printers and servers will be assigned static IP addresses • User devices will receive IP addresses dynamically • Stateful DHCP • SLAAC (IPv6 only) • Group devices that need to accessible from the Internet into their own subnet.

  14. Communication Between Subnets • A router is required to subnet a network.  • Each router interface is on a different subnet – separates broadcast domains. • End devices on a subnet use the router interface as the default gateway.

  15. Designing a Network Addressing Scheme

  16. IPv4 Subnetting Simply Explained

  17. ISP-A ISP-B ISP-V 10.0.0.0/8 255.0.0.0 x.x.x.x/n y.y.y.y x.x.x.x/n y.y.y.y Network Host 16,777,216 total addresses Allows the ISP to allocate blocks of network addresses from this address space

  18. Subnetting IPv4 IPv4 Unicast Address /? Subnet portion Network portion Host portion 32 bits

  19. 10.0.0.0/8 255.0.0.0 . Network Host Subnet mask: 255.255.0.0 /16 Network Host < > Subnet • ISP-A cannot modify the network portion of the address – the portion allocated to it by its RIR (ARIN) or its provider (ISP). • ISP-A can only modify the host portion of it address. • In order to create subnet, divide its one large network into multiple smaller networks, ISP will use bits from the host portion. • ISP-A borrows 8 bits from the host portion, extending the network portion by 8 bits. • This changes the network mask used on these subnetworks from a 255.0.0.0 (/8) to 255.255.0.0 (/16) • ISP-A has control of these 8 network bits and uses them to create subnets

  20. 10.0.0.0/8 255.0.0.0 Network Host Subnet mask: 255.255.0.0 /16 Network Host < > Subnet

  21. 10.0.0.0/8 255.0.0.0 Network Host Subnet mask: 255.255.0.0 /16 Network Host < > Subnet

  22. From 1 network of 16,777,216(-2)host addresses . . . To 256 networks (subnets) with a total of 65,636(-2) host addressesper subnet ISP-A 10.0.0.0/8 255.0.0.0 ISP-A can allocate different subnets (networks) to different customers. Customer-A Customer-B Customer-C 10.0.0.0/16 255.255.0.0 10.1.0.0/16 255.255.0.0 10.2.0.0/16 255.255.0.0 Customer-F . . . Customer-D Customer-E 10.255.0.0/16 255.255.0.0 10.3.0.0/16 255.255.0.0 10.4.0.0/16 255.255.0.0

  23. ISP-A will forward all packets with the IPv4 destination address having 10.4.x.x in the first 16 bits to Customer E's router R1 ISP-A 191.168.99.0/24 255.255.255.0 ISP's Routing Table (partial) Network AddressNext-hop 10.4.0.0/16192.168.99.2 10.4.0.0/16 255.255.0.0 R1 10.4.0.1/24 A 10.4.98.111/16 255.255.0.0 Default GW 10.4.0.1 10.4.1.50/16 255.255.0.0 Default GW 10.4.0.1 10.4.44.111/16 255.255.0.0 Default GW 10.4.0.1 10.4.0.67/16 255.255.0.0 Default GW 10.4.0.1 10.4.16.100/16 255.255.0.0 Default GW 10.4.0.1

  24. 10.4.0.0/16 10.4.0.1 10.4.255.254 10.4.255.255 Network Host Host10.4.16.66 00001010.00000100.00010000.01000010 Mask 255.255.0.0 11111111.11111111.00000000.00000000 AND operation ---------------------------------------------------------- Network Address 00001010.00000100.00000000.00000000 All 0's in the host First host00001010.00000100.00000000.00000001 All 0's & a 1 Last host00001010.00000100.11111111.11111110 All 1's & a 0 Broadcast00001010.00000100.11111111.11111111 All 1's # of host bits = 16 bits # of hosts = 216– 2 = 65,534 usable hosts Can't assign network or broadcast addresses to hosts

  25. IPv4 Subnetting Simply Explained

  26. IPv4 Subnetting: Looking at the bits makes it easy

  27. Subnetting IPv4 IPv4 Unicast Address /? Subnet portion Network portion Host portion 32 bits Subnetting on a natural octet boundary - easy to see the subnets • Example /8 to 16 or /16 to /24 Subnettingwithin a natural octet boundary - requires looking at the bits • Example /24 to /27

  28. 10.4.0.0/16 255.255.0.0 Network Host Mask: 255.255.255.0 /24 Host Network < Subnet > • The customer (enterprise) wants to subnet their 10.4.0.0/16 network • They cannot modify the network portion of the address – the portion allocated to it by its provider (ISP). • The enterprise can only modify the host portion of it address. • In order to create subnet, divide its one large network into multiple smaller networks, ISP will use bits from the host portion. • The enterprise borrows 8 bits from the host portion, extending the network portion by 8 bits. • This changes the network mask used on these subnetworks from a 255.255.0.0 (/16) to 255.255.255.0 (/24) • The enterprise now has control of these 8 network bits and uses them to create subnets

  29. 10.4.0.0/16 255.255.0.0 Network Host Mask: 255.255.255.0 /24 Host Network < > Subnet

  30. 10.4.0.0/16 10.4.0.1 10.4.255.254 10.4.255.255 Network Host Host10.4.16.66 00001010.00000100.00010000.01000010 Mask 255.255.0.0 11111111.11111111.00000000.00000000 AND operation ---------------------------------------------------------- Network Address 00001010.00000100.00000000.00000000 All 0's in the host First host00001010.00000100.00000000.00000001 All 0's & a 1 Last host00001010.00000100.11111111.11111110 All 1's & a 0 Broadcast00001010.00000100.11111111.11111111 All 1's =============================================================================== Network Subnet Host Host10.4.16.66 00001010.00000100.00010000.01000010 Mask255.255.255.0 11111111.11111111.11111111.00000000 AND operation ---------------------------------------------------------- Network Address 00001010.00000100.00010000.00000000 All 0's in the host First host 00001010.00000100.00010000.00000001 All 0's & a 1 Last host 00001010.00000100.00010000.11111110 All 1's & a 0 Broadcast 00001010.00000100.00010000.11111111 All 1's 10.4.16.0/24 10.4.16.1 10.4.16.254 10.4.16.255

  31. 10.4.16.0/16 10.4.16.1 10.4.16.254 10.4.16.255 Network Subnet Host Host10.4.16.66 00001010.00000100.00010000.01000010 Mask255.255.255.0 11111111.11111111.11111111.00000000 AND operation ---------------------------------------------------------- Network Address 00001010.00000100.00010000.00000000 All 0's in the host First host 00001010.00000100.00010000.00000001 All 0's & a 1 Last host 00001010.00000100.00010000.11111110 All 1's & a 0 Broadcast 00001010.00000100.00010000.11111111 All 1's # of host bits = 8bits # of hosts = 28– 2 = 254 hosts/subnet # of subnet bits = 8 bits # of subnets = 28 = 256 subnets Network Address 00001010.00000100.00000000.00000000 10.4.0.0/24 Network Address 00001010.00000100.00000001.00000000 10.4.1.0/24 Network Address 00001010.00000100.00000010.00000000 10.4.2.0/24 Network Address 00001010.00000100.00000011.00000000 10.4.3.0/24 ... Network Address 00001010.00000100.11111110.00000000 10.4.254.0/24 Network Address 00001010.00000100.11111111.00000000 10.4.255.0/24

  32. Forward all packets with the IPv4 destination address having 10.4.x.x in the first 16 bits to R1 ISP 191.168.99.0/24 255.255.255.0 191.168.99.0/24 255.255.255.0 ISP's Routing Table (partial) Network AddressNext-hop 10.4.0.0/16192.168.99.2 10.4.0.0/24 255.255.255.0 R1 10.4.0.1/24 10.4.1.0/24 255.255.255.0 10.4.1.1/24 10.4.2.1/24 10.4.2.0/24 255.255.255.0 10.4.100.0/24 255.255.255.0 10.4.2.2/24 10.10.3.1/24 A R2 10.4.16.0/24 255.255.255.0 10.4.16.1/24 10.4.16.100/24 255.255.255.0 Default GW 10.4.16.1

  33. PC A • Same IPv4 address: 10.4.16.100 • Different subnet masks – different networks • Different default gateway addresses 10.4.16.100/16 • PC A is a host on a network with 65,634 possible devices 10.4.16.100/24 • PC A is a host on a network with 254 possible devices

  34. Static and/or dynamic routing configuration not shown R1(config)# interface gigabitethernet 0/0 R1(config-if)# ip address 10.4.0.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/1 R1(config-if)# ip address 10.4.1.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/2 R1(config-if)# ip address 10.4.2.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# interface gigabitethernet 0/3 R1(config-if)# ip address 192.168.99.2 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# exit

  35. IPv4 Subnetting: Looking at the bits makes it easy

  36. IPv4 Subnetting: Subnetting within a Natural Octet Boundary and Bringing it All Together

  37. Subnetting IPv4 IPv4 Unicast Address /? Subnet portion Network portion Host portion 32 bits Subnetting on a natural octet boundary - easy to see the subnets • Example /8 to 16 or /16 to /24 Subnettingwithin a natural octet boundary - requires looking at the bits • Example /24 to /27

  38. 10.4.16.0/24 10.4.16.1 10.4.16.254 10.4.16.255 Network Host Host10.4.16.66 00001010.00000100.00010000.01000010 Mask 255.255.255.0 11111111.11111111.11111111.00000000 AND operation ---------------------------------------------------------- Network Address 00001010.00000100.00010000.00000000 All 0's in the host First host 00001010.00000100.00010000.00000001 All 0's & a 1 Last host 00001010.00000100.00010000.11111110 All 1's & a 0 Broadcast 00001010.00000100.00010000.11111111 All 1's # of host bits = 8 bits # of hosts = 28– 2 = 254 hosts/subnet =============================================================================== Network Sub Host Host10.4.16.66 00001010.00000100.00010000.01000010 Mask255.255.255.254 11111111.11111111.11111111.11100000 AND operation ---------------------------------------------------------- Network Address 00001010.00000100.00010000.01000000 All 0's in the host First host 00001010.00000100.00010000.01000001 All 0's & a 1 Last host 00001010.00000100.00010000.01011110 All 1's & a 0 Broadcast 00001010.00000100.00010000.01011111 All 1's 10.4.16.64/27 10.4.16.65 10.4.16.94 10.4.16.95

  39. 10.4.16.64/27 10.4.16.65 10.4.16.94 10.4.16.95 Network Sub Host Host10.4.16.66 00001010.00000100.00010000.01000010 Mask 255.255.255.254 11111111.11111111.11111111.11100000 AND operation ---------------------------------------------------------- Network Address 00001010.00000100.00010000.01000000 All 0's in the host First host 00001010.00000100.00010000.01000001 All 0's & a 1 Last host 00001010.00000100.00010000.01011110 All 1's & a 0 Broadcast 00001010.00000100.00010000.01011111 All 1's # of subnet bits = 3 bits # of subnets = 23 = 8 subnets # of host bits = 5bits # of hosts = 25– 2 = 30 hosts/subnet

  40. Range of Subnets and Hosts Hosts per subnet Network 00000 10000 00001 10001 00010 10010 00011 10011 00100 10100 00101 10101 00110 10110 00111 10111 01000 11000 01001 11001 01010 11010 0101111011 01100 11100 01101 11101 01110 11110 01111 11111 Broadcast # of subnet bits = 3 bits # of subnets = 23 = 8 subnets # of host bits = 5 bits # of hosts = 25– 2 = 30 hosts/subnet Usable addresses: 8 subnets x 30 hosts/subnet = 240 addressable hosts Lost addresses: 1 network address + broadcast address/subnet = 8 subnets x 2 lost addresses/subnet = 16 non-addressable host addresses Subnets 000 010 011 100 101 110 111 Network Sub Host Host10.4.16.66 00001010.00000100.00010000.01000010 Mask255.255.255.254 11111111.11111111.11111111.11100000 ---------------------------------------------------------- Network 10.4.16.6400001010.00000100.00010000.01000000

  41. Subnets 000 010 011 100 101 110 111 # of subnet bits = 3 bits # of subnets = 23 = 8 subnets # of host bits = 5 bits # of host addresses = 25= 32 host addresses # of usable hosts = 25– 2 = 30 usable hosts/subnet +32 Network Sub Host 128 64 32 16 8 4 2 1 Network 10.4.16.0/2700001010.00000100.00010000.0 0 0 0 0 0 0 0 Network 10.4.16.32/2700001010.00000100.00010000.0 0 1 0 0 0 0 0 Network 10.4.16.64/2700001010.00000100.00010000.0 1 0 0 0 0 0 0 Network 10.4.16.96/2700001010.00000100.00010000.0 1 1 0 0 0 0 0 Network 10.4.16.128/2700001010.00000100.00010000.1 0 0 0 0 0 0 0 Network 10.4.16.160/2700001010.00000100.00010000.1 0 1 0 0 0 0 0 Network 10.4.16.192/2700001010.00000100.00010000.1 1 0 0 0 0 0 0 Network 10.4.16.224/2700001010.00000100.00010000.1 1 1 0 0 0 0 0

  42. Subnets 000 010 011 100 101 110 111 Address relationships: • First host address is one more than network address • Last host address is one less than broadcast address • Add one to the broadcast address and you get the network address of the next subnet +1 -1 First HostLast HostBroadcast Network 10.4.16.0/2710.4.16.1 10.4.16.30 10.4.16.31 Network 10.4.16.32/27 10.4.16.33 10.4.16.6210.4.16.63 Network 10.4.16.64/27 10.4.16.65 10.4.16.9410.4.16.95 Network 10.4.16.96/27 10.4.16.97 10.4.16.126 10.4.16.127 Network 10.4.16.128/2710.4.16.129 10.4.16.158 10.4.16.159 Network 10.4.16.160/27 10.4.16.161 10.4.16.190 10.4.16.191 Network 10.4.16.192/27 10.4.16.193 10.4.16.222 10.4.16.223 Network 10.4.16.224/27 10.4.16.225 10.4.16.254 10.4.16.255 +1

  43. IPv4 Subnetting: Subnetting within a Natural Octet Boundary and Bringing it All Together

  44. Calculating the number subnets/hosts needed

  45. Subnetting IPv4 IPv4 Unicast Address /? Subnet portion Network portion Host portion 32 bits As we move from IPv4 to IPv6, we have to increasingly go through the exercise of trying to conserve and best utilize the limited IPv4 address space. Another reason to move to IPv6 as soon as possible!

  46. Calculating the number subnets/hosts needed 1 bit 2 possibilities 0 1 2 bits 4 possibilities 00 01 10 11 3 bits 8 possibilities 000 001 010 011 100 101 111 4 bits 16 possibilities 0000 1000 0001 1001 0010 1010 0011 1011 0100 1100 0101 1101 0111 1111

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

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

  49. Number of subnets Number of hosts per subnet 192.168.1. 0 0 0 0 0 0 0 0 255.255.255. 1 10 0 0 0 0 0 • 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 Network 6 host bits Host

  50. Number of hosts per subnet 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

More Related