Presentation is loading. Please wait.

Presentation is loading. Please wait.

UNIT V APPLICATION LAYER.

Similar presentations


Presentation on theme: "UNIT V APPLICATION LAYER."— Presentation transcript:

1 UNIT V APPLICATION LAYER

2 ELECTRONIC MAIL One of the most popular Internet services is electronic mail ( ). The designers of the Internet probably never imagined the popularity of this application program. Its architecture consists of several components that we discuss in this chapter.

3 When the sender and the receiver of an e-mail are on the same system,
First scenario in electronic mail When the sender and the receiver of an are on the same system, we need only two user agents.

4 need two UAs and a pair of MTAs (client and server).
Second scenario in electronic mail When the sender and the receiver of an are on different systems, we need two UAs and a pair of MTAs (client and server).

5 of MTAs (client and server).
Third scenario in electronic mail When the sender is connected to the mail server via a LAN or a WAN, we need two UAs and two pairs of MTAs (client and server).

6 Fourth scenario in electronic mail

7 Push versus pull in electronic email
When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two UAs, two pairs of MTAs and a pair of MAAs. This is the most common situation today.

8 Some examples of command-driven user agents are mail, pine, and elm.
Services of user agent Some examples of command-driven user agents are mail, pine, and elm. Some examples of GUI-based user agents are Eudora, Outlook, and Netscape.

9 Format of an

10 address

11 MIME

12 MIME header

13 Data types and subtypes in MIME

14 Content-transfer-encoding

15 SMTP range Commands and responses Command format

16 Table Commands

17 Table Responses

18 Table Responses (continued)

19 Example 26.3 Let us see how we can directly use SMTP to send an and simulate the commands and responses we described in this section. We use TELNET to log into port 25 (the well-known port for SMTP). We then use the commands directly to send an . In this example, is sending an to himself. The first few lines show TELNET trying to connect to the Adelphia mail server. After connection, we can type the SMTP commands and then receive the responses, as shown on the next slide. Note that we have added, for clarification, some comment lines, designated by the “=” signs. These lines are not part of the procedure. $ telnet mail.adelphia.net 25 Trying Connected to mail.adelphia.net ( ).

20 Example 26.3 (continued)

21 POP3 and IMAP4

22 The exchange of commands and responses in POP3

23 HTTP uses the services of TCP on well-known port 80.
The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide Web. HTTP functions as a combination of FTP and SMTP. HTTP uses the services of TCP on well-known port 80.

24 HTTP transaction

25 Request and response messages

26 Request and status lines
Table Methods

27 Status codes

28 Status codes (continued)

29 Header format General headers

30 Table Request headers

31 Table Response headers
Table Entity headers

32 Example 27.1 This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1. The request line shows the method (GET), the URL, and the HTTP version (1.1). The header has two lines that show that the client can accept images in the GIF or JPEG format. The request does not have a body. The response message contains the status line and four lines of header. The header lines define the date, server, MIME version, and length of the document. The body of the document follows the header (see Figure).

33 Example 27.2 In this example, the client wants to send data to the server. We use the POST method. The request line shows the method (POST), URL, and HTTP version (1.1). There are four lines of headers. The request body contains the input information. The response message contains the status line and four lines of headers. The created document, which is a CGI document, is included as the body (see Figure).

34 HTTP version 1.1 specifies a persistent connection by default.
Example 27.3 HTTP uses ASCII characters. A client can directly connect to a server using TELNET, which logs into port 80 (see next slide). The next three lines show that the connection is successful. We then type three lines. The first shows the request line (GET method), the second is the header (defining the host), the third is a blank, terminating the request. The server response is seven lines starting with the status line. The blank line at the end terminates the server response. The file of 14,230 lines is received after the blank line (not shown here). The last line is the output by the client. HTTP version 1.1 specifies a persistent connection by default.

35 Example 27.3 (continued)

36 Traditional Applications
The University of Adelaide, School of Computer Science 16 November 2018 Traditional Applications Web Services Much of the motivation for enabling direct application-to-application communication comes from the business world. Historically, interactions between enterprises—businesses or other organizations—have involved some manual steps such as filling out an order form or making a phone call to determine whether some product is in stock. Even within a single enterprise it is common to have manual steps between software systems that cannot interact directly because they were developed independently. Increasingly such manual interactions are being replaced with direct application-to application interaction. Chapter 2 — Instructions: Language of the Computer

37 The University of Adelaide, School of Computer Science
16 November 2018 Web Services An ordering application at enterprise A would send a message to an order fulfillment application at enterprise B, which would respond immediately indicating whether the order can be filled. Perhaps, if the order cannot be filled by B, the application at A would immediately order from another supplier, or solicit bids from a collection of suppliers. Two architectures have been advocated as solutions to this problem. Both architectures are called Web Services, taking their name from the term for the individual applications that offer a remotely-accessible service to client applications to form network applications. Chapter 2 — Instructions: Language of the Computer

38 The University of Adelaide, School of Computer Science
16 November 2018 Web Services The terms used as informal shorthand to distinguish the two Web Services architectures are SOAP and REST (as in, “the SOAP vs. REST debate”). The SOAP architecture’s approach to the problem is to make it feasible, at least in theory, to generate protocols that are customized to each network application. The key elements of the approach are a framework for protocol specification, software toolkits for automatically generating protocol implementations from the specifications, and modular partial specifications that can be reused across protocols. The REST architecture’s approach to the problem is to regard individual Web Services as World Wide Web resources—identified by URIs and accessed via HTTP. Chapter 2 — Instructions: Language of the Computer

39 The University of Adelaide, School of Computer Science
16 November 2018 Web Services Essentially, the REST architecture is just the Web architecture. The Web architecture’s strengths include stability and a demonstrated scalability (in the network-size sense). Custom Application Protocols (WSDL, SOAP) The architecture informally referred to as SOAP is based on Web Services Description Language (WSDL) and SOAP.4 Both of these standards are issued by the World Wide Web Consortium (W3C). This is the architecture that people usually mean when they use the term Web Services without any preceding qualifier. Chapter 2 — Instructions: Language of the Computer

40 Domain Name System Example of using the DNS service

41 NAME SPACE DOMAIN NAME SPACE
To be unambiguous, the names assigned to machines must be carefully selected from a name space with complete control over the binding between the names and IP addresses. DOMAIN NAME SPACE To have a hierarchical name space, a domain name space was designed. In this design the names are defined in an inverted-tree structure with the root at the top. The tree can have only 128 levels: level 0 (root) to level 127.

42 Domain name space

43 Domain names and labels

44 FQDN and PQDN Domains

45 DISTRIBUTION OF NAME SPACE
The information contained in the domain name space must be stored. However, it is very inefficient and also unreliable to have just one computer store such a huge amount of information. In this section, we discuss the distribution of the domain name space. Hierarchy of name servers

46 When the secondary downloads
Zones and domains A primary server loads all information from the disk file; the secondary server loads all information from the primary server. When the secondary downloads information from the primary, it is called zone transfer.

47 DNS IN THE INTERNET DNS is a protocol that can be used in different platforms. In the Internet, the domain name space (tree) is divided into three different sections: generic domains, country domains, and the inverse domain. DNS IN THE INTERNET

48 Generic domains

49 Generic domain labels

50 Country domains

51 Inverse domain

52 RESOLUTION Mapping a name to an address or an address to a name is called name-address resolution. Recursive resolution

53 Iterative resolution

54 DNS MESSAGES DNS has two types of messages: query and response. Both types have the same format. The query message consists of a header and question records; the response message consists of a header, question records, answer records, authoritative records, and additional records. Query and response messages

55 Header format

56 TYPES OF RECORDS REGISTRARS
Two types of records are used in DNS. The question records are used in the question section of the query and response messages. The resource records are used in the answer, authoritative, and additional information sections of the response message. REGISTRARS How are new domains added to DNS? This is done through a registrar, a commercial entity accredited by ICANN. A registrar first verifies that the requested domain name is unique and then enters it into the DNS database. A fee is charged.

57 DNS can use the services of UDP or TCP using the well-known port 53.
DYNAMIC DOMAIN NAME SYSTEM (DDNS) The DNS master file must be updated dynamically. The Dynamic Domain Name System (DDNS) therefore was devised to respond to this need. In DDNS, when a binding between a name and an address is determined, the information is sent, usually by DHCP to a primary DNS server. The primary server updates the zone. The secondary servers are notified either actively or passively. ENCAPSULATION DNS can use either UDP or TCP. In both cases the well-known port used by the server is port 53. UDP is used when the size of the response message is less than 512 bytes because most UDP packages have a 512-byte packet size limit. If the size of the response message is more than 512 bytes, a TCP connection is used. DNS can use the services of UDP or TCP using the well-known port 53.

58 SIMPLE NETWORK MANAGEMENT PROTOCOL (SNMP)
The Simple Network Management Protocol (SNMP) is a framework for managing devices in an internet using the TCP/IP protocol suite. It provides a set of fundamental operations for monitoring and maintaining an internet.

59 SNMP concept Components of network management on the Internet

60 SNMP defines the format of packets exchanged between a manager and an agent. It reads and changes the status (values) of objects (variables) in SNMP packets. SMI defines the general rules for naming objects, defining object types (including range and length), and showing how to encode objects and values. SMI does not define the number of objects an entity should manage or name the objects to be managed or define the association between the objects and their values.

61 MIB creates a collection of named objects, their types, and their relationships to each other in an entity to be managed. We can compare the task of network management to the task of writing a program. ❏ Both tasks need rules. In network management this is handled by SMI. ❏ Both tasks need variable declarations. In network management this is handled by MIB. ❏ Both tasks have actions performed by statements. In network management this is handled by SNMP.

62 Management overview

63 All objects managed by SNMP are given an object identifier.
Object attributes All objects managed by SNMP are given an object identifier. The object identifier always starts with

64 Object identifier

65 Data type

66 Table Data types

67 Conceptual data types Encoding format

68 Table Codes for data types
Length format

69 Example 28.1 Figure 28.11 shows how to define INTEGER 14.
Figure Example 28.1, INTEGER 14

70 Example 28.2 Figure 28.12 shows how to define the OCTET STRING “HI”.
Figure Example 28.2, OCTET STRING “HI”

71 Example 28.3 Figure shows how to define ObjectIdentifier (iso.org.dod.internet). Figure Example 28.3, ObjectIdentifier

72 Example 28.4 Figure 28.14 shows how to define IPAddress 131.21.14.8..
Figure Example 28.4, IPAddress

73 mib-2 udp group

74 udp variables and tables

75 Indexes for udpTable

76 Lexicographic ordering

77 SNMP PDUs

78 SNMP PDU format

79 SNMP message Types of errors

80 Codes for SNMP messages

81 Example 28.5 In this example, a manager station (SNMP client) uses the GetRequest message to retrieve the number of UDP datagrams that a router has received. There is only one VarBind entity. The corresponding MIB variable related to this information is udpInDatagrams with the object identifier The manager wants to retrieve a value (not to store a value), so the value defines a null entity. Figure shows the conceptual view of the packet and the hierarchical nature of sequences. We have used white and colored boxes for the sequences and a gray one for the PDU. The VarBind list has only one VarBind. The variable is of type 06 and length 09. The value is of type 05 and length 00. The whole VarBind is a sequence of length 0D (13). The VarBind list is also a sequence of length 0F (15). The GetRequest PDU is of length ID (29). Now we have three OCTET STRINGs related to the security parameter, security model, and flags. Then we have two integers defining maximum size (1024) and message ID (64). The header is a sequence of length 12, which we left blank for simplicity. There is one integer, version (version 3). The whole message is a sequence of 52 bytes. Figure shows the actual message sent by the manager station (client) to the agent (server).

82 Example 28.5

83 GetRequest message

84 Port numbers for SNMP


Download ppt "UNIT V APPLICATION LAYER."

Similar presentations


Ads by Google