1 / 56

Subnetting

Subnetting. IP Addresses. IP addresses identify hosts and network devices To send and receive messages on an IP network, every host must be assigned a unique 32-bit IP address IP address are displayed in dotted-decimal notation 192.168.1.1 Each of the 4 octets represents 8 bits

lenore
Télécharger la présentation

Subnetting

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

  2. IP Addresses • IP addresses identify hosts and network devices • To send and receive messages on an IP network, every host must be assigned a unique 32-bit IP address • IP address are displayed in dotted-decimal notation • 192.168.1.1 • Each of the 4 octets represents 8 bits • IP addresses are hierarchical • The network portion identifies the network that a host belongs to • The host portion identifies an individual host on a network

  3. Network Addresses • The network portion of the address, is used to represent the entire network • It represents a group of IP addresses that can be used on that network • The network address consists of the network field plus all 0’s in the host portion of the address • 192.168.18.00000000 • 192.168.18.0 • The Network address is not a usable host IP address • Network addresses are only used by routers to decide how to get packets to their destination

  4. Host vs. Network Portion Network Number Host Number

  5. Broadcast Address • A Broadcast Address is the address used to send messages to every host on the same network • A Broadcast Address consists of the Network address, plus all 1’s in the host field • The Broadcast address is NOT a USABLE host address and can not be assigned to a host

  6. Broadcast Addresses Network Address Broadcast Address • 120.0.0.0 120.255.255.255 • 170.50.0.0. 170.5.255.255 • 192.168.10 192.168.10.255

  7. Usable Host Addresses • As we just saw, the Network address and the Broadcast address are NOT usable host addresses • A usable host IP address is an IP address that: • Is not a Network Address (all 0’s in host field) • Is not a Broadcast Address (all 1’s in host field) • Is not a reserved Address (127 addresses) • Is a Class A, B or C address • Only a usable host IP address can be assigned to a host device

  8. Determining Usable Host Addresses Network Usable Hosts Broadcast 10.0.0.0 10.0.0.1 – 10.255.255.254 10.255.255.255 172.16.0.0 172.16.0.1-172.16.255.254 172.16.255.255 192.168.1.0 192.168.1.1-192.168.1.254 192.168.1.255

  9. Available Host Addresses • The number of available host addresses on a network can be calculated with the formula: 2 ^ host bits – 2 Network type Available Hosts • 255.0.0.0 2 ^ 24 -2 = 16, 277, 214 • 255.255.0.0 2 ^ 16- 2 = 65, 534 • 255.255.255.0 2 ^ 8 – 2 = 254 • The reason we always subtract 2 from the total host addresses to determine the available host addresses, is because the network address and broadcast address are NOT usable host address • Therefore, every network has 2 addresses that can not be assigned to hosts, the very 1st address (all 0’s in the host portion) and the very last address (all 1’s in the host portion)

  10. IP Address Classes • To create more possible network designations, the 32-bit address space was organized into five classes. • Class A, B, and C: Commercial networks • Class D and E: multicast and experimental • The class of a network is indicated by the values of the first few bits of the IP address, called the high-order bits.

  11. Commercial IP Address Classes • Class C addresses are usually assigned to small networks • Use 3 octets for the network and 1 for the hosts N.N.N.H • The default subnet mask is 24 bits: 255.255.255.0 • 2, 097, 150 (2 ^ 21 – 2) possible networks • 254 (2 ^ 8 – 2) available host addresses per network • Class B addresses are typically used for medium-sized networks • Use 2 octets for the network and 2 for the hosts N.N.H.H • The default subnet mask is 16 bits: 255.255.0.0 • 16, 382 (2 ^ 14 – 2) possible networks • 65, 534 (2 ^ 16 – 2) available host addresses per network • Class A addresses are typically assigned to large organizations. • Use 1 octet for the network and 3 for the hosts N.H.H.H • The default subnet mask is 8 bits: 255.0.0.0 • 126 (2 ^ 7 – 2) possible networks • 16, 777, 214 (2 ^ 24 – 2) available host addresses per network

  12. Class A • The first bit is always 0 • Addresses start with 0 to 126

  13. Class B • First two bits are always 1 and 0 • Addresses start with 128 to 191

  14. Class C • First three bits are always 1, 1 and 0 • Addresses start with 192 to 223

  15. The value of the 1st Octet • The class of an address can be determined by the value of the first octet • Each Class of IP Address can only begin with a certain value • Also notice, that there is a leading bit pattern that never changes for each class of addresses Class Decimal Value of 1st Octet Leading Bit value • Class A 1 - 1260 • Class B 128 – 19110 • Class C 192 – 223110 • Class D 224 – 2391110 • Class E 240 – 2551111

  16. 1 to 126

  17. Private Network Addresses Private Network Addresses

  18. The Loopback Address There are also private addresses that can be used for the diagnostic testing of devices. This type of private address is known as a loopback address. The class A, 127.0.0.0 network address, is reserved for loopback testing. The loopback IP address, 127.0.0.1 is used to test a NIC card to verify that it is sending and receiving signals.

  19. Subnet Masks • A subnet mask is a 32 bit address which tells devices which part of the IP address is network and which part is host • Let routers & hosts figure out which network or subnet an IP address belongs to • Subnet Masks contain: • all 1’s in the network field • all 0’s in the host field • Example Subnet Masks: • 255.255.255.0 • 255.255.0.0 • 255.255.255.128 • 255.254.0.0

  20. Subnet Mask Formats Subnet Masks can be written in 2 different formats: • Dotted Decimal format • 192.168.1.1 255.255.255.0 • Bit-Mask Format • 192.168.1.1 /24 • This indicates that there are 24 bits ( 24 1’s) in the network and subnetwork portion of the address (255.255.255.0)

  21. Default Subnet Masks • A default Subnet Mask is used when a network has NOT been subnetted • Default Subnet Masks • Class A: 255.0.0.0 OR /8 • 11111111.00000000.00000000.00000000 • 8 bits for network, 24 bits for host • Class B: 255.255.0.0 OR /16 • 11111111. 11111111.00000000.00000000 • 16 bits for network, 16 bits for host • Class C: 255.255.255.0 OR /24 • 11111111.11111111.1111111.00000000 • 24 bits for network, 8 bits for host

  22. Subnettting Subnetting… • Is dividing a network address into smaller divisions, or subnets • It allows you to divide a Class A, B or C network address into smaller subnetworks, with their own network addresses • Each subnet acts like its own LAN and is connected to its own router interface

  23. Class C Network: 192.168.1.0 • Addresses Available: • 192.168.1.0 - 192.168.1.255 (256 total) • 192.168.1.1 - 192.168.1.254 are usable (254 usable) • Goal: • Need 4 separate network addresses for 4 company LANs • Solution: • Subnet the Network Address • How? • 256 Addresses to work with • 256 / 4 Subnets needed = 64 Addresses per Subnet Subnet 1 Subnet 2 Subnet 3 Subnet 4 0 to 63 64 to 127 129 to 191 192 to 255

  24. Sample Subnetting Scheme Network Address Assigned: Subnets Created:

  25. Why Subnet a Network? • Provides better organization of Large Networks • more efficient assignment of addresses • breaks a network into smaller sections, which act like separate networks, without applying for additional Network addresses • Gives local administrators more control over their local networks • adds security between networks • Reduces the size of the broadcast domain • Helps minimize traffic loads by restricting broadcast traffic to smaller area

  26. Classful Subnetting • Routers see each network as a Single network with a single network number. • This keeps routing tables small • Each network is identified to routers by its network number • Ex. Given a local IP address of 192.168.10.14, the world outside your LAN sees only the advertised major network number of 192.168.10.0. • Only internal routers (within your organization) use the Subnet Addresses to route between your local networks • These routers use the subnet addresses to recognize different subnets within your whole network – all other routers ignore it!

  27. Subnet Address • A subnet address is the address that identifies a subnet (similar to a network address) • It contains: • All 1’s in the network and Subnet Fields • All 0’s in the Host fields • Subnet addresses are created by borrowing bits from the Host field of a network address and making them part of the network Field • All Hosts on a Subnetwork share a common subnetwork address- they are all on the same network or subnet

  28. Network Network Network Host S S H H H H H H Creating Subnets • To create Subnets: • Bits are Borrowed from the Host Field and made part of the network field • This Creates a Subnet Field in the IP address • 2 Bits are borrowed from the Host Field to make a Subnet Field, which becomes part of the Subnet Address

  29. Custom Subnet Masks • When a network has been subnetted, it no longer uses the Default Subnet Mask • A subnetted network must use a Custom Subnet Mask, which tells the router how many bits have been borrowed from the host portion of the address • The router must use a modified or custom subnet mask to distinguish the subnets from each other • The Custom Subnet Maskis created by borrowing bits from the host portion of the default subnet mask, and changing them from 0’s to 1’s

  30. Create a Custom Subnet Mask • Example: A Class A subnet mask, with 2 bits borrowed: • Default Mask = 255.0.0.0 • 2 bits borrowed = 255.11000000.0.0 • Custom Subnet Mask = 255.192.0.0 • Example: A class B subnet mask with 3 bits borrowed • Default Mask = 255.255.0.0 • 2 bits borrowed = 255.255.11100000.0 • Custom Subnet Mask = 255.255.224.0 • Example: A class C subnet mask with 4 bits borrowed: • Default Mask = 255.255.255.0 • 2 bits borrowed = 255.255.255.1111 • Custom Subnet Mask = 255.255.255.240

  31. Subnet Mask Bit Patterns Recognizing Bit Patterns: 10000000 = 128 11000000 = 192 11100000 = 224 11110000 = 240 11111000 = 248 11111100 = 252 11111110 = 254 11111111 = 255

  32. How many bits to borrow? • So how do you know how many bits to borrow to Subnet and to create the Custom Subnet Mask? • How many bits you borrow depends on How MANY SUBNETS you need to create! • Use these Formulas: • Total subnets created = 2 x • (x = # of bits borrowed) • Usable subnets created = 2 x -2 • (2 less than the total subnets)

  33. Subnetting Rules • A Minimum of 2 bits must be borrowed • A Minimum of 2 bits must be left over • You can’t use the 1st subnet created because it contains the network address for the entire network • You can’t use the last subnet created because it contains the broadcast address for the entire network

  34. Number of Subnets Created S S H H H H H H 2 Bits Borrowed= 22 = 4 Subnets, 2 usable S S S H H H H H 3 Bits Borrowed= 23 = 8 Subnets, 6 usable S S S S H H H H 4 Bits Borrowed = 24 = 16 Subnets, 14 usable

  35. Number of Subnets Created S S S S S H H H 5 Bits Borrowed = 25 = 32 Subnets, 30 usable S S S S S S H H 6 Bits Borrowed = 26 = 64 Subnets, 62 usable

  36. How Many Host Addresses per Subnet? • Often it is very important to know not only how MANY SUBNETS will be created, but also how MANY HOST ADDRESSES will be available to each subnet • How many host addresses will be available on each subnet is determine by how many bits are left in the host field of the address • Use these formulas to determine how many host addresses are available to each subnet: • Total host addresses per subnet = 2 y • y = the number of bits left over in the host portion of the address (bits not borrowed) • Usable host addresses per subnet = 2 y -2 • 2 less than the total

  37. How Many Host Addresses per Subnet? Network Network Network Host S S H H H H H H 6 Bits are left in the Host field of the address 2 Bits borrowed = 2 usable Subnets Host Addresses = 26 (64) per subnet Usable Addresses = 62 per subnet

  38. What about the other 2 Addresses? • Why is the usable number of host addresses 2 less than the total number of addresses available? • Each subnetwork has its own Subnetwork Address and Broadcast Address • Both of these addresses are Reserved and cannot be used! • The 1st IP address in each subnet becomes the Subnetwork Address • The Last IP address in each subnet becomes the Broadcast Address • Thus 2 addresses in each subnet cannot be used as host addresses

  39. The Trade-Off An unfortunate by-product of creating subnetworks is that the reserved network and broadcast numbers can not be used in each subnetwork. Every Subnet created creates 2 more unusable addresses in the network.

  40. Formulas to Remember! # Total Subnets Created = 2# Bits Borrowed # Usable Subnets Created = 2# Bits Borrowed - 2 # Total Hosts/Subnet = 2# Host Bits Remaining # Usable Hosts/Subnet = 2# Host Bits Remaining - 2

  41. Custom Subnet Mask Problem • The network 192.56.32.0 needs to be divided into 2 usable subnets, what is the custom subnet mask? • What class is the address? • What is the default subnet mask? • We need 2 usable subnets – how many bits do we need to borrow? • What is the Custom subnet mask? • 8 bits are in the host portion of address (00000000) • We need to borrow 2 bits from the left side of the host portion of the default subnet mask to create our subnet mask • NNNNNNNN.NNNNNNNN.NNNNNNNN.SShhhhhh • 11111111. 11111111. 11111111. 11000000 C 255.255.255.0 2 255.255.255.192

  42. Custom Subnet Mask Problems The network 177.56.0.0 needs 3 usable subnetworks, what would it’s custom subnet mask be? • What class is this address • What is the default subnet mask? • How many bits need to be borrowed? • What is the custom subnet mask? • 11111111.11111111.11100000.00000000 How many bits have been borrowed to for the address 205.10.7.16, with mask 255.255.255.240? How many usable subnets are there? • What class is this address? • What is the default subnet mask? • How many bits were borrowed to make this mask? • How many usable subnets will that create? B 255.255.0.0 3 (8 total, 6 usable) 255.255.224.0 C 255.255.255.0 4 14

  43. Subnetting • When we subnet a network, these are the things that must be determined: • Custom Subnet Mask • Subnet Address for each Subnet • The address that identifies the entire subnet – only used by routers (like a network address) • Contain’s all 1’s in the network/subnet portion of the address and all 0’s in the host portion of the address • The 1st address in each Subnet range • Broadcast Address for each Subnet • The address used to send messages to all hosts in the subnet • The last address in each subnet range • Contains all 1’s in the host portion of the Subnet Address • Usable Host addresses for each subnet • All the addresses in each subnet that can be assigned to hosts • We now know how to create the Custom Subnet Mask, but how do we determine the Subnet Information?

  44. Subnetting • These are the steps we use to Subnet: • Determine what class the Network address is • Determine the Default Subnet Mask • Determine How many bits need to be borrowed to create the needed # of subnets • Create the Custom Subnet Mask • Determine the Subnet Addresses • Determine the Broadcast Address for each subnet • Determine the usable host addresses for each subnet

  45. Subnetting Problem The network 192.168.10.0 needs 6 usable subnets • Find the subnetwork address for each subnet • Find the ranges usable host IP addresses for each subnet • Find the broadcast address for each subnet • What is the Class? • What is the Default Subnet Mask? • How many bits need to be borrowed? • What is the custom Subnet Mask? C 255.255.255.0 • Need 6 usable subnets. • 3 bits = 6 usable subnets 11111111.11111111.11111111.11100000 = 255.255.255. 224

  46. Subnetting Problem • Determine the Subnet Addresses • Use binary counting to begin converting the 0’s in the subnet portion to 1’s (starting from the last bit borrowed) 192.168.10.SSSHHHHH 192.168.10.000|00000 – 192.168.10.0 - 1st (not usable) 192.168.10.001|00000 –192.168.10.32 – 2nd (1st usable) 192.168.10.010|00000 –192.168.10.64 – 3rd (2nd usable) 192.168.10.011|00000 – 192.168.10.96 – 4th (3rd usable) 192.168.10.100|00000 – 192.168.10.128 – 5th (4th usable) 192.168.10.101|00000 – 192.168.10.160– 6th (5th usable) 192.168.10.110|00000 – 192.168.10.192– 7th (6th usable) 192.168.10.111|00000 – 192.168.10.224 – 8th (not usable)

  47. Subnetting Problem • Determine the Broadcast Address for each subnet • Determine the usable host addresses for each subnet Usable Subnet Subnet Address Usable Hosts Broadcast Address

  48. Class B Subnetting • What class is this address? • What is the default subnet mask? • How many bits need to be borrowed to get 4 usable subnets? • What is the custom subnet mask? The network 177.56.45.13 needs 7 usable subnetworks – What is the Subnetwork Address, Broadcast Address and Host Range for the 3rd subnet B 255.255.0.0 4 bits 23= 6 usable subnets 255.255.11110000.0 255.255.240.0

  49. Determine Subnet Addresses Original Network: 177.56.hhhhhhhh.hhhhhhhh Subnetted Network: 177.56.SSSShhhh.hhhhhhhh 177.56.0000|0000.0 – 1st subnet, not usable 177.56.0001|0000.0– 177.56.16.0 – 2nd subnet, 1st usable 177.56.0010|0000.0 – 177.56.32.0 – 3rd subnet, 2nd usable 177.56.0011|0000.0 – 177.96.48.0 – 4th subnet, 3rd usable 177.56.0100|0000.0 – 177.56.64.0 – 5th subnet, 4th usable 177.56.0101|0000.0 – 177.56.80.0 – 6th subnet, 5th usable 177.56.0110|0000.0 – 177.56.96.0 – 7th subnet, 6th usable 177.56.0111|0000.0 – 177.56.112.0 – 8th subnet, 7th usable ========================================= 177.56.1111|0000.0 – 177.56.240.0- last subnet, not usable NOTE: Do you see a pattern above?The place value of the last subnetted bit is also the increment by which the subnetwork numbers will increase!!!!

  50. Subnetting Shortcut • The value of the Subnet addresses increases by the value of the LAST BIT BORROWED • The place value of the last subnetted bit is also the increment by which the subnetwork numbers will increase!!!! • Ex. Subnet Mask 255.255.255.240 • Borrow 4 bits: SSSS|hhhh • The place value of the last bit borrowed = 16 • Subnetwork numbers = .0, .16, .32, .48, .64, .80, etc.

More Related