Download presentation
Presentation is loading. Please wait.
1
TCP/IP Applications Chapter 8
2
Objectives Describe common Transport and Network layer protocols
Explain the power of port numbers Define common TCP/IP applications such as HTTP, HTTPS, Telnet, SSH, (SMTP, POP3, and IMAP4), and FTP
3
Historical/Conceptual
Transport Layer and Network Layer Protocols
4
Transport Layer and Network Layer Protocols
TCP over IP consists of many other things HTTP DHCP POP 500 more terms over TCP UDP over IP ICMP over IP Note (p. 213): There is a strong movement toward using the term Internet Protocol instead of the term TCP/IP. This movement has not yet reached the CompTIA Network+ certification.
5
How People Communicate (1 of 2)
Connection-oriented communication Acknowledgement between two people beginning a conversation Conduct the communication Close the communication
6
How People Communicate (2 of 2)
Connectionless communication (UDP) No opening acknowledge Short message is shouted across a room No closing Session Any single communication between computers All sessions must begin and end
7
Test Specific TCP
8
Transmission Control Protocol (TCP)
Enables connection-oriented communication Most common type of session in a TCP/IP network
9
Three-Way Handshake Communication Process (1 of 4)
Client sends a SYN (synchronize) packet to the Web server One computer (Server) returns a single SYN, ACK (synchronize/acknowledge) packet Client sends a single ACK packet and requests that Server begin sending the Web page After the Web page is sent, Server sends a FIN (finished) packet
10
Three-Way Handshake Communication Process (2 of 4)
Client responds with ACK and sends its own FIN packet Server responds with ACK Both parties consider the session closed
11
Three-Way Handshake Communication Process (3 of 4)
Figure A connection-oriented session starting
12
Three-Way Handshake Communication Process (4 of 4)
Figure A connection-oriented session ending
13
User Datagram Protocol (UDP) (1 of 2)
Used by very few applications Requires much less overhead than TCP No start, no acknowledgement, no end Example of application using UDP: DHCP Each step of a DHCP session sends information without any confirmation
14
User Datagram Protocol (UDP) (2 of 2)
Figure DHCP steps
15
NTP/SNTP Network Time Protocol (NTP)
Simple Network Time Protocol (SNTP) Both synchronize the clocks of devices on a network Uses port 123
16
Trivial File Transfer Protocol (TFTP)
Uses UDP Transfers files between computers Does not have any data protection Never use it over the Internet Best use: between computers on the same LAN Uses port 69
17
Internet Control Message Protocol
Works at layer 3 to deliver connectionless packets Handles issues such as disconnect messages Ping is an ICMP application
18
Ping (1 of 2) Sends a single ICMP packet called an echo request to a specified IP address All computers (unless blocked by a firewall) respond with echo reply Responses Destination host unreachable Request timed out Early version had a bug that allowed ‘ping of death’ to crash the recipient computer Note (p.215): Domain Name System (DNS) protocol traffic uses UDP. That’s the protocol that enables (among other things) people to use names rather than IP addresses to access resources on TCP/IP networks like the Internet. DNS is so important that most of Chapter 9, “Network Naming,” is devoted to how it works and what network techs need to know to support it. Exam Tip (p. 215): Expect to get a question that compares connection-oriented vs. connectionless communication in general, or the protocols commonly used in each. Note (p. 215): A firewall is a device or software that filters all the packets between two computers (or groups of computers) and acts like a club bouncer deciding who gets in and who gets blocked. Firewalls are vital for securing modern networks and will be discussed in Chapter 11, “Advanced Network Devices.”
19
Ping (2 of 2) Figure 8.4 ping in action
Exam Tip (p. 215): CompTIA has used the term unreachable default gateway as an ICMP-related issue. If you ping the default gateway and get a destination host unreachable response, you could infer that the default gateway is unreachable. Figure ping in action
20
Internet Group Management Protocol (1 of 2)
Used for multicasts Routers use to determine a group membership Multicast Uses a small subnet of the Class D range Does not assign IP addresses Group assigned /4 address Those who wish to receive multicast must join the IGMP group Cross Check: Multicast (p. 216) You first saw multicast in Chapter 6, “TCP/IP Basics,” when you learned about classful IP addressing. Refer to that chapter and see if you can answer these questions. What IP numbers are reserved for multicast? Which class is that? What is the difference between unicast and multicast?
21
Internet Group Management Protocol (2 of 2)
Figure IGMP in action
22
The Power of Port Numbers
23
Power of Port Numbers (1 of 6)
Every TCP/IP application requires a server and a client Clearly defined port numbers exist for popular and well-known applications Well-known port numbers from 0 to 1023 reserved for specific applications Exam Tip (p. 216): TCP/IP port numbers between 0 and 1023 are the well-known port numbers. You’ll find them at every party.
24
Power of Port Numbers (2 of 6)
Figure HTTP ACK packet
25
Power of Port Numbers (3 of 6)
Figure Dealing with the incoming packet
26
Power of Port Numbers (4 of 6)
The Web client’s source port number is generated by the Web client computer Ephemeral port numbers Operating systems assign values 1024 to 5000 IANA recommends using only ports to 65535 Dynamic or private port numbers Values to 65535
27
Power of Port Numbers (5 of 6)
Figure A more complete IP packet
28
Power of Port Numbers (6 of 6)
Figure Returning the packet
29
Registered Ports (1 of 2) 1024 to 49151
Less-common TCP/IP applications register their ports with IANA Most operating systems avoid registered port numbers for ephemeral ports Dynamic/private ports are used instead
30
Registered Ports (2 of 2) 0-1023 Well-known port numbers 1024-49151
Dynamic or private ports A full list of ports
31
Using Ports in a Session
Both computers keep track of the status of the communication Session information is held in RAM Socket or endpoint: one side’s session information Socket pairs or endpoints refer to data each computer stores about the connection Session or connection refers to the connection in general
32
Endpoint Information (1 of 4)
Source and destination for one session Many simultaneous sessions Use netstat –n to see sessions Usually shows many connections TCPView for Windows: dynamic Net Activity Viewer for Linux Note (p. 218): Even though almost all operating systems use netstat, there are subtle differences in options and output among the different versions. Exam Tip (p. 220): Netstat enables you to see active TCP/IP connections at a glance.
33
Endpoint Information (2 of 4)
Figure Two open windows
34
Endpoint Information (3 of 4)
Figure TCPView in action
35
Endpoint Information (4 of 4)
Figure Net Activity Viewer in action
36
Connection Status (1 of 2)
Connection states change continually Open port or listening port Socket prepared to respond to any IP packets destined for that socket’s port number Every serving application has an open port A Web server will have open port 80
37
Connection Status (2 of 2)
netstat –an shows all listening ports on a computer Results of running netstat -an Active connections Protocol Local address Foreign address State Note (p. 221): The –a switch tells netstat to show all used ports, including “listening” ports not engaged in active communications. The –n switch instructs netstat to show raw port numbers and IP addresses.
38
Process ID (PID) (1 of 2) Assigned to every running program on a computer The –o switch with netstat shows the PID Used by the OS to track running programs Commands to provide program name netstat –b (Windows) and ps (Linux) Windows Task Manager shows all running processes
39
Figure 8.13 Process Explorer
Process ID (PID) (2 of 2) Note (p. 223): To get Process Explorer, enter “Process Explorer” in your search engine to find it or try going here: docs.microsoft.com/en-us/ sysinternals/. Click the Process Utilities icon to get the latest copy. Figure Process Explorer
40
Rules for Determining Good vs. Bad Communications
Memorize a bunch of common ports Learn how to use netstat Learn the ports and processes that normally run on your operating system Research unrecognized processes Get rid of bad processes
41
Common TCP/IP Applications
42
The World Wide Web (1 of 3) Web servers
Store HTML documents Latest version: HTML5 Web browsers request HTML pages from Web servers and open them Can use IP address or text address Exam Tip (p. 224): HTML is the most well-known markup language, but many others roam the Web today, adding to HTML’s capabilities. Expect to see the Extensible Markup Language (XML) on the exam. XML provides the basic format or markup language for everything from RSS feeds to Microsoft Office documents.
43
Figure 8.14 My wireless access point’s Web interface
The World Wide Web (2 of 3) Figure My wireless access point’s Web interface
44
Figure 8.15 HTML5 source code
The World Wide Web (3 of 3) Note (p.226): Some Web browsers are pretty forgiving. If you only type in , forgetting the “ part, they just add it for you. Figure HTML5 source code
45
Hypertext Transport Protocol (1 of 2)
Hypertext Transport Protocol (HTTP) Underlying protocol of the Web Runs by default on TCP port 80 Places at beginning of Web server address A general weakness of HTTP Relays commands without reference to any previous commands
46
Hypertext Transport Protocol (2 of 2)
Other technologies that enhance HTTP JavaScript/AJAX Server-side scripting Adobe Flash Cookies Exam Tip (p. 226): Before connections to the Web became fast, many people used a completely different Internet service for swapping information, ideas, and files. USENET enjoyed great popularity for some years, though it barely survives today. Clients used the Network News Transfer Protocol (NNTP) to access USENET over TCP port 119. It might show up as an incorrect answer choice on the exam. Note (p.226): Many Web site developers today use premade customizable templates and some sort of Web technology, such as WordPress. These Web technologies enable powerful and dynamic Web site experiences for your visitors. The questions you’ll see on the CompTIA Network+ exam focus on the concepts, rather than modern implementations, of Web sites.
47
Publishing a Web Site A Web server will “host” an HTML document
Methods Self-host Install Web server software and acquire a public IP address Time-consuming and challenging Host through an Internet Service Provider (ISP) Use a Web hosting service company Free Web hosting (nothing is free)
48
Web Servers and Web Clients
A Web server delivers Web pages to client computers Listens on port 80 for HTML requests Fetches and sends requested HTML pages To create a Web server Install Web server software Connect the computer to the Web
49
Web Server Software (1 of 4)
Microsoft Internet Information Services (IIS) 20-connection limit on client versions of Windows IIS only runs on Server versions of Windows Apache HTTP Server Used by the majority of UNIX/Linux systems Approximately 50 percent of Internet Web servers Free Add-on GUIs (e.g., Webmin) are available Note (p. 227): An active site is a Web site that’s functioning by serving Web pages. The percent of market share mentioned here changes a lot when you add in parked sites, domain names that have been registered but don’t really do anything, like Web or servers.
50
Web Server Software (2 of 4)
Figure IIS in action
51
Web Server Software (3 of 4)
Figure Webmin Apache module
52
Web Server Software (4 of 4)
Web server software market share Apache is the most common on the Internet nginx ranked second for active sites IIS has about 7 percent share Google Web Server (GWS) Only used by Google servers Hundreds of other Web servers primarily for small personal Web sites
53
Web Client Software (Browsers)
Request and display Web pages Many have multiple functions Most popular: Microsoft Edge Mozilla Firefox Apple Safari Google Chrome
54
Secure Sockets Layer (SSL) and HTTPS (Hypertext Transfer Protocol over SSL)
HTTP is not secure Requirements for secure Internet applications Authentication Encryption Nonrepudiation SSL and HTTPS offer security Exam Tip (p. 228): HTTP is a perfect example of a common network vulnerability and threat, an unsecure protocol. Other vulnerabilities include open ports, like we discussed earlier, and other unsecure protocols that we’ll hit next. For more in-depth coverage of vulnerabilities, see Chapter 19.
55
Secure Sockets Layer (SSL)
Developed by Netscape Uses public key to encrypt information Sends encrypted data over an SSL connection The receiving end decrypts using a private key Supported by Web browsers and servers Many Web sites use SSL for confidential data Look for HTTPS or a small lock icon in browser
56
HTTP Over SSL (HTTPS) (1 of 2)
Uses TCP port 443 Being replaced by Transport Layer Security (TLS) Functionally the same with Web pages TLS is covered more in Chapter 11 Exam Tip (p.229): Many techs refer to HTTPS as Hypertext Transfer Protocol Secure, probably because it’s easier to explain to non-techs that way. Don’t be surprised to see it listed this way on the CompTIA Network+ exam. Exam Tip (p. 229): HTTP enables you to access the Web, but HTTPS gets you there securely. HTTPS uses TLS to provide the security.
57
HTTP Over SSL (HTTPS) (2 of 2)
Figure Secure Web page
58
Telnet and SSH (1 of 3) Telnet allowed dumb terminals to connect to more than one mainframe Run commands as if sitting at the mainframe Uses port 23 Telnet server access requires logon with user name and password, but has no encryption Secure Shell (SSH) replaced Telnet providing data encryption and authentication Note (p. 230): A dumb terminal is a local system—generally a monitor, keyboard, and mouse—that enables you to access a distant system that has all the computing power. The dumb terminal can’t do any work on its own, even though it might look like a personal computer. Note (p. 230): Telnet only enables command-line remote access; it does not enable GUI access. If you want to access another computer’s desktop remotely, you need another type of program.
59
Figure 8.19 WANG dumb terminal
Telnet and SSH (2 of 3) Figure WANG dumb terminal
60
Telnet and SSH (3 of 3) Figure Telnet client
61
Telnet/SSH Servers and Clients (1 of 4)
telnetd: oldest Telnet server Windows comes with a basic Telnet server Disabled by default Third-party server example: freeSSHd All popular, modern Telnet servers are also SSH servers Third-party Telnet/SSH client example: PuTTY
62
Telnet/SSH Servers and Clients (2 of 4)
Figure freeSSHd
63
Telnet/SSH Servers and Clients (3 of 4)
Figure macOS Telnet
64
Telnet/SSH Servers and Clients (4 of 4)
Figure PuTTY
65
Configuring a Telnet/SSH Client
When configured, you must provide: The host name A valid login name The password Open systems provide the password when the login name is given or require no login/password Exam Tip (p. 232): Telnet and SSH enable you to control a remote computer from a local computer over a network.
66
SSH and the Death of Telnet
With SSH, both logins and data transmittals are encrypted Must have permission to access the server SSH uses port 22 Exam Tip (p. 233): SSH enables you to control a remote computer from a local computer over a network, just like Telnet. Unlike Telnet, SSH enables you to do it securely!
67
Electronic Mail (E-mail) (1 of 2)
Major part of the Internet revolution Has streamlined the junk mail industry Provides a quick way for people to communicate Sends messages and attachments Normally offered as a free service by ISPs Most clients have simple text editors Many can be configured to use more sophisticated editors
68
Electronic Mail (E-mail) (2 of 2)
Incoming messages are stored on the server Most clients notify you when new message arrives, or download automatically You manage messages (archive, forward, print, delete, and more) Most programs delete downloaded messages from the server
69
E-mail Application-level Protocols
SMTP POP3 IMAP4 Note (p.233): A zillion smartphone users access through Exchange ActiveSync, a proprietary Microsoft protocol. Like IMAP4, ActiveSync enables synchronization of among devices, so you can access mail via a desktop Microsoft Outlook client and on your smartphone with an app. Although it’s not on the CompTIA Network+ exam, we’ll explore Exchange ActiveSync in more detail in Chapter 16 because it’s in widespread use today.
70
Simple Mail Transfer Protocol (SMTP)
Used to send Travels over TCP port 25 Used by clients to send messages
71
Post Office Protocol Version 3 (POP3)
One of two protocols used to retrieve from SMTP servers Uses TCP port 110 POP3 use is declining in favor of IMAP4
72
Internet Message Access Protocol Version 4 (IMAP4)
Alternative to POP3 Retrieves from an server Uses TCP port 143 Supports features not supported by POP3 Search messages by keyword Select messages before download Supports folders on IMAP4 servers
73
Alternatives to SMTP, POP3, and IMAP4 (1 of 2)
Web-based Access your from anywhere Free Handy for throw-away accounts Proprietary solutions Exam Tip (p. 234): The CompTIA Network+ exam has viewed Web-based as one of many Web services. Web services also include applications that you access on the Internet, like Google Docs and Google Sheets, online word processing and spreadsheet programs, respectively. You might run into a question that uses this phrase, though most likely you’ll see Cloud-based services. See Chapter 15 for more on the Cloud. The major contrast between Web services and local services involves access. Web services offer access from any machine, as long as that machine is connected to the Internet. Local applications (usually) require local access, but don’t need any other connectivity.
74
Alternatives to SMTP, POP3, and IMAP4 (2 of 2)
Figure Gmail in action
75
E-mail Servers (1 of 4) The e-mail server market is fragmented
Two types dominate the market Exim (over 50% of the market) Postfix
76
Figure 8.25 cPanel used to manage Exim mail server
Servers (2 of 4) Figure cPanel used to manage Exim mail server
77
E-mail Servers (3 of 4) Microsoft Exchange Server (both SMTP and POP3)
Only runs on Windows Mailboxes: holding areas on mail server for each user’s messages Server arranges incoming messages Server returns messages with unknown recipient Difficult to manage
78
Figure 8.26 Microsoft Exchange Server
Servers (4 of 4) Figure Microsoft Exchange Server
79
Client (1 of 2) Enables you to send, receive, and organize Communicates with: SMTP server to send IMAP or POP3 server to download messages Hundreds of client programs Microsoft Outlook Mozilla Thunderbird
80
Figure 8.27 Microsoft Outlook
Client (2 of 2) Figure Microsoft Outlook
81
Configuring an E-mail Client (1 of 2)
Obtain the server’s domain name and your mailbox user name and password Enter the POP3 or IMAP4 server’s domain name and the SMTP server’s domain name Enter the user name and password of the account
82
Configuring an E-mail Client (2 of 2)
Figure Entering server information in Microsoft Outlook
83
File Transfer Protocol (FTP)
The original Internet file transfer protocol Faster and more reliable than HTTP Includes security and data integrity TCP ports 20 and 21, by default Anonymous or secured sites Some are both
84
FTP Servers (1 of 2) Store files Accept incoming connections
Verify user names and passwords Transfer files Easy to set up Most versions of Linux/UNIX have built-in FTP servers; many third-party servers offer better solution Note (p. 238): Most Web servers are also FTP servers. These bundled versions of FTP servers are robust but do not provide all the options one might want.
85
Figure 8.29 FileZilla Server
FTP Servers (2 of 2) Figure FileZilla Server
86
FTP Is Not Very Secure Data transfers are not encrypted by default
Add usernames and passwords to provide some level of protection Determine the number of clients you wish to support Most anonymous FTP sites limit the number of users to 500 Try This! Doing FTP (p. 238) Never done FTP? Do a Web search for “Public FTP servers” and try accessing them from your Web browser. Then download a dedicated FTP client and try again! There are thousands of public FTP servers out there.
87
FTP Clients (1 of 3) You can access FTP servers many ways
Web site Command line FTP client applications Some Web browsers support FTP, but lack features Dedicated FTP clients work best FileZilla client; CyberDuck Note (p. 238): Every operating system has a command-line FTP client. I avoid using them unless I have no other choice because they lack important features like the ability to save FTP connections to use again later.
88
Figure 8.30 FTP in a Web browser
FTP Clients (2 of 3) Figure FTP in a Web browser
89
Figure 8.31 CyberDuck dedicated FTP client
FTP Clients (3 of 3) Figure CyberDuck dedicated FTP client
90
Active versus Passive FTP
Traditional FTP uses active process Clients send an FTP request on TCP port 21 Server responds on an ephemeral destination port with TCP port 20 as the source port Passive FTP server works with NAT Client sends an FTP request on TCP port 21 Server sends back a random listening port number; client sends data to that port Note (p. 240): Trivial File Transfer Protocol (TFTP) is used for transferring files and has a similar-sounding name to FTP, but beyond that it is very different. TFTP uses UDP port 69 and does not use user names and passwords, although you can usually set some restrictions based on the client’s IP address. TFTP is not at all secure, so never use it on any network that’s less than trustworthy. Check out the excellent Chapter 8 “Ports and Protocols” Challenge! over at totalsem.com/007. It’ll help greatly in memorizing the port numbers that each protocol uses.
91
Internet Applications
TCP/UDP Port Notes HTTP TCP 80 The Web HTTPS 443 The Web, securely Telnet 23 Terminal emulation SSH 22 Secure terminal emulation SMTP 25 Sending POP3 110 delivery IMAP4 143 FTP 20/21 (active) 21 (passive) File transfer TFTP UDP 69
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.