1 / 87

CIS 81 Fundamentals of Networking Chapter 7: IP Addressing Part 1 – IPv4

CIS 81 Fundamentals of Networking Chapter 7: IP Addressing Part 1 – IPv4. CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College graziani@cabrillo.edu Fall 2015. Number Systems and the Binary Number System. IPv4 Addresses.

bretd
Download Presentation

CIS 81 Fundamentals of Networking Chapter 7: IP Addressing Part 1 – IPv4

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 7: IP AddressingPart 1 – IPv4 CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College graziani@cabrillo.edu Fall 2015

  2. Number Systems and the Binary Number System

  3. IPv4 Addresses • We use dotted notation (or dotted decimal notation) to represent the value of each byte (octet) of the IP address in decimal. 10101001 11000111 01000101 10001001 169 . 199 . 69 . 137 • IPv4 Addresses are 32 bit addresses: 1010100111000111010001011000100 10101001 11000111 01000101 10001001

  4. IPv4 Addresses 00000000 . 00000000 . 00000000 . 00000000 0 . 0 . 0 . 0 11111111 . 11111111 . 11111111 . 11111111 255 . 255 . 255 . 255 • What are the range of addresses? 00000000000000000000000000000000 … 11111111111111111111111111111111

  5. Base 10 (Decimal) Number System Digits (10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Number of: 104 103 102 101 100 10,000’s1,000’s100’s10’s1’s 1,309 1 3 0 9 99 9 9 100 1 0 0

  6. Number System Rules 1. All digits start with 0 2. A Base-n number system has n number of digits: • Decimal: Base-10 has 10 digits • Binary: Base-2 has 2 digits • Hexadecimal: Base-16 has 16 digits 3. The first column is always the number of 1’s • Each of the following columns is n times the previous column (n = Base-n) • Base 10: 10,000 1,000 100 10 1 • Base 2: 16 8 4 2 1 • Base 16: 65,536 4,096 256 16 1

  7. Digits (2): 0, 1 Number of: 27 ___ ___ ___ 23 22 21 20 128’s8’s4’s2’s1’s Dec. 2 1 0 10 1 0 1 0 17 70 130 255

  8. Digits (2): 0, 1 Number of: 2726 25 24 23 22 21 20 128’s64’s32’s16’s8’s4’s2’s1’s Dec. 2 1 0 10 1 0 1 0 17 1 0 0 0 1 70 1 0 0 0 1 1 0 130 1 0 0 0 0 0 1 0 255 1 1 1 1 1 1 1 1

  9. Digits (2): 0, 1 Number of: 27 26 25 24 23 22 21 20 128’s64’s32’s16’s8’s4’s2’s1’s Dec. 1 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 172 192

  10. Digits (2): 0, 1 Number of: 27 26 25 24 23 22 21 20 128’s64’s32’s16’s8’s4’s2’s1’s Dec. 70 1 0 0 0 1 1 0 40 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 128 1 0 0 0 0 0 0 0 172 1 0 1 0 1 1 0 0 192 1 1 0 0 0 0 0 0

  11. IP Addressing Structure • We look at IP addresses using the “dotted decimal format” but network devices only understand the binary format. 10101000 . 11000000 . 00000001 . 00000101

  12. Dotted Decimal Format

  13. Decimal to Binary Assignment

  14. Subnet Mask

  15. Subnet Masks 11111111111111110000000000000000 • An IP address is a hierarchical address that is made up of two parts: • A network portion • A host portion. • Subnet Mask • Used to define the: • Network portion • Host portion • 32 bits • Contiguous set of 1’s followed by a contiguous set of 0’s • 1’s: Network portion • 0’s: Host portion

  16. Dividing the Network and Host Portions 11111111.11111111.00000000.00000000 Dotted decimal: 255 . 255 . 0 . 0 Slash notation: /16 • Expressed as: • Dotted decimal • Ex: 255.255.0.0 • Slash notation or prefix length • /16 (the number of one bits)

  17. Hierarchical Network Addressing C:\Users\Admin> ipconfig Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : cambrian.cambrianc.on.ca Link-local IPv6 Address . . . . . : fe80::b572:c6c:f983:cadc%11 IPv4 Address. . . . . . . . . . . : 192.168.11.99 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.11.1 C:\Users\Admin> • The IPv4 address with a subnet mask identifies: • The network portion • The host portion

  18. Subnet Mask: 192.168.11.10 255.255.255.0 168 192 11 10 255 0 255 255 11111111 11111111 11111111 00000000 Network Portion Host Portion • The subnet mask identifies which part of the IP address refers to the network. 168 192 11 0 • The prefix length is the number of bits set to 1 in the subnet mask. • It is written in “slash notation”, a “/” followed by the number of bits set to 1. • For example: • IP address: 192.168.11.10 255.255.255.0 • Is the same as: 192.168.11.10 /24

  19. Valid Subnet Mask Values 128 64 16 32 Decimal Value 8 4 1 2 1 0 128 0 0 0 0 0 0 1 1 0 0 0 0 0 0 192 1 1 0 1 0 0 0 0 224 1 1 1 1 0 0 0 0 240 1 1 1 1 248 1 0 0 0 252 1 1 1 1 1 1 0 0 1 1 1 1 1 1 254 0 1 1 1 1 1 1 1 1 1 255

  20. Subnet Masks • So how do hosts figure out which part of the address is the network portion? • Hosts AND the IPv4 address and the subnet mask. • “1” bits refer to the network portion. • “0” bits refer to the host portion. • Hosts actually use a the Boolean “AND” operation to accomplish this task. • This tells them what network they belong to.

  21. 1“ANDed” with 1 = 1 0“ANDed” with 1 = 0 1“ANDed” with 0 = 0 0“ANDed” with 0 = 0 192.168.10.1 /24 Boolean AND Rules IP Address 192 168 10 1 IP Address 1100 0000 1010 1000 0000 1010 0000 0001 Subnet Mask 1111 1111 1111 1111 1111 1111 0000 0000 Network Portion • 0“ANDed” with anything = 0 1100 0000 1010 1000 0000 1010 0000 0000 192 168 10 0

  22. IPv4 AND Subnet Mask >> Network Address

  23. A B 192.168.1.100 255.255.255.0 192.168.2.101 255.255.255.0 Source IPv4 192.168.1.100 Destination IPv4 192.168.2.101 • How does the host know if the destination IPv4 address is on it’s network or another network?

  24. Destination MAC Address? Same network? Same Network: Destination IP Address’s MAC Address • The Destination MAC Address will always be one of two addresses. • Same network: The MAC address associated with the device’s Destination IP Address. • Different network: The MAC address associated with the IP Address of the Default Gateway. Different Network: The Default Gateway’s MAC Address

  25. Destination MAC Address? Same network? So, here is the big question: • How do does the sending host know if the Source IP Address and Destination IP Address are on the same network?

  26. Destination MAC Address? 192.168.1.10 192.168.1.11 Same network? AND AND My Network = 192.168.1.0 Destination Network = 192.168.1.0 Same network? YES!

  27. Destination MAC Address? ? 192.168.1.10 192.168.1.11 Same network PC-A’s ARP Cache IPv4 AddressMAC Address Check ARP Cache for the destination IPv4 address and a MAC address. Not there? ARP Request

  28. Destination MAC Address? Same network? Same Network: Destination IP Address’s MAC Address • The Destination MAC Address will always be one of two addresses. • Same network: The MAC address associated with the device’s Destination IP Address. • Different network: The MAC address associated with the IP Address of the Default Gateway. Different Network: The Default Gateway’s MAC Address

  29. Review: Destination MAC Address? 192.168.1.100 192.168.2.101 Same network? AND AND My Network = 192.168.1.0 Destination Network = 192.168.2.0 Same network? NO!

  30. Review: Destination MAC Address? ? 192.168.1.100 192.168.2.101 Different networks PC-A’s ARP Cache IPv4 AddressMAC Address Different Network: Need the Default Gateway’s MAC Address Check ARP Cache for IPv4 address of the default gateway and a MAC address. Not there? ARP Request

  31. I only know what I know

  32. Types of Addresses in a Network 192.168.10.0 /24 192.168.10.10 /24 192.168.10.255 /24  Network Address  Host Address  Broadcast Address

  33. Network Address 10.1.1.0 /24 • All devices in the network have the same network bits. • The network address has all 0 bits in the host portion.

  34. Broadcast Address 10.1.1.255 /24 • A broadcast address is used to send data to all hosts in the network. • The broadcast address has all 1 bits in the host portion.

  35. Bringing it all together • Convert these addresses and masks to Binary (to be used later) Network: 172.0.0.0 10101100.00000000.00000000.00000000 Mask: 255.0.0.0 11111111.00000000.00000000.00000000 172.255.255.255 10101100.11111111.11111111.11111111 Broadcast Address Network: 172.16.0.0 10101100.00010000.00000000.00000000 Mask: 255.255.0.0 11111111.11111111.00000000.00000000 172.16.255.255 10101100.00010000.11111111.11111111 Broadcast Address

  36. Bringing it all together • Convert these addresses and masks to Binary (to be used later) Network: 192.168.1.0 11000000.10101000.00000001.00000000 Mask: 255.255.255.0 11111111.11111111.11111111.00000000 Bcst: 192.168.1.255 11000000.10101000.00000001.11111111 Network: 192.168.0.0 11000000.10101000.00000000.00000000 Mask: 255.255.0.0 11111111.11111111.00000000.00000000 Bcst: 192.168.255.255 11000000.10101000.11111111.11111111 Network: 192.168.0.0 11000000.10101000.00000000.00000000 Mask: 255.255.255.0 11111111.11111111.11111111.00000000 Bcst: 192.168.0.255 11000000.10101000.00000000.11111111

  37. Bringing it all together • Convert these addresses and masks to Binary (to be used later) Network: 10.1.1.0 00001010.00000001.00000001.00000000 Mask: /24 11111111.11111111.11111111.00000000 Bcast: 10.1.1.255 00001010.00000001.00000001.11111111 Network: 10.2.0.0 00001010.00000010.00000000.00000000 Mask: /16 11111111.11111111.00000000.00000000 Bst:10.2.255.255 00001010.00000010.11111111.11111111 Network 10.0.0.0 00001010.00000000.00000000.00000000 Mask: /16 11111111.11111111.00000000.00000000 Bcast10.0.255.255 00001010.00000000.11111111.11111111

  38. Host Address 10.1.1.10 /24 • It is important to identify the first host address and the last host address. • Hosts within a network can be assigned IP addresses within this range. • In IPv4 addresses, host addresses are the addresses between the network address and the broadcast address devices in that network. • The host address does not have all 0 bits or all 1 bits in the host portion.

  39. 1st Host Address • NOTE: • It is common in many addressing schemes to use the first host address for the router or default gateway address. • The host portion of the first host address will contain all 0 bits with a 1 bit for the lowest order or right-most bit. (“All 0’s and a 1.”) • This address is always one greater than the network address. • For example the first host address is 10.1.1.1 /24.

  40. Last Host Address • The host portion of the last host address will contain all 1 bits with a 0 bit for the lowest order or right-most bit. (“All 1’s and a 0.”) • This address is always one less than the broadcast address. • For example, the last host address is 10.1.1.254.

  41. Range of hosts – Your Turn! • Host Addresses in binary 172.0.0.0 (net) 10101100.00000000.00000000.00000000 255.0.0.0 (SM) 11111111.00000000.00000000.00000000 172.0.0.1 10101100.00000000.00000000.00000001 172.255.255.254 10101100.11111111.11111111.11111110 172.255.255.255 10101100.11111111.11111111.11111111 (broadcast) 172.16.0.0 (net) 10101100.00010000.00000000.00000000 255.255.0.0 (SM) 11111111.11111111.00000000.00000000 172.16.0.1 10101100.00010000.00000000.00000001 172.16.255.254 10101100.00010000.11111111.11111110 172.16.255.255 10101100.00010000.11111111.11111111 (broadcast)

  42. Range of hosts – Your Turn! • Host Addresses in binary 192.168.1.0 (net) 11000000.10101000.00000001.00000000 255.255.255.0(SM) 11111111.11111111.11111111.00000000 192.168.1.1 11000000.10101000.00000001.00000001 192.168.1.254 11000000.10101000.00000001.11111110 192.168.1.255 11000000.10101000.00000001.11111111 (broadcast) 192.168.0.0 (net) 11000000.10101000.00000000.00000000 255.255.0.0 (SM) 11111111.11111111.00000000.00000000 192.168.0.1 11000000.10101000.00000000.00000001 192.168.255.254 11000000.10101000.11111111.11111110 192.168.255.255 11000000.10101000.11111111.11111111 (broadcast)

  43. Range of hosts – Your Turn! • Host Addresses in binary 192.168.0.0 (net) 11000000.10101000.00000000.00000000 255.255.255.0(SM) 11111111.11111111.11111111.00000000 192.168.0.1 11000000.10101000.00000000.00000001 192.168.0.254 11000000.10101000.00000000.11111110 192.168.0.255 11000000.10101000.00000000.11111111 (broadcast)

  44. Range of hosts – The rest… Host Addresses in binary 10.1.1.0 (net) 00001010.00000001.00000001.00000000 /24 (SM) 11111111.11111111.11111111.00000000 10.1.1.1 00001010.00000001.00000001.00000001 10.1.1.254 00001010.00000001.00000001.11111110 10.1.1.255 00001010.00000001.00000001.11111111 (broadcast) 10.2.0.0 (net) 00001010.00000010.00000000.00000000 /16 (SM) 11111111.11111111.00000000.00000000 10.2.0.1 00001010.00000010.00000000.00000001 10.2.255.254 00001010.00000010.11111111.11111110 10.2.255.255 00001010.00000010.11111111.11111111 (broadcast)

  45. Range of hosts – The rest… • Host Addresses in binary 10.0.0.0 (net) 00001010.00000000.00000000.00000000 /16 (SM) 11111111.11111111.00000000.00000000 10.0.0.1 00001010.00000000.00000000.00000001 10.0.255.254 00001010.00000000.11111111.11111110 10.0.255.255 00001010.00000000.11111111.11111111 (broadcast)

  46. Subnet Masks: Non-Natural Boundaries • Subnet masks do not have to end on natural octet boundaries 172.1.16.0 10101100.00000001.00010000.00000000 255.255.240.0 11111111.11111111.11110000.00000000 172.1.16.1 10101100.00000001.00010000.00000001 … 172.1.31.254 10101100.00000001.00011111.11111110 172.1.31.255 10101100.00000001.00011111.11111111 (broadcast) Number of hosts: 212 – 2 = 4,096 – 2 = 4,094 hosts

  47. Non-natural boundary masks Host Addresses in binary 10.1.16.0 (net) 00001010.00000001.00010000.00000000 /20 (SM) 11111111.11111111.11110000.00000000 10.1.16.1 00001010.00000001.00010000.00000001 10.1.31.254 00001010.00000001.00011111.11111110 10.1.31.255 00001010.00000001.00011111.11111111 (broadcast) 10.2.0.32 (net) 00001010.00000010.00000000.00100000 /28 (SM) 11111111.11111111.11111111.11110000 10.2.0.33 00001010.00000010.00000000.00100001 10.2.0.46 00001010.00000010.00000000.00101110 10.2.255.47 00001010.00000010.00000000.00101111 (broadcast)

  48. Practice!

More Related