Unit-3 Application Layer.pdf
Document Details
Uploaded by Deleted User
Tags
Full Transcript
Unit-3 Application Layer Lecture Outline Introduction Principles Application-Level Protocol Application Layer Protocols and networks Application layer software Client/Server Model Peer-to-Peer (P2P) Network Model Common Port Numbers Domain Name...
Unit-3 Application Layer Lecture Outline Introduction Principles Application-Level Protocol Application Layer Protocols and networks Application layer software Client/Server Model Peer-to-Peer (P2P) Network Model Common Port Numbers Domain Name System servers Services WWW Service and HTTP E-mail services and SMTP/POP protocols File Transfer Protocol Dynamic Host Configuration Protocol Telnet File Sharing Services and SMB protocol Gnutella protocol Introduction The Application Layer is the most important and most visible layer in computer networks. Applications reside in this layer and human users interact via those applications through the network. Principles There are two important models used to organize a networked application. The first and oldest model is the client-server model. In this model, a server 0 30 provides services to clients that exchange information with it. This model is highly 0 asymmetrical : clients send requests and servers perform actions and return responses. It is illustrated in the figure below. Cont.…. The client-server model was the first model to be used to develop networked applications. 0 This model comes naturally from the mainframes and minicomputers that were the only networked computers used until the 1980s. A minicomputer is a multi-user system that is used by tens or more users at the same time. Each user interacts with the minicomputer by using a terminal. Those terminals, were mainly a screen, a keyboard and a cable directly connected to the minicomputer. Cont.… There are various types of servers as well as various types of clients. A web server provides information in response to the query sent by its clients. A print server prints documents sent as queries by the client. An email server will forward towards their recipient the email messages sent as queries while a music server will deliver the music requested by the client. From the viewpoint of the application developer, the client a and the server applications directly exchange messages (the horizontal arrows labeled Queries and Responses in the above figure), but in practice these messages are exchanged thanks to the underlying layers (the vertical arrows in the above figure). Cont.…. Networked applications do not exchange random messages. In order to ensure that the server is able to understand the queries sent by a client, and also that the client is able to understand the responses sent by the server, they must both agree on a set of syntactical and semantic rules. These rules define the format of the messages exchanged as well as their ordering. This set of rules is called an application-level protocol. Application-Level Protocol An application-level protocol is similar to a structured conversation between humans. Assume that X wants to know the current time but does not have a watch. If Y passes close by, the following conversation could take place : X: Hello Y : Hello X : What time is it ? Y : 11:55 X : Thank you Y : You’re welcome Such a conversation succeeds if both X and Y speak the same language. If X meets Z who only speaks Chinese, he/ she won’t be able to ask him the current time. A conversation between humans can be more complex. Cont.…. Application-Level Protocol Human conversations can be very formal, e.g. when soldiers communicate with their hierarchy, or informal such as when friends discuss. Computers that communicate are more akin to soldiers and require well- defined rules to ensure an successful exchange of information. There are two types of rules that define how information can be exchanged between computers : syntactical rules that precisely define the format of the messages that are exchanged. As computers only process bits, the syntactical rules specify how information is encoded as bit strings. organization of the information flow. For many applications, the flow of information must be structured and there are precedence relationships between the different types of information. Cont.…. Application-Level Protocol Application-layer protocols exchange two types of messages. Some protocols such as those used to support electronic mail exchange messages expressed as strings or lines of characters. As the transport layer allows hosts to exchange bytes, they need to agree on a common representation of the characters. The first and simplest method to encode characters is to use the ASCII. “ASCII The American Standard Code for Information Interchange (ASCII) is a character-encoding scheme that defines a binary representation for characters”. Applications Layer – allows user to interface with the network! Application Layer – Provides the interface between the applications on either end of the network. one past DNS serect HTTP EI yet SMTP not C pot fast pitch pmodaivrfnspatedsofd.tn'ified Transmission Control Protocol Open Systems Interconnection (TCP)/ Internet Protocol (IP) Protocols and networks Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway. Protocols DNS (Domain Name System) – Matches domain names with IP addresses t HTTP (Hyper Text Transfer Protocol) – Used to transfer data ae between clients/servers using a web browser isitifeng.edu erte SMTP (Simple Mail Transfer Protocol) & POP3 (Post Office Protocol 3) – used to send email messages from clients to servers over the internet FTP (File Transfer Protocol) – allows the download/upload of files between a client/server Telnet – allows users to login to a host from a remote location and take control as if they were sitting at the machine (virtual connection) DHCP (Dynamic Host Configuration Protocol) – assigns IP addresses, subnet masks, default gateways, DNS servers, etcs. To users as they login the network Application layer software 2 types Applications – Provide the human (user) interface. Relies on lower layers to complete the communication process. Man Services – establish an interface to the m network where protocols provide the rules and formats that govern how data is treated.. How data requests occur & are filled Client/server model Advantages: Centralized administration Security is easier to enforce Application layer services and protocols Peer-to-peer networking and applications Client/Server Model Client – device requesting information (initiates the data exchange) Can also UPLOAD data to the servers Server – device responding to the request How does it handle multiple request from multiple users and keep everything in order? Relies on support from the lower layer functions to distinguish between services and conversations. Server relies on a service called a server daemon – runs in the background and ‘listens’ for requests for that service. It can then exchange messages as appropriate & send requested data. Examples: E-mail Client on an employee computer issues a request to the e-mail server for any unread e-mail. The server responds by sending the e-mail to the client. Conversations can originate with either party. Peer-to-Peer (P2P) Network Model Two or more computers are connected and are able to share resources without having a dedicated server Every end device can function as a client or server on a ‘per request’ basis Resources are decentralized (information can be located anywhere) Difficult to enforce security and policies User accounts and access rights have to be set individually on each peer device P2P Applications Running applications in hybrid mode allows for a centralized directory of files even though the files themselves may be on multiple machines Unlike P2P networks, a device can act as both the client and server within the same communication Each device must provide a user interface and run a background service. Can be used on P2P networks, client/server networks and across the internet. P2P Applications Example add.ua Common Port Numbers filefdi TCP FTP – 20-21 The port numbers in the range from 0 to 1023 are the well-known... socket to an IP address using one of the well- 0 Telnet – 23 known ports. I SMTP – 25 sister I DNS – 53 (Both TCP & UDP) ii HTTP – 2 EE E. 80 UDP DHCP – 67 & 68 POP – 110 oppicktrucall Post UDP (User Datagram Protocol) is an alternative communications protocol to Transmission Control Protocol (TCP) used primarily for establishing low-latency and loss tolerating connections between applications on the Internet. Domain Name System servers Services A DNS hosting service is a service that runs Domain Name System servers. Most, but not all, domain name registrars include DNS hosting service with registration. Free DNS hosting services also exist. Many third-party DNS hosting services provide Dynamic DNS. DNS resolver – supports name resolution for other network applications and services that need it. Devices are usually given 1 or more DNS Server addresses they can use for name resolution. Uses different types of resource records to actually resolve the name/IP address issues DSN Services and Protocol DNS Servers resolve names to IP addresses. It would be difficult to remember the IP address of every website we like to visit, but we can remember names. THANK YOU DNS SERVER! WWW Service and HTTP Steps: 1) URL is typed in the address bar. 2) Browser checks with DNS server to convert it to an IP address 3) Connects to the server requested 4) Using HTTP or HTTPS protocol requirements, the browser sends a GET request to the server to ask for the desired html document (usually index.html) 5) The server sends the HTML code for the web page to the browser. 6) The browser interprets the HTML code and formats the page to fit the browser window. 7) See the next slide for an example. WWW Service and HTTP HTTP/HTTPS are some of the MOST used application protocols! E-mail services and SMTP/POP protocols E-mail is the most popular network service. E-mail client (when people compose e-mail) is called Mail User Agent (MUA) MUA allows messages to be sent/retrieved to and from your mailbox Requires several applications and services POP or POP3 – deliver email from server to client (incoming messages) SMTP – handles outbound messages from clients E-mail services and SMTP/POP protocols What do servers require? 1) Must be running SMTP! 2) Also operates 1) Mail Transfer Agent (MTA) – used to forward email 1) Receives email from the clients MUA 2) Uses SMTP to route email between SERVERS! 3) Passes email to the MDA for final delivery 2) Mail Delivery Agent (MDA) – receives messages from MUA or from the MTA on another server 3) For two e-mail servers to talk – MUST run SMTP and MTA in order to transfer mail between the 2 servers! 4) Some clients run Lotus Notes, Groupwise, or MS Exchange. They have their own proprietary protocol for handling e-mail. E-mail services and SMTP/POP protocols 0 so File Transfer Protocol Commonly used application layer protocol Allows for the transfer of files between clients/servers. Requires 2 connections to the server Commands – uses TCP port 21 8 1) 2) Actual data – uses TCP port 20 Dynamic Host Configuration Protocol Dynamic Host Configuration Protocol – enables devices to obtain IP addresses, subnet masks, gateways, DNS server information, etc. from a DHCP server. An IP address that is not being used is assigned from a range of available addresses Not permanently assigned – only leased for a specific period of time (usually 24 hours – 7 days) If the host logs off or the power is lost, the IP address they were using is returned to the pool to be re-assigned to another host when needed. This is how you are able to use Wi-Fi at various places in the world! Don’t use DHCP for devices such as servers, printers, routers, switches, etc. These should be statically assigned. This will be covered in greater detail in CCNA 4. Telnet Developed in the early 1970’s – among the oldest of the application layer protocols and services in the TCP/IP protocol suite. Allows users to emulate text-based terminal devices over the network using software. A connection is known as a ‘virtual terminal (vty)’ session. Can be run from the command prompt on a PC. You can use the device as if you were sitting there with all the rights and priorities that you username will offer you. Disadvantages: Doesn’t support encryption like SSH. All data is te transferred as plain text. It can be easily intercepted and understood. If security is a concern, you should use Secure Shell (SSH) protocol. Provides for remote logins with stronger authentication than telnet. Network Professionals should always use SSH whenever possible. Telnet File Sharing Services and SMB protocol Server Message Block SMB has become a mainstay of Microsoft networking, even more so since the introduction of Windows 2000 software. Allows servers to share their resources with clients Linux and Unix also share with Microsoft networks using a version of SMB called SAMBA. Apple also supports sharing resources using an SMB protocol What can SMB do? Start, authenticate, and terminate sessions Control file and printer access Allow applications to send/receive messages to/from another device File sharing services and SMB Application program interface (API) is a set of routines, protocols, and tools for building software applications. An API specifies how software components should interact and APIs are used when programming graphical user interface (GUI) components. The Gnutella protocol provides a simple reliable distribution system that Gnutella protocol delivers knowledge, literature, art and music to all. People can make files on their hard disks available to other users to download. Relies heavily on HTTP services. Client applications that use Gnutella are BearShare, LimeWire, Morpheus, WinMX, Gnucleus, etc.