Download presentation
Presentation is loading. Please wait.
1
Application layer Lecture 7
2
Introduction Having finished all the previous layers , we now come to the layer where all the applications are found. The layers below the application layer are there to provide transport services, but they do not do real work for users. However, even in the application layer there is a need for support protocols, to allow the applications to function. Accordingly, we will look at an important one of these protocols. The item in question is DNS, which handles naming within the Internet. Note that there is three real applications: electronic mail, the World Wide Web, and multimedia.
3
HTTP, FTP Application layer message TCP, UDP Transport layer segment
Protocol Layer PDU HTTP, FTP Application layer message TCP, UDP Transport layer segment ICMP, IP Network layer datagram PPP, Ethernet, Data link layer frame IEEE Behrouz A. Forouzan” Data communications and Networking
4
1. Domain Name System https://www.youtube.com/watch?v=sABA3S1NtlE
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
5
Introduction There are several applications in the application layer of the Internet model that follow the client/server paradigm. The client/server programs can be divided into two categories: Application that directly used by the user, such as Application that support other application programs. The Domain Name System (DNS) is a supporting program that is used by other programs such as .
6
Introduction To identify an entity, TCP\IP protocols use the IP address, which uniquely identifies the connection of a host to the Internet. However, people prefer to use names instead of numeric addresses. Therefore, we need a system that can map a name to an address or an address to a name, which is the DNS server
7
Figure Example of using the DNS service
DNS server Figure shows an example of how a DNS client/server program can support an program to find the IP address of an recipient A user of an program may know the address of the recipient The DNS client program sends a request to a DNS server to map the address to the corresponding IP address After that, DNS will response to the client with the IP address
8
Hierarchical 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. Name space can be Flat name space A name is assigned to an address. A name in this space is a sequence of characters without structure. Hierarchical name space In a hierarchical name space, each name is made of several parts. The first part can define the nature of the organization, the second part can define the name of an organization, the third part can define departments in the organization, and so on. Important example : For example, assume two colleges and a company call one of their computers challenger. The first college is given a name by the central authority such as jhda.edu, the second college is given the name berkeley.edu, and the company is given the name smart. com. When these organizations add the name challenger to the name they have already been given, the end result is three distinguishable names: challenger.jhda.edu, challenger.berkeley.edu, and challenger.smart.com. The names are unique without the need for assignment by a central authority. The central authority controls only part of the name, not the whole.
9
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.
10
DOMAIN NAME SPACE Label : Domain Name:
Each node in the tree has a label, which is a string with a maximum of 63 characters. The root label is a null string (empty string). Domain Name: Each node in the tree has a domain name. A full domain name is a sequence of labels separated by dots Fully Qualified Domain Name Partially Qualified Domain Name
11
Figure 25.3 Domain names and labels
12
DOMAIN NAME SPACE Domain :
A domain is a sub tree of the domain name space. The name of the domain is the domain name of the node at the top of the sub tree.
13
Hierarchy of Name Servers:
With huge information, there is a need to distribute the information among many computers called DNS servers. One way to do this is to divide the whole space into many domains based on the first level. we let the root stand alone and create as many domains (subtrees) as there are first-level nodes
14
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. Topics Generic Domains Country Domains Inverse Domain
15
DNS IN THE INTERNET 1. Generic Domains
The generic domains define registered hosts according to their generic behavior. Each node in the tree defines a domain Example : .com , .gov
16
2. Country Domains The country domains section uses two- character country abbreviations (e.g., us for United States). Second labels can be organizational, or they can be more specific, national designations. The United States, for example, uses state abbreviations as a subdivision of us (e.g., ca.us.).
17
3. Inverse domain The inverse domain is used to map an address to a name. This may happen, for example, when a server has received a request from a client to do a task. Although the server has a file that contains a list of authorized clients, only the IP address of the client (extracted from the received IP packet) is listed. Mapping a name to an address or an address to a name is called name-address resolution.
18
2. Remote logging & FTP https://www.youtube.com/watch?v=sABA3S1NtlE
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
19
Introduction The main task of the Internet is to provide services for users. The most popular applications are: remote logging electronic mail file transfer
20
1. REMOTE LOGGING In the Internet, users may want to run application programs at a remote site and create results that can be transferred to their local site. One way to satisfy that demand is to create a client/server application program for each desired service. The better solution is a general-purpose client/server program that lets a user access any application program on a remote computer;
21
TELNET TELNET is a general-purpose client/server application program.
TELNET is an abbreviation for TErminaL NETwork. It’s enable the establishment of a connection to a remote .
22
Logging users are part of the system with some right to access resources. Each authorized user has an identification and password. The user identification defines the user as part of the system. To access the system, the user logs into the system with a user id or log-in name and password. to prevent an unauthorized user from accessing the resources.
23
Network Virtual Terminal
We are dealing with heterogeneous systems. If we want to access any remote computer in the world, we must first know what type of computer we will be connected to. we must also install the specific terminal emulator used by that computer. TELNET solves this problem by defining a universal interface called the network virtual terminal (NVT) character set.
24
Network Virtual Terminal
The client TELNET translates characters (data or commands) into NVT form and delivers them to the network. The server TELNET, on the other hand, translates data and commands from NVT form into the form acceptable by the remote computer.
25
2. FILE TRANSFER File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from one host to another which is not as it seems simple and straightforward. Before transferring, some problems must be dealt with first, such as: Two systems may use different file name conventions. Two systems may have different ways to represent text and data. Two systems may have different directory structures. All of these problems have been solved by FTP in a very simple and elegant approach.
26
FILE TRANSFER FTP differs from other client-server applications in that it establishes two connections between the hosts. One connection is used for data transfer, the other for control information (commands and responses). We need to transfer only a line of command or a line of response at a time. Separation of commands and data transfer makes FTP more efficient. FTP uses the control connection to establish a communication between the client control process and the server control process.
27
FTP In details
28
File Type – (data transfer connection)
FTP can transfer one of the following file types across the data connection: ASCII file. EBCDIC file Image file. The ASCII file is the default format for transferring text files. Each character is encoded using 7-bit ASCII. The sender transforms the file from its own representation into ASCII characters, and the receiver transforms the ASCII characters to its own representation. The EBCDIC file used If one or both ends of the connection use EBCDIC encoding (the file format used by IBM). The image file is the default format for transferring binary files. The file is sent as continuous streams of bits without any interpretation or encoding. This is mostly used to transfer binary files such as compiled programs.
29
Commands – (control connection)
Commands are divided into six groups: access commands file management commands data formatting commands port defining commands file transferring commands miscellaneous commands
30
File Transfer File transfer in FTP means one of three things:
Retrieving: A file is to be copied from the server to the client. It is done under the supervision of the RETR command. Storing: A file is to be copied from the client to the server. It is done under the supervision of the STOR command. List: A list of directory or file names is to be sent from the server to the client. This is done under the supervision of the LIST command. FTP treats a list of directory or file names as a file.
31
File Transfer
32
Anonymous FTP To use FTP, a user needs an account (user name) and a password on the remote server. Some sites have a set of files available for public access, to enable anonymous FTP. To access these files, a user does not need to have an account or password. The user can use anonymous as the user name and guest as the password. User access to the system is very limited. Some sites allow anonymous users only a subset of commands. For example, most sites allow the user to copy some files, but do not allow navigation through the directories.
33
Another common protocol used by the Internet HTTP
34
HTTP: Hyper Transfer Protocol
What is HTTP? Hypertext Transfer Protocol – the Web’s application layer protocol HTTP is an request-response client-server protocol . An HTTP client sends a request message to an HTTP server. The server, in turn, returns a response message Prosperities: Pipelined – requests sent as soon as it is encountered Persistent – multiple objects can be sent over a single TCP connection between the server and the client
35
Whenever you issue a URL from your browser to get a web resource using HTTP, the browser turns the URL into a request message and sends it to the HTTP server. The HTTP server interprets the request message, and returns you an appropriate response message, which is either the resource you requested or an error message There are 4 parts in a URL (Uniform Resource Locator ) Protocol: The application-level protocol used by the client and server, e.g., HTTP, FTP, and telnet. Hostname: The DNS domain name or IP address of the server. Port: The TCP port number that the server is listening for incoming requests from the clients. Path-and-file-name: The name and location of the requested resource, under the server document base directory.
36
The end The end of this course
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.