TCP/IP Basics  Chapter 7
Objectives• Describe how the Internet Protocol works• Explain CIDR and subnetting• Describe the functions of static and dy...
Overview
Moving up the OSI Layers• Chapters 3 through 6 detailed Layers 1 and 2• Ethernet network technology• Now explore the softw...
Three Parts to Chapter 7• IP in Depth• CIDR and Subnetting• Using IP Addresses
IP in Depth
IP in Depth• TCP/IP suite supports both simple and  complex networks  – Small LAN  – Multiple LANs interconnected into a WAN
• TCP/IP on LAN over Ethernet  – On small network, sending computer broadcasts    using MAC address ff-ff-ff-ff-ff-ff to o...
Figure 7.2 PC broadcasting for a MAC address
Figure 7.3 Broadcasting won’t work for the            entire Internet
• TCP/IP on LAN over Ethernet  – IP addressing overcomes limits of Ethernet MAC    addresses     • Unique IP address per h...
• IP Addresses (IPv4 only]  – 32-bit value     • Example: 11000000101010000000010000000010     • Broken into four groups o...
• Binary to Decimal Conversion     Binary        Decimal       Binary     Decimal    00000000           0         11111000...
• IP Addresses (IPv4 only]  – Converted:    11000000101010000000010000000010    is displayed as 192.168.4.2 in dotted deci...
• Using a Calculator for conversion  – Decimal to binary     • Enter value in decimal view     • Switch to binary view to ...
Figure 7.4 Macintosh OS X Calculator in           Programmer mode
Figure 7.5 Converting decimal to binary with            Windows Vista’s Calculator
• Every MAC address must be unique• Every IP address must be unique
Figure 7.6 Small network with both IP            and MAC addresses
• Utilities for displaying IP and MAC addresses  – Every OS has at least one GUI tool     • Mac OS X system’s Network util...
Figure 7.7 Macintosh OS X Network utility
Figure 7.8 ipconfig/all
Figure 7.9 IFCONFIG in Ubuntu
• IP Addresses in Action  – IP must do three things     1. Give each LAN its own identifier     2. Allow routers connectin...
1. IP must give each LAN its own identifier  – Network IDs     • All computers on same LAN must have same network ID     •...
Figure 7.10 IP addresses for a LAN
2. IP must allow routers connecting LANs to use   network identifiers to send packets to the   right network  – Interconne...
Figure 7.11 LAN with router
– Interconnecting (cont.)   • Router uses a built-in router table      – Uses this to determine where to send packets     ...
Figure 7.12 Router diagram
Figure 7.13 LAN, router, and the Internet
– Interconnecting (cont.)   • Limitations of using 192.168.5.0 as host ID      – Limited to 192.168.5.1 through 192.168.5....
3. IP must give each computer a way to   understand when a packet destination   is local or on the WAN  – Subnet Mask     ...
Figure 7.14 The three amigos, separated by            walls or miles
Figure 7.15 Sending a packet remotely
– Subnet Mask (cont.)  • Line up an IP address with a corresponding subnet mask    in binary     – Portion of IP address t...
Dotted         Binary             DecimalIP address  192.168.5.23    11000000.10101000.00000101.00010111Subnet mask 255.25...
– Subnet Mask (cont.)  • Sending computer compares the destination IP address    to its own IP address using the subnet ma...
Figure 7.16 Comparing addresses
– Subnet Mask (cont.)  • When the destination address is local, the sending    computer sends out an Address Resolution Pr...
Figure 7.17 Sending an ARP
Figure 7.19 Computer B responds
– Subnet Mask (cont.)  • When the sending computer discovers that the    destination address does not have the same networ...
Figure 7.20 Comparing addresses again
Figure 7.21 Sending an ARP to the gateway
– Subnet Mask (cont.)    • Some valid subnet masks11111111111111111111111100000000 = 255.255.255.0111111111111111100000000...
– Subnet Mask (cont.)   • An IP address followed by the / and a     number describes the IP and the     address in one sta...
– Subnet Mask (cont.)  • Network administrators must enter correct IP address    and subnet mask when configuring a networ...
– Class IDs   • No two devices on the Internet can share the same IP     address   • Internet Assigned Number Authority (I...
First Decimal                               Hosts per          Value (range) Addresses                     Network IDClass...
– Class IDs – More about Class D and E   • Three ways to send a packet      – Broadcast to every computer on the LAN      ...
– Class IDs – The state of IP address   • IP class licenses were allocated too generously at first   • Unallocated IP addr...
CIDR and Subnetting
• CIDR and Subnetting Overview  – CIDR based on subnetting  – Subnetting chops up a single class of IP addresses    into m...
• Subnetting  – More efficient use of IP addresses than class    licenses  – Enables separation of networks for security  ...
• Subnetting the Internet Café  – 50 computers     • 40 public computers     • 10 back office computers     • 10 wireless ...
Figure 7.22 Layout of the network
• Subnetting the Internet Café (cont.)  – Begin with the given subnet mask and move it to    the right until you have the ...
• Subnetting the Internet Café (cont.)  – 192.168.4/24  – Change a zero to a one in the subnet mask  – /24 becomes a /25 s...
• Calculating Hosts  – Hosts on a /24 network  – 192.168.4.1 to 192.168.4.254 = 254 hosts  – Calculate in binary     • In ...
• Calculating Hosts (cont.)  – Hosts on a /16 network     • In a /16 network 16 zeroes are part of the host ID     • 00000...
• Calculating Hosts (cont.)  – Hosts on a /26 network     • In a /26 network 6 zeroes are part of the host ID     • 000001...
• Your First Subnet  – Convert the 192.168.4/24 net ID into three    network IDs  – Write out the subnet mask in binary  –...
Figure 7.23 Step 1 in subnetting
• Your First Subnet (cont.)  – Draw a second line one digit to the right  – Three areas (a Mike Trick, not official terms)...
Figure 7.24 Organizing the subnet mask
• Your First Subnet (cont.)  – A subnet mask is always 32 binary digits long  – A string of ones followed by a string of z...
• Your First Subnet (cont.)  – Get used to the idea of subnet masks that use    more than 255s and 0s (in dotted decimal f...
• Rules for Calculating Subnets  1. Starting with a beginning subnet mask, you     extend the subnet extension until you h...
• Calculating Subnets (cont.)  – Rules 2 and 3 explained     •   Adding just a single digit to the beginning subnet mask  ...
Figure 7.25 Organizing the subnet mask
Figure 7.26 Single-digit network ID extensions            are not allowed
• Calculating Subnets (cont.)  – Subnet /24 to /26  – Adds two digits, creating four new network IDs    (two of which are ...
Figure 7.27 Creating the new network IDs
Figure 7.28 New network ID address ranges
• Calculating Subnets (cont.)  – The new network IDs in decimal    192.168.4.64/26         hosts = 192.168.4.65 – 192.168....
Figure 7.29 Two networks using the two network IDs
• Calculating Subnets (cont.)  – The Internet Café needs three subnets  – How large a network ID extension is needed?  – T...
• Calculating Subnets (cont.)  – Create a /27 subnet by moving the NE over three    digits  – Calculate the host address r...
Figure 7.30 Moving the network ID extension           three digits
Figure 7.31 Two of the six network ID address ranges
Manual Binary to Dotted Decimal Conversion•                                                 Write bit values in decimal fr...
• Manual Dotted Decimal to Binary Conversion  – Start with bit values beginning with 128  – Place decimal value above the ...
• Manual Dotted Decimal to Binary Conversion  – Place the remainder above the next bit value that    it exceeds (Place a z...
• CIDR: Subnetting in the Real World  – Two situations in which subnetting takes place    •   ISPs (Large ones)        –  ...
• CIDR: Subnetting in the Real World (cont.)  – Why learn subnetting?     •   CompTIA Network+ exam requires it     •   Th...
Using IP Addresses
• Overview of Using IP Addresses  – Assigning IP addresses to computers  – Specialty IP addresses
• Assigning an IP address, subnet mask, and  default gateway  – Static addressing    •   Type in all the information  – Dy...
• Static IP Addresses  – Manually type in all IP information     • What are you typing in?     • Where do you type it?  – ...
Figure 7.32 A small network
• Static IP Addresses (cont.)  – Network techs’ set of principles     • Give the default gateway the first host IP address...
• Static IP Addresses (cont.)  – Give each computer an IP address, subnet mask,    and default gateway     • In Windows us...
Figure 7.33 Entering static IP information in  Windows Internet Protocol Version 4 (TCP/IPv4)  Properties
Figure 7.34 Entering static IP information in            the OS X Network utility
Figure 7.35 IFCONFIG command to set            static IP address
Figure 7.36 Ubuntu’s Network Configuration utility
• Static IP Addresses (cont.)  – After adding IP information to at least two systems,    verify with the PING command  – S...
Figure 7.37 Two PINGs (successful PING on top,            unsuccessful PING on bottom)
• Dynamic IP Addressing  – Dynamic Host Configuration Protocol (DHCP)     • More popular form of dynamic IP addressing    ...
Figure 7.38 Setting up for DHCP
• How DHCP Works  – DHCP Server is configured to pass out IP addresses     • Scope = range of IP addresses     • Subnet ma...
• How DHCP Works (cont.)  – When DHCP client boots up it broadcasts a    DHCP discovery packet    • Discovery packet asks ...
Figure 7.39 Computer sending out a DHCP            discovery message
Figure 7.40 DHCP server sending DHCP offer
Figure 7.41 DHCP request and DHCP acknowledge
• How DHCP Works (cont.)  – DHCP Lease    • Set for a fixed amount of time    • Usually 5 to 8 days    • At the end of the...
• Living with DHCP  – Possible problems     • DHCP client tries to get a DHCP address and fails     • Symptoms        – OS...
Figure 7.42 DHCP error in Ubuntu Linux
• Living with DHCP  – Automatic Private IP Addressing (APIPA)     • Addresses in the 169.254/16 network ID that a DHCP    ...
• Living with DHCP  – Reestablish the lease manually  – In Windows     • Ipconfig/renew  – On a Macintosh     • Go to Syst...
Figure 7.43 Network utility in System Preferences
• Special IP Addresses  – Loopback = 127.0.0.1     • Use to send packets from your NIC to itself     • Test NIC’s capabili...
Upcoming SlideShare
Loading in...5
×

Networking Chapter 7

745
-1

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
745
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
46
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Teaching Tip In a tour de force, the author used less than 250 words on Page 137 to describe two decades of network protocol history and introduce two Key Terms (protocol and protocol suite). This reflects the new CompTIA exam objectives’ focus on the most important protocol suite, TCP/IP. The other protocol suites are just history. IP works at Layer 3 (Network) This chapter deals with IP addressing (IPv4 now – IPv6 in Chapter 13).
  • Teaching Tip Point out that the use of the term IP in this chapter refers to IPv4, unless otherwise stated.
  • This entire chapter focuses on IPv4
  • The Windows GUI utility, Internet Protocol Version 4 (TCP/IPv4) , will be discussed later in the Chapter.
  • Yes, this is at the Windows command prompt! The CMD window has been modified to have a white background and black text. It is a nice touch, but students might be a bit confused. This is an excellent opportunity to tell them that they will often encounter customized desktops, and they should learn to find and recognize their favorite tools regardless of how they appear.
  • Teaching Tip The three “jobs” of IP listed above are detailed in the next three sections titled Network IDs, Interconnecting, and Subnet Mask.
  • Teaching Tip The author is building up to explaining network mask, so avoid going into detail at this point. However, be careful how you explain things so far. The book says that you cannot have an address that ends with a zero, but the rule being applied here is that the Host ID cannot be all one’s, nor can it be all zeroes – in binary . This all depends on the masking, so proceed carefully. All will be revealed.
  • Note: This is why default gateway is part of IP configuration.
  • While the above example is fine for teaching this concept, later in the chapter (after page 153), come back to this example and have the students explain why a /25 subnet would not be used. See rule #3 on Page 153 in the Chapter: You cannot have a single-character network ID extension. You always start by moving the subnet at least two digits.
  • Teaching Tip There is a small error in Figure 7.31 on Page 155. The last digit of the next-to-the-last line should be a zero. This could be a teaching opportunity: ask the students to discover the error.
  • There are several ways to access the Properties of Internet Protocol Version 4 (TCP/IPv4). Vista instructions for just one way to get there: open the Start Menu , right click on Network and select Properties . In the Network and Sharing Center select Manage network connections . Right-click Local Area Connection and select Properties . If the User Account Control window pops up, select Continue . In the Local Area Connection Properties dialog box scroll (if necessary) to Internet Protocol Version 4 (TCP/IPv4) and carefully click on the words (not the check box). Click the Properties button. This will show the TCP/IPv4 Properties.
  • Even though by convention we use 127.0.0.1 as the loopback address, the entire 127.0.0.0/8 subnet is reserved for loopback! You can use any address in the 127.0.0.0/8 subnet as a loopback address
  • Networking Chapter 7

    1. 1. TCP/IP Basics Chapter 7
    2. 2. Objectives• Describe how the Internet Protocol works• Explain CIDR and subnetting• Describe the functions of static and dynamic IP addresses
    3. 3. Overview
    4. 4. Moving up the OSI Layers• Chapters 3 through 6 detailed Layers 1 and 2• Ethernet network technology• Now explore the software side of networking – Individual rule is a protocol – A protocol suite is a set of rules• Begin with Internet Protocol (IP) of TCP/IP
    5. 5. Three Parts to Chapter 7• IP in Depth• CIDR and Subnetting• Using IP Addresses
    6. 6. IP in Depth
    7. 7. IP in Depth• TCP/IP suite supports both simple and complex networks – Small LAN – Multiple LANs interconnected into a WAN
    8. 8. • TCP/IP on LAN over Ethernet – On small network, sending computer broadcasts using MAC address ff-ff-ff-ff-ff-ff to obtain recipient’s MAC address – Broadcasting is disastrous to a large network
    9. 9. Figure 7.2 PC broadcasting for a MAC address
    10. 10. Figure 7.3 Broadcasting won’t work for the entire Internet
    11. 11. • TCP/IP on LAN over Ethernet – IP addressing overcomes limits of Ethernet MAC addresses • Unique IP address per host • Unique address per logical network • Communicate between LANs without broadcasts
    12. 12. • IP Addresses (IPv4 only] – 32-bit value • Example: 11000000101010000000010000000010 • Broken into four groups of eight 11000000.10101000.00000100.00000010 • Each 8-bit value convertsed into a decimal number between 0 and 255
    13. 13. • Binary to Decimal Conversion Binary Decimal Binary Decimal 00000000 0 11111000 248 00000001 1 11111001 249 00000010 2 11111010 250 00000011 3 11111011 251 00000100 4 11111100 252 00000101 5 11111101 253 00000110 6 11111110 254 00000111 7 11111111 255 00001000 8 skip a bunch skip a bunch
    14. 14. • IP Addresses (IPv4 only] – Converted: 11000000101010000000010000000010 is displayed as 192.168.4.2 in dotted decimal notation (dotted-octet numbering system) – Know how to convert dotted decimal to binary and back • Every OS has a calculator
    15. 15. • Using a Calculator for conversion – Decimal to binary • Enter value in decimal view • Switch to binary view to convert value • Leading zeroes do not display in Calculator • Leading zeroes important when working with IP addresses
    16. 16. Figure 7.4 Macintosh OS X Calculator in Programmer mode
    17. 17. Figure 7.5 Converting decimal to binary with Windows Vista’s Calculator
    18. 18. • Every MAC address must be unique• Every IP address must be unique
    19. 19. Figure 7.6 Small network with both IP and MAC addresses
    20. 20. • Utilities for displaying IP and MAC addresses – Every OS has at least one GUI tool • Mac OS X system’s Network utility • Windows Local Area Connection Properties – Every OS has a command-line utility • Windows has IPCONFIG • UNIX/Linux/Mac use IFCONFIG
    21. 21. Figure 7.7 Macintosh OS X Network utility
    22. 22. Figure 7.8 ipconfig/all
    23. 23. Figure 7.9 IFCONFIG in Ubuntu
    24. 24. • IP Addresses in Action – IP must do three things 1. Give each LAN its own identifier 2. Allow routers connecting LANs to use network identifiers to send packets to the right network 3. Give each computer a way to understand when a packet is intended for a computer on the local LAN or for a computer on the WAN
    25. 25. 1. IP must give each LAN its own identifier – Network IDs • All computers on same LAN must have same network ID • Each computer on same LAN must have a unique host ID • Example: 192.168.5.x represents addresses in Figure 7.10 – Network address of this network is 192.168.5.0 (assuming a 24- bit mask) – Network ID plus Host ID = one IP address.
    26. 26. Figure 7.10 IP addresses for a LAN
    27. 27. 2. IP must allow routers connecting LANs to use network identifiers to send packets to the right network – Interconnecting • Requires a router connection • Router requires a network connection and IP address on each LAN – IP address of router’s connection to a LAN is the default gateway for that LAN – Network administrators often give lowest host address in the network to the router
    28. 28. Figure 7.11 LAN with router
    29. 29. – Interconnecting (cont.) • Router uses a built-in router table – Uses this to determine where to send packets – How router uses routing table: Everything for 192.168.5.0 Everything else goes out goes out 192.168.5.1 14.23.54.223
    30. 30. Figure 7.12 Router diagram
    31. 31. Figure 7.13 LAN, router, and the Internet
    32. 32. – Interconnecting (cont.) • Limitations of using 192.168.5.0 as host ID – Limited to 192.168.5.1 through 192.168.5.254 (254 addresses) • Network ID of 170.45.0.0 has a total of 65,534 hosts • Network ID of 12.0.0.0 has a total of 16.7 million hosts • Network IDs allow router to connect multiple LANs to a WAN
    33. 33. 3. IP must give each computer a way to understand when a packet destination is local or on the WAN – Subnet Mask • Sending to host on same network: broadcast for MAC address • Sending to host on another network: send to default gateway • Sending computer uses subnet mask to determine where to send packet • Example of a subnet mask using dotted-octet binary notation: 11111111.11111111.11111111.00000000 • Example of the same subnet mask using dotted decimal notation: 255.255.255.0
    34. 34. Figure 7.14 The three amigos, separated by walls or miles
    35. 35. Figure 7.15 Sending a packet remotely
    36. 36. – Subnet Mask (cont.) • Line up an IP address with a corresponding subnet mask in binary – Portion of IP address that aligns with the ones of the subnet mask is the network ID of the IP address. – Portion of IP address that aligns with the zeroes of the subnet mask is the HostID of the IP address
    37. 37. Dotted Binary DecimalIP address 192.168.5.23 11000000.10101000.00000101.00010111Subnet mask 255.255.255.0 11111111.11111111.11111111.00000000Network ID 192.168.5.0 11000000.10101000.00000101.xHost ID x.x.x.23 x.x.x.00010111
    38. 38. – Subnet Mask (cont.) • Sending computer compares the destination IP address to its own IP address using the subnet mask • If the destination IP address matches the computer IP wherever there’s a 1 in the subnet mask, sending computer knows the address is local • If the destination IP address does not match the sending computer’s IP wherever there’s a 1 in the subnet mask, sending computer knows the address is remote
    39. 39. Figure 7.16 Comparing addresses
    40. 40. – Subnet Mask (cont.) • When the destination address is local, the sending computer sends out an Address Resolution Protocol (ARP) broadcast to determine the destination computer’s MAC address • The ARP packet contains the sending computer’s IP address as well as the destination address • Destination computer responds to the ARP request by sending an ARP response containing its MAC address • Sending computer can now send data packets to destination
    41. 41. Figure 7.17 Sending an ARP
    42. 42. Figure 7.19 Computer B responds
    43. 43. – Subnet Mask (cont.) • When the sending computer discovers that the destination address does not have the same network ID as itself, then it must send the packet beyond the local network • The packet must be sent to the default gateway • Sending computer must ARP for the MAC address of the default gateway
    44. 44. Figure 7.20 Comparing addresses again
    45. 45. Figure 7.21 Sending an ARP to the gateway
    46. 46. – Subnet Mask (cont.) • Some valid subnet masks11111111111111111111111100000000 = 255.255.255.011111111111111110000000000000000 = 255.255.0.011111111000000000000000000000000 = 255.0.0.0 • Shorthand for subnet mask11111111111111111111111100000000 = /24 (24 ones)11111111111111110000000000000000 = /16 (16 ones)11111111000000000000000000000000 = /8 (8 ones)
    47. 47. – Subnet Mask (cont.) • An IP address followed by the / and a number describes the IP and the address in one statement201.23.45.123/24 = IP address plus subnet maskIP address = 201.23.45.123Subnet mask = 255.255.255.0184.222.4.36/16 = IP address plus subnet maskIP address = 184.222.4.36Subnet mask = 255.255.0.0
    48. 48. – Subnet Mask (cont.) • Network administrators must enter correct IP address and subnet mask when configuring a network card • The networking software does the rest • If you want a computer to work in a routed network, you must configure the computer correctly with an IP address, subnet mask, and default gateway
    49. 49. – Class IDs • No two devices on the Internet can share the same IP address • Internet Assigned Number Authority (IANA) tracks and disperses IP addresses in chunks called class licenses – Oversees several Regional Internet Registries (RIRs) – RIRs in turn pass out IP addresses to large ISPs – ISPs pass out IP addresses to most end users
    50. 50. First Decimal Hosts per Value (range) Addresses Network IDClass A 1 – 126 1.0.0.0 – 126.255.255.255 16,277,214Class B 128 – 191 128.0.0.0 – 191.255.255.255 65,534Class C 192 – 223 192.0.0.0 – 223.255.255.255 254Class D 224 – 239 224.0.0.0 – 239.255.255.255 MulticastClass E 240 – 255 240.0.0.0 – 255.255.255.255 Reserved IP Address Classes
    51. 51. – Class IDs – More about Class D and E • Three ways to send a packet – Broadcast to every computer on the LAN – Unicast from one computer to another computer – Multicast from one computer to a group » Uncommon between computers » Often used by routers
    52. 52. – Class IDs – The state of IP address • IP class licenses were allocated too generously at first • Unallocated IP addresses became scarce • IP class licenses concept did not scale well – If you needed 2000 IP addresses you had to take a single Class B or eight Class C licenses • Solution – New method for generating blocks of IP addresses – Classless Inter-Domain Routing (CIDR)
    53. 53. CIDR and Subnetting
    54. 54. • CIDR and Subnetting Overview – CIDR based on subnetting – Subnetting chops up a single class of IP addresses into multiple smaller groups – CIDR and subnetting are virtually the same thing – Subnetting done by an organization on a block of addresses to create multiple subnetworks – CIDR done by an ISP on a block of addresses to create multiple subnets to pass out to customers
    55. 55. • Subnetting – More efficient use of IP addresses than class licenses – Enables separation of networks for security – Enables bandwidth control – Subnet mask is cornerstone of subnetting • Extend subnet masks of /8, /16, or /24 subnet by adding more ones (removing equal number of zeroes).
    56. 56. • Subnetting the Internet Café – 50 computers • 40 public computers • 10 back office computers • 10 wireless clients (maximum) – Network ID 192.168.4/24 – Must prevent people using the public system from accessing private machines
    57. 57. Figure 7.22 Layout of the network
    58. 58. • Subnetting the Internet Café (cont.) – Begin with the given subnet mask and move it to the right until you have the number of subnets you need – Forget the dots • Don’t be limited to /8, /16, /24 networks • Network IDs do not need to end on the dots • Create subnets of /26, /27, /22, etc.
    59. 59. • Subnetting the Internet Café (cont.) – 192.168.4/24 – Change a zero to a one in the subnet mask – /24 becomes a /25 subnet 11111111111111111111111110000000
    60. 60. • Calculating Hosts – Hosts on a /24 network – 192.168.4.1 to 192.168.4.254 = 254 hosts – Calculate in binary • In a /24 network 8 binary digits are used for the host ID • 00000001 to 11111110 = 254 hosts • 2(number of zeroes in the subnet mask) – 2 • 28 – 2 = 254 total hosts – Memorize the formula
    61. 61. • Calculating Hosts (cont.) – Hosts on a /16 network • In a /16 network 16 zeroes are part of the host ID • 0000000000000001 to 1111111111111110 = 65,534 hosts • 2(number of zeroes in the subnet mask) – 2 • 216 – 2 = 65,534 total hosts
    62. 62. • Calculating Hosts (cont.) – Hosts on a /26 network • In a /26 network 6 zeroes are part of the host ID • 000001 to 111110 = 62 hosts • 2(number of zeroes in the subnet mask) – 2 • 26 – 2 = 62 total hosts
    63. 63. • Your First Subnet – Convert the 192.168.4/24 net ID into three network IDs – Write out the subnet mask in binary – Place a line at the end of the ones
    64. 64. Figure 7.23 Step 1 in subnetting
    65. 65. • Your First Subnet (cont.) – Draw a second line one digit to the right – Three areas (a Mike Trick, not official terms) • Subnet mask (SM) • Network ID extension (NE) • Hosts (H) – This is now a /25 subnet mask
    66. 66. Figure 7.24 Organizing the subnet mask
    67. 67. • Your First Subnet (cont.) – A subnet mask is always 32 binary digits long – A string of ones followed by a string of zeroes 11111111111111111111111110000000 – Put periods between every eight digits 11111111.11111111.11111111.10000000 – Then convert to dotted decimal – The resulting subnet mask: 255.255.255.128
    68. 68. • Your First Subnet (cont.) – Get used to the idea of subnet masks that use more than 255s and 0s (in dotted decimal form) – Examples of legitimate subnet masks • 255.255.255.224 11111111.11111111.11111111.11100000 • 255.255.128.0 11111111.11111111.10000000.00000000 • 255.248.0.0 11111111.11111000.00000000.00000000
    69. 69. • Rules for Calculating Subnets 1. Starting with a beginning subnet mask, you extend the subnet extension until you have the number of subnets you need 2. You cannot have an NE of all zeroes or all ones, so you calculate the number of subnets using this formula: new subnets = 2(number of zeroes in the subnet mask) – 2 3. You cannot have a single-character network ID extension. You always start by moving the subnet at least two digits
    70. 70. • Calculating Subnets (cont.) – Rules 2 and 3 explained • Adding just a single digit to the beginning subnet mask only gives you two network IDs: a zero and a one • You cannot have a network ID extension of all zeroes or all ones • Therefore, you need rule 3
    71. 71. Figure 7.25 Organizing the subnet mask
    72. 72. Figure 7.26 Single-digit network ID extensions are not allowed
    73. 73. • Calculating Subnets (cont.) – Subnet /24 to /26 – Adds two digits, creating four new network IDs (two of which are not usable) – Convert the original network ID to binary and add the four different network ID extension to the end – The possible NEs in binary are 00, 01, 10, 11 – Can’t have all zeroes, can’t have all ones – Therefore, only two new networks (01 and 10)
    74. 74. Figure 7.27 Creating the new network IDs
    75. 75. Figure 7.28 New network ID address ranges
    76. 76. • Calculating Subnets (cont.) – The new network IDs in decimal 192.168.4.64/26 hosts = 192.168.4.65 – 192.168.4.126 192.168.4.128/26 Hosts = 192.168.4.129 – 192.168.4.191
    77. 77. Figure 7.29 Two networks using the two network IDs
    78. 78. • Calculating Subnets (cont.) – The Internet Café needs three subnets – How large a network ID extension is needed? – Two NE digits = 22 – 2 = 2 network IDs – Three NE digits = 23 – 2 = 6 network IDs – Therefore, you need to extend the NE three digits to get at least three network IDs – Three are wasted
    79. 79. • Calculating Subnets (cont.) – Create a /27 subnet by moving the NE over three digits – Calculate the host address ranges for each usable new subnet – 192.168.4.32/27 (192.168.4.33–192.168.4.62) – 192.168.4.64/27 (192.168.4.65–192.168.4.94) – 192.168.4.96/27 (192.168.4.97–192.168.4.126) – 192.168.4.128/27 (192.168.4.129–192.168.4.158) – 192.168.4.160/27 (192.168.4.161–192.168.4.190) – 192.168.4.192/27 (192.168.4.193–192.168.4.222)
    80. 80. Figure 7.30 Moving the network ID extension three digits
    81. 81. Figure 7.31 Two of the six network ID address ranges
    82. 82. Manual Binary to Dotted Decimal Conversion• Write bit values in decimal from left to right – Take binary value of one dotted octet portion and place ones and – zeroes under appropriate positions 128 64 32 16 8 4 2 1 1 0 0 1 0 1 1 0 Add the decimal values that have a 1 underneath – 128+16+4+2 = 150
    83. 83. • Manual Dotted Decimal to Binary Conversion – Start with bit values beginning with 128 – Place decimal value above the first value on the left which it exceeds and subtract and place a one to represent this binary value 221 128 64 32 16 8 4 2 1 93 1
    84. 84. • Manual Dotted Decimal to Binary Conversion – Place the remainder above the next bit value that it exceeds (Place a zero in positions that are skipped) 221 93 29 13 5 1 128 64 32 16 8 4 2 1 93 29 13 5 1 0 1 1 0 1 1 1 0 1 – Decimal 221 = binary 11011101
    85. 85. • CIDR: Subnetting in the Real World – Two situations in which subnetting takes place • ISPs (Large ones) – Receive class licenses from IANA – Subnet those class licenses for customers • Very large customers – Take subnets from ISPs (sometimes already subnetted class licenses) – Make their own subnets
    86. 86. • CIDR: Subnetting in the Real World (cont.) – Why learn subnetting? • CompTIA Network+ exam requires it • There’s a good chance you’ll contact an ISP and get CIDR addresses – Think of subnets in terms of CIDR values like /8, /22, /26, and so on • More advanced IT certifications (Cisco, Microsoft, etc.) require this knowledge
    87. 87. Using IP Addresses
    88. 88. • Overview of Using IP Addresses – Assigning IP addresses to computers – Specialty IP addresses
    89. 89. • Assigning an IP address, subnet mask, and default gateway – Static addressing • Type in all the information – Dynamic addressing • Server program automatically passes out the information to computers on the network
    90. 90. • Static IP Addresses – Manually type in all IP information • What are you typing in? • Where do you type it? – Assuming a Class C license for 197.156.4/24 • You can do whatever you want with your own network ID • Use legit IP address and mask for network ID • Every IP address must be unique • You don’t have to use the numbers in order • You don’t have to use 197.156.4.1 as default gateway
    91. 91. Figure 7.32 A small network
    92. 92. • Static IP Addresses (cont.) – Network techs’ set of principles • Give the default gateway the first host IP address in the network ID • Try to use the IP addresses in some kind of sequential order • Try to separate servers from clients – Servers host addresses: 197.156.4.10 to 197.156.4.19 – Client host addresses: 197.156.4.200 to 197.156.4.254 • Write down whatever you do so person who comes after you understands what you did
    93. 93. • Static IP Addresses (cont.) – Give each computer an IP address, subnet mask, and default gateway • In Windows use the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box • In Macintosh OS X, run the Network utility in System Preferences • In UNIX/Linux use the command-line IFCONFIG command
    94. 94. Figure 7.33 Entering static IP information in Windows Internet Protocol Version 4 (TCP/IPv4) Properties
    95. 95. Figure 7.34 Entering static IP information in the OS X Network utility
    96. 96. Figure 7.35 IFCONFIG command to set static IP address
    97. 97. Figure 7.36 Ubuntu’s Network Configuration utility
    98. 98. • Static IP Addresses (cont.) – After adding IP information to at least two systems, verify with the PING command – Successful PING confirms two systems can communicate – If the PING is not successful • Check your IP settings • Check connections, driver, etc. – Static addressing used for most critical systems – Most systems today use dynamic IP addressing
    99. 99. Figure 7.37 Two PINGs (successful PING on top, unsuccessful PING on bottom)
    100. 100. • Dynamic IP Addressing – Dynamic Host Configuration Protocol (DHCP) • More popular form of dynamic IP addressing • Bootstrap Protocol (BOOTP) older version – Automatically assigns an IP address whenever a computer connects to the network – DHCP uses a simple process • Computer is configured to use DHCP • Every OS has a method to tell computer to use DHCP • Windows setting: Obtain an IP address automatically
    101. 101. Figure 7.38 Setting up for DHCP
    102. 102. • How DHCP Works – DHCP Server is configured to pass out IP addresses • Scope = range of IP addresses • Subnet mask for scope • Default gateway for scope • Gives out other information (detailed in later chapters)
    103. 103. • How DHCP Works (cont.) – When DHCP client boots up it broadcasts a DHCP discovery packet • Discovery packet asks “Are there any DHCP servers out there?” • DHCP server responds with a DHCP offer • DHCP clients responds with a DHCP request • DHCP server responds with a DHCP acknowledge and maintains a database of the MAC addresses of DHCP clients along with the IP information assigned to each • DHCP client accepts with a DHCP lease
    104. 104. Figure 7.39 Computer sending out a DHCP discovery message
    105. 105. Figure 7.40 DHCP server sending DHCP offer
    106. 106. Figure 7.41 DHCP request and DHCP acknowledge
    107. 107. • How DHCP Works (cont.) – DHCP Lease • Set for a fixed amount of time • Usually 5 to 8 days • At the end of the lease time, DHCP client makes another DHCP discovery message • DHCP server looks at the MAC address, comparing it to its database of leases • Unless another computer has taken the lease, server will give the client the same IP information, including the same IP address
    108. 108. • Living with DHCP – Possible problems • DHCP client tries to get a DHCP address and fails • Symptoms – OS will post an error – DHCP client will have an address in the 169.254/16 network ID – Can access local computers, but cannot connect to Internet
    109. 109. Figure 7.42 DHCP error in Ubuntu Linux
    110. 110. • Living with DHCP – Automatic Private IP Addressing (APIPA) • Addresses in the 169.254/16 network ID that a DHCP client will assign to itself when it fails to find a DHCP server • Allows computers on same LAN to communicate (if they are using APIPA) • APIPA does not provide default gateway, so clients using APIPA cannot access the Internet • Use available tool to see IP settings • If you see an APIPA address, you know you have a DHCP problem
    111. 111. • Living with DHCP – Reestablish the lease manually – In Windows • Ipconfig/renew – On a Macintosh • Go to System Preferences and use the Network utility – May need to force computer to release its lease • Windows command line: ipconfig /release ipconfig /renew • Release in Linux: sudo ifconfig eth0 down • Renew in Linux: sudo ifconfig eth0 up
    112. 112. Figure 7.43 Network utility in System Preferences
    113. 113. • Special IP Addresses – Loopback = 127.0.0.1 • Use to send packets from your NIC to itself • Test NIC’s capability to send and receive packets: ping 127.0.0.1 – Private IP addresses • 10.0.0.0 through 10.255.255.255 (1 Class A license) • 172.16.0.0. through 172.31.255.255 (16 Class B licenses) • 192.168.0.0 through 192.168.255.255 (256 Class C licenses) – All other IP addresses are public IP addresses
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×