Network+ Guide to Networks, Fourth Edition Chapter 11 In-Depth TCP/IP Networking At a Glance Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional Projects Additional Resources 11-1 Network+ Guide to Networks, Fourth Edition Lecture Notes Chapter Objectives Understand methods of network design unique to TCP/IP networks, including subnetting, CIDR, NAT, and ICS Explain the differences between public and private networks Describe protocols used between mail clients and mail servers, including SMTP, POP3, and IMAP4 Employ multiple TCP/IP utilities for network discovery and troubleshooting Designing TCP/IP-Based Networks Provide a brief review of the basic TCP/IP concepts that were introduced in Chapter 4 in the text. Subnetting Give an overview of subnetting, explaining the advantages that it can provide. Mention that networks are commonly subnetted according to geographic locations Classful Addressing Provide an overview of classful addressing. Stress that only Class A, Class B, and Class C addresses are recognized. Discuss, for each class, how many bits are used for the Network ID. Use Figure 11-1 for illustration. Explain that adhering to a fixed network ID size ultimately limits the number of hosts a network can include. Discuss the benefits of separating network traffic and explain that using classful addressing makes it difficult to separate traffic from various parts of a network. Teaching Tip The term network ID is sometimes used interchangeably with the terms network number or network prefix. Subnet Masks Explain that subnetting relies on subnet masks to subdivide a network. Discuss the effects of 1 bits and 0 bits in a subnet mask. Explain that each network class is associated with a default subnet mask, and illustrate with Table 11-1. Describe in detail the process of ANDing. Use Table 11-2 and Figure 11-2 to illustrate, and provide additional examples. 11-2 Network+ Guide to Networks, Fourth Edition Reserved Addresses Provide an overview of the concept of reserved addresses. Explain that certain types of IP addresses cannot be assigned to a network interface on a node or used as subnet masks. Discuss network ID and broadcast reserved addresses. Explain that, when using classful addressing, a network ID always ends with an octet of 0. Mention that, when subnetting is applied and a default subnet mask is no longer used, a network ID may have other decimal values in its last octet(s). Stress that only the numbers 1 through 254 can be used for host information in an IP address. Subnetting Techniques Explain that subnetting breaks the rules of classful addressing. Discuss how subnets are created. Explain that, by making bits that previously were used for host information represent network information, you reduce the number of bits available for identifying hosts. Use Tables 11-3 and 11-4 to illustrate and compare the numbers of subnets and hosts that can be created by subnetting a Class B and Class C network. Calculating Subnets Discuss in detail the formula used for determining how to modify a default subnet mask. Explain why 2 is subtracted from the total number of possible subnets. Give examples. Discuss the example presented in this chapter of a Class C network with six subnets. Use Table 11-5 to illustrate the network ID, broadcast address, and usable host addresses for each of the six subnets in this example network. Define extended network prefix. Explain that the extended network prefix for each subnet is based on which of the additional network information bits are set to equal 1. Explain that Class A, Class B, and Class C networks can all be subnetted. Mention that the number of hosts and subnets on your network will vary depending on your network class and the way you use subnetting. Explain that, when you use subnetting on your LAN, only your LAN’s devices need to interpret your devices’ subnetting information. Illustrate a router connecting several subnets using Figure 11-3. CIDR (Classless Interdomain Routing) Provide an overview of CIDR, explaining why it was developed. Explain that it provides additional ways of arranging network and host information in an IP address. Stress that, in CIDR, conventional network class distinctions do not exist. Explain how CIDR works, mentioning that a subnet boundary can move to the left. Define supernet and supernet mask. Use Figure 11-4 to illustrate the difference between a subnet mask and a supernet mask. Explain the process of calculating a host’s network ID on a supernetted network, using Figure 11-5 to illustrate. Discuss the concept of supernet notation, or slash notation. Define CIDR block, and give one or two examples for illustration. 11-3 Network+ Guide to Networks, Fourth Edition Explain that, in order to take advantage of classless routing, your network’s routers must be able to interpret IP addresses that don’t adhere to conventional network class parameters. Internet Gateways Give an overview of gateways, explaining their function on a network. Explain that every device on a TCP/IP-based network has a default gateway, and explain the role that a default gateway plays. Explain that, in many cases, a default gateway is not a separate device, but rather a network interface on a router. Define default router. Illustrate with Figure 11-6. Teaching Tip An Internet gateway is usually assigned an IP address that ends with an octet of .1. Mention that default gateways may connect multiple internal networks, or they may connect an internal network with external networks. Explain that, when a router is used as a gateway, it must maintain routing tables as well. Explain that Internet gateways maintain default routes to known addresses to expedite data transfer. Define core gateway. NAT (Network Address Translation) Discuss how NAT can be used to hide the IP numbers assigned within an organization and keep its devices’ IP addresses secret from a public network. Mention that clients behind the gateway may use any addressing scheme. Stress that, in order to connect to the Internet, the client must also have a valid IP address. Explain how the default gateway provides this valid IP address. Explain the reasons for hiding IP addresses, such as security, and the ability to use any addressing scheme. Use Figure 11-7 to illustrate how NAT works. ICS (Internet Connection Sharing) Give an overview of ICS, explaining that it can be used to share Internet access on computers running Windows 98, Me, 2000, or the 32-bit version of the XP OS. Discuss the role of the ICS host, and explain that it acts as a DHCP server, DNS resolver, and NAT gateway for clients on its LAN. Mention that it is assigned an IP address of 192.168.0.1. Also mention that the ICS host typically assigns clients IP addresses in the range of 192.168.0.2 through 192.168.0.255. Describe the process of enabling ICS on an ICS host, using the steps on pages 580 and 581 of the text as a guide. If the classroom is equipped to do so, illustrate these steps on the classroom computer. Explain that, when designing a network to share an Internet connection, most network administrators prefer using a router or switch rather than ICS, because ICS typically requires more configuration. 11-4 Network+ Guide to Networks, Fourth Edition Intranets and Extranets Explain that TCP/IP-based services, such as e-commerce, e-mail, and file sharing can be run on private networks. Define intranet and discuss the services that are often provided over intranets. Define extranet and mention the difference between an extranet and an intranet. Quick Quiz 1 1. True or False: In classful addressing, only Class A, B, C, and D addresses are recognized. Answer: False 2. To calculate a host’s network ID given its IP address and subnet mask, you follow a logical process of combining bits known as _____. Answer: ANDing 3. What is the formula for determining how to modify a default subnet mask (assuming n is the number of bits in the subnet mask that must be switched from 0 to 1 and Y is the number of subnets that result)? a. n-2 = Y b. 2n-2 =Y c. 2n-1 = Y d. 2n = Y Answer: b 4. A subnet created by moving the subnet boundary to the left is known as a(n) _____. Answer: supernet 5. Every device on a TCP/IP-based network has a(n) _____ gateway. Answer: default 6. A network or part of a network that uses browser-based services to exchange information within an enterprise is known as a(n) _____. Answer: intranet TCP/IP Mail Services Provide an overview of TCP/IP mail services. Mention that these services are the most frequently managed services by network administrators. Give examples of popular e-mail server software packages and client e-mail software packages. Explain that e-mail servers and clients communicate through special TCP/IP Application layer protocols. SMTP (Simple Mail Transfer Protocol) Give an overview of the SMTP mail protocol. Explain that it belongs to the Application layer of the TCP/IP Model and relies on TCP at the Transport layer. Mention that it operates on port 25. Stress that it provides the basis for Internet e-mail services. 11-5 Network+ Guide to Networks, Fourth Edition 11-6 Explain that SMTP is incapable of doing anything more than transporting mail or holding it in a queue. Mention that, when you configure clients to use Internet e-mail, you need to identify the user’s SMTP server. MIME (Multipurpose Internet Mail Extensions) Discuss the purpose of MIME. Mention that SMTP is not able to handle lines that contain more than 1000 ASCII characters, and explain that this prevents SMTP from being able to directly handle formatted text or graphics. Explain that MIME is a standard for encoding and interpreting binary files, images, video, and non-ASCII character sets within an e-mail message. Mention that it identifies each element of a mail message according to content type. Explain that MIME does not replace SMTP, but works in conjunction with it. Discuss how MIME tricks SMTP into transporting non-ASCII content. POP (Post Office Protocol) Provide an overview of the POP protocol. Mention that the most current version is POP3. Explain that, with POP3, mail is delivered and stored on a mail server until a user connects to the server to retrieve the messages. Mention that the messages are typically deleted from the server after download. Stress that POP is best suited for users who will only check their e-mail from one computer. IMAP (Internet Message Access Protocol) Give an overview of the IMAP protocol. Mention that the most current version is IMAP4. Discuss the advantages of using IMAP, as described in the list on page 585 of the text. Also discuss the disadvantages of using IMAP. Additional TCP/IP Utilities Explain that TCP/IP comes with a complete set of utilities and routines that can be used to gather information about and troubleshoot a network and networking equipment. Review some of the TCP/IP utilities, such as Telnet, ARP, and PING, which were introduced in Chapter 4 in the text. Explain that nearly all TCP/IP utilities can be accessed from the command prompt on any type of server or client running TCP/IP. Mention that the syntax and available options may differ depending on the OS. Teaching Tip Make sure that the students understand that they should be familiar with the use of the TCP/IP tools and their switches discussed in the following sections, not only because the Network+ certification exam covers them, but also because they will regularly need these diagnostics in their work with TCP/IP networks. Network+ Guide to Networks, Fourth Edition 11-7 Netstat Discuss the purpose of the netstat utility in depth. Explain the information that can be gathered using this utility. Discuss the common switches used with netstat, as described in the list on page 587 of the text. If the classroom is equipped to do so, illustrate the use of netstat with various switches on the classroom computer. Teaching Tip If you use the netstat command without any switches, it will display a list of all the active TCP/IP connections on your machine, including the Transport layer protocol used (UDP or TCP), packets sent and received, IP address, and the state of those connections. Nbtstat Discuss the purpose of the nbtstat utility in depth. Explain that, on networks that run NetBIOS over TCP/IP, the nbtstat utility can provide information about NetBIOS statistics and resolve NetBIOS names to their IP addresses. Discuss the common switches used with nbtstat, as described in the list on page 588 of the text. If the classroom is equipped to do so, illustrate the use of nbtstat with various switches on the classroom computer. Nslookup Discuss the purpose of the nslookup utility in depth. Explain that this utility allows you to query the DNS database from any computer on the network and find the host name of a device by specifying its IP address, or vice versa. If the classroom is equipped to do so, illustrate the use of nslookup on the classroom computer. Specifically, illustrate the nslookup options via the man pages (UNIX-based systems), or typing ? at the nslookup command line. Dig Discuss the purpose of the dig utility. Mention that it is similar to nslookup, but is able to provide more detailed information. Discuss the switches that can be used with the dig utility. If the classroom is equipped to do so, illustrate the use of dig with some of these switches on the classroom computer. Explain that dig comes with UNIX-type OSs, but has to be explicitly installed on Windows systems. Whois Discuss the purpose of the whois utility in depth. Explain that it allows you to query a DNS registration database and obtain information about a domain. Discuss how whois can be used for troubleshooting purposes. Network+ Guide to Networks, Fourth Edition 11-8 Mention that there are online services that perform the same functions as the whois utility. If the classroom is equipped to do so, illustrate the use of the whois utility on the classroom computer. Also, show the students the ARIN whois database. Teaching Tip A simple whois command does not work with all types of domains because, in some cases, a special server must be queried for some domain information. Traceroute (Tracert) Discuss the purpose of the traceroute utility in detail. Explain that it uses ICMP to trace the path from one networked node to another, identifying all intermediate hops between the two nodes. Explain the process that the traceroute utility uses to determine the route between two nodes. Mention the reasons that this utility may fail. Discuss the common switches that can be used with the traceroute utility, as described in the list on page 592 of the text. If the classroom is equipped to do so, illustrate the use of the traceroute command with some of these switches on the classroom computer. Ipconfig Provide an overview of the ipconfig utility, mentioning the OSs that it can be used on. Explain the information that is displayed by this utility. Discuss the common switches that are used with the ipconfig utility, as described in the list on page 593 of the text. If the classroom is equipped to do so, illustrate the use of the ipconfig utility with some of these switches on the classroom computer. Winipcfg Discuss the purpose of the winipcfg utility. Stress that it serves the same purpose as the ipconfig utility, but is only used on Windows 9.x and Windows ME. Mention that it uses a graphical interface, and illustrate with Figure 11-14. Ifconfig Discuss the purpose of the ifconfig utility. Stress that it is the UNIX-type system equivalent of the ipconfig utility. Discuss some of the switches and options that can be used with the ifconfig utility. If the classroom is equipped to do so, illustrate the use of the ifconfig utility on the classroom computer. Also illustrate the switches not listed in the text, using the man pages for ifconfig. Teaching Tip Many ifconfig switches, such as those that apply to DHCP settings, vary according to the type and version of the UNIX-type of OS being used. Refer to the OS’s help manual (or man pages) for more information. Network+ Guide to Networks, Fourth Edition 11-9 VoIP (Voice over IP) Provide an overview of VoIP. Mention that it has existed for over a decade, and has become popular over the past few years. Discuss the objectives for implementing VoIP, as described in the list on page 595 of the text. Teaching Tip The provision of data, voice, fax, and video services over the same packet-switched network is known as convergence. Introduce the three types of clients that may be used to converse via VoIP. Explain that, on any VoIP network, a mix of these three types of clients is possible. Describe how traditional telephones may be used to converse over VoIP. Explain that signals issued by the telephone must be converted to digital form before being transmitted on a TCP/IP-based network. Discuss all the methods that can be used to achieve this conversion. Illustrate with Figure 11-16. Explain that most new VoIP installations use IP telephones. Using Figure 11-17 to illustrate, explain the different ways IP telephones can connect with a data network. Discuss the use of softphones for VoIP. Mention that softphones and IP telephones provide the same calling functions. Discuss the hardware requirements for using a computer as a softphone. Define Internet telephony. Explain that VoIP can be carried over private lines, as well as the Internet. Quick Quiz 2 1. SMTP belongs to the ____ layer of the TCP/IP Model. Answer: Application 2. ____ is a mail retrieval protocol that was developed as a more sophisticated alternative to POP3. Answer: Internet Message Access Protocol (IMAP) 3. Which netstat switch provides a list of routing table information? a. -a b. -e c. -r d. -s Answer: c 4. The ____ utility allows you to query the DNS database from any computer on the network and find the host name of a device by specifying its IP address, or vice versa. Answer: nslookup 5. ____ is the TCP/IP configuration and management utility used on UNIX-type of systems. Answer: Ifconfig Network+ Guide to Networks, Fourth Edition Class Discussion Topics 1. Have the students discuss the e-mail clients that they are familiar with. Which client(s) do they prefer? Also have them discuss whether they would be more likely to use POP or IMAP. 2. Given the TCP/IP utilities that the students have learned about so far, what kind of troubleshooting tasks do they think that they would be able to perform? Are there any other types of tools that they can think of that might be helpful in troubleshooting a TCP/IP network? Additional Projects 1. SMTP commands may be issued via a telnet connection to a main server. This allows simple email messages to be created and sent without the use of an e-mail client. Have the students complete the SMTP tutorial that can be found at http://castlecgi.castellum.net/site/articles/smtp. In this tutorial, the students will learn how to telnet into a mail server, create a message, and send it. This will require the students to first know the SMTP server address for their e-mail server. For safety reasons, have the students send a message to themselves or to you, rather than having them send messages to anybody else. Note that this exercise can be performed by telnetting to a POP server as well; although, the commands differ. 2. Have the students locate a whois utility for Windows, download it, and install it. Next, have the students run the whois utility to locate information about a Web site of your choice. Additional Resources Subnetting Tutorial: http://www.ralphb.net/IPSubnet/ Supernetting: http://www.red.net/support/resourcecentre/leasedline/intro.php Setting Up Your Gateway's Subnets: http://www.fuller.net/Gateways/setting_up_subnets.html CIDR: http://public.pacbell.net/dedicated/cidr.html SMTP tutorial: http://castlecgi.castellum.net/site/articles/smtp Using Telnet with a POP3 Mail Server: http://pages.prodigy.net/michael_santovec/pop3telnet.htm The IMAP Connection: http://www.imap.org/ Roll Your Own Intranet: http://www.vijaymukhi.com/vmis/roll.htm nslookup tutorial: http://www.cni.org/pub/inetroom/nslookup.html How to read NETSTAT -AN results: http://www.sit.ulaval.ca/public/dex/eqwin/eqMIT/documentation/netstat_results.htm VoIP-info.org: http://www.voip-info.org/tiki-index.php 11-10