UNIT V APPLICATION LAYER.

Slides:



Advertisements
Similar presentations
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Advertisements

TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 23 Electronic Mail: SMTP,
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 24 Network Management: SNMP.
TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.
TCP/IP Protocol Suite 1 Chapter 20 Upon completion you will be able to: Electronic Mail: SMTP, POP, and IMAP Understand four configurations of architecture.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 23 Electronic Mail: SMTP,
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
25.1 Chapter 25 Domain Name System Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
DOMAIN NAME SYSTEM. Introduction  There are several applications that follow client server paradigm.  The client/server programs can be divided into.
Domain Name System ( DNS )  DNS is the system that provides name to address mapping for the internet.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
26.1 Chapter 26 Remote Logging, Electronic Mail, and File Transfer Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
Network Management: SNMP
Electronic Mail: SMTP, POP, and IMAP
McGraw-Hill The McGraw-Hill Companies, Inc., 2000 SNMP Simple Network Management Protocol.
TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.
Ch25 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 23 Simple Network Management Protocol (SNMP)
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
TCP/IP Protocol Suite 1 Chapter 20 Upon completion you will be able to: Electronic Mail: SMTP, POP, and IMAP Understand four configurations of architecture.
26.1 Chapter 26 Remote Logging, Electronic Mail, and File Transfer Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
Computer Networks26-1 Chapter 26. Remote Logging, Electronic Mail and File Transfer.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
25.1 Chapter 25 Domain Name System Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 25 (Data Communication & Networking Book): Domain Name System (DNS) 1.
Chapter 17 Domain Name System
25.1 Chapter 25 Domain Name System Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
Domain Name System CH 25 Aseel Alturki
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 26 (Data Communication and Networking): Remote Logging, Electronic Mail, and.
1 Kyung Hee University Chapter 18 Domain Name System.
SNMP 1. SNMP is an Internet protocol developed by the IETF. It is designed to facilitate the exchange of management information between network elements.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Electronic Mail: SMTP, POP IMAP, and MIME.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
26.1 Chapter 26 Remote Logging, Electronic Mail, and File Transfer Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
Chapter 27 Network Management Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Internet Protocol Version4 (IPv4)
Domain Name System: DNS To identify an entity, TCP/IP protocols use the IP address, which uniquely identifies the Connection of a host to the Internet.
Chapter 26 Standard Client-Server Protocols
SNMP.
CS 372 COMPUTER COMMUNICATION AND NETWORKS
Network Management: SNMP
Application layer Lecture 7.
Remote Logging, Electronic Mail, and File Transfer
Instructor Materials Chapter 5 Providing Network Services
Chapter 25 Domain Name System.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Working at a Small-to-Medium Business or ISP – Chapter 7
Net 323 D: Networks Protocols
Chapter 19 Domain Name System (DNS)
Web Development & Design Chapter 1, Sections 4, 5 & 6
Traditional Internet Applications
Working at a Small-to-Medium Business or ISP – Chapter 7
Application layer Lecture 7.
Working at a Small-to-Medium Business or ISP – Chapter 7
Process-to-Process Delivery:
Chapter 25 Domain Name System
Remote Logging, Electronic Mail,
Chapter 25 Domain Name System
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Domain Name System: DNS
Computer Networks Presentation
Presentation transcript:

UNIT V APPLICATION LAYER

ELECTRONIC MAIL One of the most popular Internet services is electronic mail (e-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.

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 e-mail are on the same system, we need only two user agents.

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

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).

Fourth scenario in electronic mail

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.

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.

Format of an e-mail

E-mail address

MIME

MIME header

Data types and subtypes in MIME

Content-transfer-encoding

SMTP range Commands and responses Command format

Table Commands

Table Responses

Table Responses (continued)

Example 26.3 Let us see how we can directly use SMTP to send an e-mail 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 e-mail. In this example, forouzanb@adelphia.net is sending an e-mail 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 e-mail procedure. $ telnet mail.adelphia.net 25 Trying 68.168.78.100 . . . Connected to mail.adelphia.net (68.168.78.100).

Example 26.3 (continued)

POP3 and IMAP4

The exchange of commands and responses in POP3

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.

HTTP transaction

Request and response messages

Request and status lines Table Methods

Status codes

Status codes (continued)

Header format General headers

Table Request headers

Table Response headers Table 27.6 Entity headers

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).

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).

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.

Example 27.3 (continued)

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

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

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

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

Domain Name System Example of using the DNS service

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.

Domain name space

Domain names and labels

FQDN and PQDN Domains

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

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.

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

Generic domains

Generic domain labels

Country domains

Inverse domain

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

Iterative resolution

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

Header format

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.

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.

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.

SNMP concept Components of network management on the Internet

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.

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.

Management overview

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 1.3.6.1.2.1.

Object identifier

Data type

Table Data types

Conceptual data types Encoding format

Table Codes for data types Length format

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

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

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

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

mib-2 udp group

udp variables and tables

Indexes for udpTable

Lexicographic ordering

SNMP PDUs

SNMP PDU format

SNMP message Types of errors

Codes for SNMP messages

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 1.3.6.1.2.1.7.1.0. The manager wants to retrieve a value (not to store a value), so the value defines a null entity. Figure 28.23 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 28.24 shows the actual message sent by the manager station (client) to the agent (server).

Example 28.5

GetRequest message

Port numbers for SNMP