Lecture 7 Application-Layer Protocols PDF

Document Details

UndauntedRetinalite

Uploaded by UndauntedRetinalite

Queensland University of Technology

Dr Vicky Liu

Tags

application layer protocols computer networking protocols internet

Summary

This lecture covers application-layer protocols, including DNS, HTTP, SMTP, FTP, Telnet, SSH, and DHCP. It explains their functionality, roles, and how they work within the context of a client-server model.

Full Transcript

Lecture 7 Application-Layer Protocols Dr Vicky Liu Lecturer/Unit Coordinator [email protected] 7. Application HTTP DNS Telnet SSH DHCP SMTP FTP … 6. Presentation 5. Session 4. Transport 3. Network 2. Data Link 1. Physical 2 Outline • Domain Name System (DNS) • Hypertext Transfer Protoco...

Lecture 7 Application-Layer Protocols Dr Vicky Liu Lecturer/Unit Coordinator [email protected] 7. Application HTTP DNS Telnet SSH DHCP SMTP FTP … 6. Presentation 5. Session 4. Transport 3. Network 2. Data Link 1. Physical 2 Outline • Domain Name System (DNS) • Hypertext Transfer Protocol (HTTP) • Simple Mail Transfer Protocol (SMTP) • File Transfer Protocol (FTP) • Telnet and Secure Socket Shell (SSH) • Dynamic Host Configuration Protocol (DHCP) 3 DNS • The service converts a human readable name into an IP address on a network. • It can be thought of as a White Pages or Yellow Pages directory service. DNS is like the phone book of the Internet. • DNS is a name-to-address resolution protocol that keeps a list of computer names and their IP addresses. – Using DNS, a user can use a computer’s name instead of using its IP address. • Applications that use DNS include World Wide Web (WWW), email, and instant messages. 4 Visiting a Web Site • When you enter library.qut.edu.au in your web browser, the DNS client service contacts the DNS server specified in the IP configuration of your operating system and requests that the name be resolved to an IP address • Once the IP address for the website is returned, your computer can contact the web server to request a web page. 5 DNS Structure - Root Servers • The DNS is a hierarchical naming system. • The top of that hierarchy is the root domain. • The root domain contains all top-level domains of the Internet. • Root servers are a network of hundreds of servers for redundancy in many countries around the world. 6 DNS Structure - Root Servers (cont.) • They are configured in the DNS root zone as 13 named authorities. – This does not mean that there are only 13 physical servers; each operator uses redundant computer equipment to provide reliable service – As of 2020-07-21, the root server system consists of 1086 instances operated by the 12 independent root server operators 7 DNS Structure - TLDs • • • • When you put all the names of a branch together, separated by periods, you have the fully qualified domain name (FQDN). The top of that hierarchy is the root domain. The root domain contains all top-level domains (TLDs) of the Internet. The two main types of TLDs – Country-code TLDs (ccTLDs) – Generic TLDs (gTLDs) 8 DNS Structure - ccTLDs • Specify with two-letter country code for countries – – – – Australia (.au), New Zealand (.nz), United Kingdom (.uk) … 9 DNS Structure - gTLDs • gTLDs represent with a set of three or more letter code the categories of the organisation – – – – – – – government (.gov) education (.edu) commercial (.com) military (.mil) organisation (.org) network (.net) .… 10 How do you choose between ccTLD and gTLD? 11 DNS Structure – 2nd level domains • Second-level domains are usually the name of a company or institution. • The subdomain level is optional and can consist of names separated by a period. • The host level represents individual computers hosting network services. • For example, in www.qut.edu.au, 'au' is the toplevel domain name, 'edu' is the second-level domain, 'qut' is the subdomain, and 'www' is the hostname. 12 DNS Server • DNS servers are composed of the following: – DNS zones – a database of primarily hostname and IP address pairs – Resource records – the unit of information entry in DNS zone files – Cache – results of queries are cached so that if the same query occurs again, the local DNS server can respond without having to contact another server – Root hints – file containing a list of all IP addresses of Internet root servers – DNS Server service – runs in the background and listens for DNS queries on UDP port 53 13 DNS Client • The DNS client is responsible for communicating with a DNS server to resolve computer and domain names to IP addresses • The DNS client is referred to as a “resolver” • An operating system (OS) must be configured at least one address of a DNS server that it can query 14 DNS Client In Windows, the first DNS server configured is called the preferred DNS server and the second one is the alternate DNS server 15 Authoritative and non-authoritative answers • An authoritative answer is when the DNS server hosting the DNS record responses to the DNS query. • An authoritative DNS server is used by domain name owners to store DNS records. It provides authoritative answers to DNS resolvers. • A DNS server provides answers for which they are not authoritative, the queried DNS record is not in its zone file. This is known as a nonauthoritative answer. 16 Iterative and recursive query in DNS • Recursive query – A query that demands a resolution or the answer – The initial request the resolver makes to the local server is a recursive query. The local DNS server must provide the information requested by the resolver • Iterative query – A query that does not demand resolution – When the local server issues queries to other servers, the other servers only provide information if they have it 17 Name Resolution Process DNS Server Root Local DNS Server 4. Query .com TLD server 1. Query for www.microsoft.com TLD Server 5 Try one of microsoft.com servers 8. The destination address is 203.0.19.190 .com DNS Server Visit www.microsoft.com Web Server microsoft.com 18 www.microsoft.com 1. 2. 3. 4. 5. 6. 7. 8. Query the IP address for www.microsoft.com Query to root server: If local DNS server does not recognize the domain name, then it queries the root server. Try one of these .com TLD servers Query .com TLD server: Contact one of the microsoft.com DNS servers Query to the microsoft.com DNS server The query is resolved Then the resolver returns the resolved IP address to the requester 19 Summary of DNS • Functionality of DNS • Hierarchical structure of DNS – Root, TLDs, subdomain-level domains • Roles for DNS clients and servers • Basic process of a DNS name resolution 20 Outline • Domain Name System (DNS) • Hypertext Transfer Protocol (HTTP) • Simple Mail Transfer Protocol (SMTP) • File Transfer Protocol (FTP) • Telnet and Secure Socket Shell (SSH) • Dynamic Host Configuration Protocol (DHCP) 21 WWW • The most popular service on the Internet • Immense collection of Web pages and other resources that can be downloaded across the Internet and displayed on a web browser • The main concept is hypertext • WWW is the set of linked hypertext documents that can be viewed on web browsers 22 Web Client • To communicate with a web server, using Hypertext Transfer Protocol (HTTP), – Firefox, IE, Chrome, etc. • To submit an HTTP request to the server 23 Web Server • To provide response message to the client • To provide web content that can be accessed through the Internet – Proprietary: Microsoft’s Internet Information Services (IIS) – Open source: Apache developed by Apache Software Foundation 24 WWW’s Major functional components • HyperText Markup Language (HTML) • Hypertext Transfer Protocol (HTTP) • Uniform Resource Locator (URI) 25 HyperText Markup Language (HTML) • Is the language used to create webpages • Describes the visual appearance of a document to be displayed by an Internet browser • Defines the structure and layout of a Web document by using a variety of tags and attributes – Title, lists, paragraph – Fonts, colors, positioning using CSS (Cascading Style Sheets) – Linking to another document or to a file 26 HTML (cont.-) 27 HTTP: Protocol of the World Wide Web • Originally, its main purpose was to transfer static web pages written in HTML • Now, it is also used for general file transfer and downloading/displaying multimedia files • The standard (and default) port for HTTP (Web) servers to listen on is 80, though they can use any port. • HTTP is an application-layer protocol based on TCP as its Transport-layer protocol • Functions as a request-response protocol in the clientserver computing model • Identifies and locates network resources by a Uniform Resource Locator (URL) 28 HTTP Encapsulation • Example of how the layers work together: – You start your Web browser with a Web site address – The web browser formats a request for your home page by using the Application layer protocol HTTP – The request looks something like: 29 HTTP Encapsulation (cont.-) • Example continued: – The Application-layer protocol HTTP passes the request down to the TCP – TCP adds a header to the request – The unit of information the Transport layer works with is called a segment – TCP passes the segment to the Internetwork layer protocol (IP) 30 HTTP Encapsulation (cont.-) • Example continued: – IP places its header on the segment: IP header TCP header Get the Website’s home page – The unit of information is now called a packet – The packet is passed down to the Network access layer, where the NIC operates – A frame header and trailer are added Frame header IP header TCP header Get the Website’s home page Frame Trailer – The frame is delivered to the network medium as bits • on its way to the Web server – The Web server processes it and returns a Web page 31 Locating a Resource Object on the Internet • Every object on the Internet has a unique Uniform Resource Locator (URL) • All URLs consist of four parts: – Service type – Host or domain name – Directory or subdirectory information – Filename http://www.qut.edu.au/study/example.htm ftp://opensaurce.com/public/utilities/installer.exe 32 Web Client/Server Communication The Client initiates a contact with the Web server to request for a service. The user types a URL into a Web browser: 1. The browser first contacts to a DNS for resolving the target’s IP address 2. The DNS replies with the corresponding IP address for the web server. 3. The web browser connects to the web server sending an HTTP request for the target website with a TCP 3-way handshake. 4. The web server receives the request and checks for the request message. If the requested page exists, then the web server replies it; else it sends an HTTP 404 error message. DNS server Client Web server 1 2 3 4 5 6 7 8 33 Source: https://web.stanford.edu/class/msande91si/www-spr04/readings/week1/InternetWhitepaper.htm Web Client/Server Communication (cont.) 5. The web browser receives the requested page and then the connection is closed. 6. The browser then parses through the web page information and looks for other page elements it needs to complete the web page. 7. For each element needed, the browser makes additional connections and HTTP requests to the server for each element. 8. When the browser has finished loading all images, info, etc. the page will be completely loaded in the browser window. Source: https://web.stanford.edu/class/msande91si/www-spr04/readings/week1/InternetWhitepaper.htm DNS server Client Web server 1 2 3 4 5 6 7 8 34 HTTP Summary • Roles for HTTP servers and clients • WWW’s major functional components – HTTP, HTML, URL • Web client/server communication process 35 Outline • Domain Name System (DNS) • Hypertext Transfer Protocol (HTTP) • Simple Mail Transfer Protocol (SMTP) • File Transfer Protocol (FTP) • Telnet and Secure Socket Shell (SSH) • Dynamic Host Configuration Protocol (DHCP) 36 Three E-mail protocols • Post Office Protocol version 3 (POP3) • Internet Message Access Protocol version 4 (IMAP4) • Simple Mail Transfer Protocol (SMTP) 37 Post Office Protocol version 3 (POP3) • Email clients use the POP3 to download incoming messages from an e-mail server to their local desktops • POP3 clients download e-mail from the mail server running at the user’s ISP, and these messages are then deleted from the server • POP3 uses TCP port 110 38 Internet Message Access Protocol version 4 (IMAP4) • IMAP4 has advanced message controls: – The capability to manage messages locally yet store them on a server – IMAP4 downloads only e-mail headers initially and then downloads the message body and attachments when the message is selected – IMAP4 uses TCP port 143 39 Simple Mail Transfer Protocol (SMTP) • It is the standard protocol for sending email over the Internet. • POP3 is used to retrieve e-mail and SMTP is used to send it. • SMTP uses TCP port 25 40 Summary of E-mail Protocols • All three email protocols are TCP-based protocols to ensure reliable delivery of email messages. • POP3 and IMAP are for mail retrievals and SMPT is for sending email messages • IMAP is designed to store messages on the mail server. It stores incoming and outgoing messages on the server in folders. • POP3 is designed to store messages on the local device. 41 Outline • Domain Name System (DNS) • Hypertext Transfer Protocol (HTTP) • Simple Mail Transfer Protocol (SMTP) • File Transfer Protocol (FTP) • Telnet and Secure Socket Shell (SSH) • Dynamic Host Configuration Protocol (DHCP) 42 FTP • FTP is a client/server protocol used to transfer files and manage files across a network: – FTP uses TCP ports 20 and 21 • Port 21 is for users sending control commands • Port 20 is for transferring file data – It is not a secure protocol, as user credentials and data are sent in plaintext • Uses URL for an FTP site begins with ftp://… • The 3 most common ways to access an FTP site: – Through a browser – Using a FTP client program – Issuing FTP commands at a text-based command prompt 43 Is FTP Still Used? • FTP was a revolutionary development when it was first introduced in the 1970s. • Within the last 40+ years, FTP has served as the foundation for various methods of sending data • FTP is outdated and insecure. 44 Outline • Domain Name System (DNS) • Hypertext Transfer Protocol (HTTP) • Simple Mail Transfer Protocol (SMTP) • File Transfer Protocol (FTP) • Telnet and Secure Socket Shell (SSH) • Dynamic Host Configuration Protocol (DHCP) 45 Telnet and SSH • Telnet and Secure Shell (SSH) – allows a user log into another computer remotely – Example: use to connect to a managed switch or router – Uses a well-known port: 23 on the server side – Is not a secure protocol • SSH – Uses TCP port 22 – Provides an encrypted channel between the client and server 46 PuTTY • PuTTY is a client program that supports Telnet along with SSH and Rlogin (remote login) network protocols. 47 Remote Desktop Software • Remote desktop software – Remote Desktop Protocol (RDP) • Uses Graphic User Interface (GUI) to manage/access Windows computers remotely – Independent Computing Architecture (ICA) – Virtual network computing (VNC) 48 Outline • Domain Name System (DNS) • Hypertext Transfer Protocol (HTTP) • Simple Mail Transfer Protocol (SMTP) • File Transfer Protocol (FTP) • Telnet and Secure Socket Shell (SSH) • Dynamic Host Configuration Protocol (DHCP) 49 DHCP • DHCP is used to automatically assign IP addresses as needed within a network. – When a computer is turned on, it requests an address from a DHCP server that is configured as a DHCP server – The DHCP server assigns an address to this client for a specific amount of time (called a lease) • DHCP Servers listen on UDP port 67 for IP address releases. • DHCP clients use UDP port 68 for IP address requests 50 DHCP Server A DHCP server is composed of the following: • IP address scope – a range of IP addresses the server leases to clients – Scope options – IP settings: • The default gateway, DNS servers, and other options – Reservations – an IP address tied to a particular MAC address • When the client’s MAC address matches an address specified by a reservation, the reserved IP is leased to the client instead of getting it form the scope – Exclusions – one or more IP addresses excluded from the IP address range, e.g. • If the scope ranges from 192.168.1.1 to 192.168.1.100, you can exclude addresses 192.168.1.1-192.168.1.10 for static IP assignment 51 DHCP Lease Process 1. During the boot process, a DHCP client broadcasts a DHCPDISCOVER message that it’s looking for a DHCP server 2. The DHCP server reserves an IP address for the client and makes a lease offer by sending a DHCPOFFER message to the client via unicast. 52 DHCP Lease Process (cont.) 3. The client responds with a DHCPREQUEST message via broadcast to accept the offered IP address. – If several DHCP servers respond to the request, the client accepts the first offer that it receives. 4. The DHCP server whose offer was accepted responds with a DHCPACK message via unicast. – It acknowledges the lease acceptance and contains the client’s IP address lease and 53 other IP addressing information. DHCP Lease Renewal Process After an address is leased – A record of the lease is stored in a database, including a lease expiration time – When 50% of the lease time has elapsed, the computer attempts to renew the lease from the same DHCP server that originally responded – If no response, the computer waits until the lease reaches 87.5%, a broadcast DHCP renewal request is sent • If no response when lease expires, the computer broadcasts a DCHP request for a new IP address 54 DHCP Server • Benefit of using DHCP – In a large network, it can keep track of assigned addresses and to which machine they are assigned. – Computers can easily be moved and requested new IP configuration from a DHCP server on the network. – IP lease time can be controlled. – IP addresses can be reusable for other computer. • DHCP uses UDP – DHCP servers are usually located on the same network and DHCP messages are short. 55 Summary of DHCP • • • • DHCP functionality DHCP server elements DHCP lease process DHCP renewal process 56 End of Lecture

Use Quizgecko on...
Browser
Browser