TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.

Slides:



Advertisements
Similar presentations
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Advertisements

TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
2.1 Chapter 2 Network Models 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 13 Introduction to the Transport.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 24 Network Management: SNMP.
2.1 Chapter 2 Network Models 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 2 The OSI Model and the TCP/IP.
Remote Login: TELNET and
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Chapter 14 User Datagram Program (UDP)
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 18 Host Configuration: DHCP.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 10 Mobile IP.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
What Is TCP/IP? The large collection of networking protocols and services called TCP/IP denotes far more than the combination of the two key protocols.
Client Server Model and Software Design TCP/IP allows a programmer to establish communication between two application and to pass data back and forth.
Process-to-Process Delivery:
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
The OSI Model and the TCP/IP Protocol Suite
Process-to-Process Delivery:
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Chapter 16 Stream Control Transmission Protocol (SCTP)
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 9 Internet Control Message.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The OSI Model and the TCP/IP Protocol Suite
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 4 Introduction to Network.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Chapter 2 OSI Model and TCP/IP
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface
2.1 Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface.
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 19 Network Layer Protocols Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Position of application layer. Application layer duties.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
BZUPAGES.COM 2.1 Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 15 Application Layer and Client-Server.
Chapter 17 - Clients + Servers = Distributed Computing Introduction Large Computers Use Networks For Input and Output Small Computers Use Networks To Interact.
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.
2.1 Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 9 Introduction To Data-Link Layer Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 16 Socket Interface.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Stream Control Transmission.
Introduction Chapter 1. Uses of Computer Networks Business Applications Home Applications Mobile Users Social Issues.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 2 Network Models
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
1 K. Salah Application Layer Module K. Salah Network layer duties.
Process-to-Process Delivery:
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)
Chapter 9 Introduction To Data-Link Layer
Chapter 9 Introduction To Data-Link Layer 9.# 1
Introduction To Application Layer
Chapter 14 User Datagram Program (UDP)
User Datagram Protocol (UDP)
Internet Control Message Protocol Version 4 (ICMPv4)
Process-to-Process Delivery:
Chapter 16 Socket Interface.
2.1 Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 2 Network Models
Process-to-Process Delivery: UDP, TCP
2.1 Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Presentation transcript:

TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application Layer

TCP/IP Protocol Suite 2OBJECTIVES:  To introduce client-server paradigm.  To introduce socket interfaces and list some common functions in this interface.  To discuss client-server communication using connectionless iterative service offered by UDP.  To discuss client-server communication using connection- oriented concurrent service offered by TCP.  To give an example of a client and a server program using UDP.  To give an example of a client and a server program using TCP.  To briefly discuss the peer-to-peer paradigm and its application.

TCP/IP Protocol Suite 3 Chapter Outline 17.1 Client-Server Paradigm 17.2 Peer-to-Peer Paradigm

TCP/IP Protocol Suite CLIENT-SERVER PARADIGM The purpose of a network, or an internetwork, is to provide services to users: A user at a local site wants to receive a service from a computer at a remote site. One way to achieve this purpose is to run two programs. A local computer runs a program to request a service from a remote computer; the remote computer runs a program to give service to the requesting program. This means that two computers, connected by an internet, must each run a program, one to provide a service and one to request a service.

TCP/IP Protocol Suite 5 Topics Discussed in the Section Server Client Concurrency Socket Interfaces Communication Using UDP Communication Using TCP Predefined Client-Server Applications

TCP/IP Protocol Suite 6 Figure 17.1 Server types

TCP/IP Protocol Suite 7 Figure 17.2 Connectionless iterative server

TCP/IP Protocol Suite 8 Figure 17.3 Connection-oriented concurrent server

TCP/IP Protocol Suite 9 An interface is a set of instructions designed for interaction between two entities. Note

TCP/IP Protocol Suite 10 Figure 17.4 Relation between the operating system and the TCP/IP suite

TCP/IP Protocol Suite 11 Most of the programming languages have a file interface, a set of instructions that allow the programmer to open a file, read from the file, write to the file, perform other operations on the file, and finally close the file. When a program needs to open the file, it uses the name of the file as it is known to the operation system. When the file is opened, the operating system returns a reference to the file (an integer or pointer) that can be used for other instructions, such as read and write. Example Example 17.1

TCP/IP Protocol Suite 12 Figure 17.5 Concepts of sockets

TCP/IP Protocol Suite 13 Figure 17.6 Socket data structure

TCP/IP Protocol Suite 14 Figure 17.7 Socket types

TCP/IP Protocol Suite 15 Figure 17.8 IPv4 socket address

TCP/IP Protocol Suite 16 Figure 17.9 Connectionless iterative communication using UDP

TCP/IP Protocol Suite 17 As an example, let us see how we can design and write two programs: an echo server and an echo server. The client sends a line of text to the server; the server sends the same line back to the client. Although this client/server pair looks useless, it has some applications. It can be used, for example, when a computer wants to test if another computer in the network is alive. To better understand the code in a program, we first give the layout of variables used in both programs as shown in Figure Example Example 17.2

TCP/IP Protocol Suite 18 Figure Variables used in echo server and echo client using UDP service

TCP/IP Protocol Suite 19

TCP/IP Protocol Suite 20

TCP/IP Protocol Suite 21

TCP/IP Protocol Suite 22

TCP/IP Protocol Suite 23 To be complete, error-checking code needs to be added to both server and client programs. Note

TCP/IP Protocol Suite 24 Figure Flow diagram for connection-oriented, concurrent communication

TCP/IP Protocol Suite 25 Figure Status of parent and child processes with respect to the socket

TCP/IP Protocol Suite 26 We want to write two programs to show how we can have an echo client and echo server using the services of TCP. Figure shows the variables we use in these two programs. Since data may arrive in different chunks, we need pointers to point to the buffer. The first buffer is fixed and always points to the beginning of the buffer; the second pointer is moving to let the arrived bytes be appended to the end of the previous section. Example Example 17.3

TCP/IP Protocol Suite 27 Figure Variable used in echo client and echo sever using TCP

TCP/IP Protocol Suite 28

TCP/IP Protocol Suite 29

TCP/IP Protocol Suite 30

TCP/IP Protocol Suite 31

TCP/IP Protocol Suite 32

TCP/IP Protocol Suite 33 In Appendix F we give some simple Java versions of programs in Table 17.1 to 17.4 Note

TCP/IP Protocol Suite PEER-TO-PEER PARADIGM Although most of the applications available in the Internet today use the client-server paradigm, the idea of using peer-to-peer (P2P) paradigm recently has attracted some attention. In this paradigm, two peer computers can communicate with each other to exchange services. This paradigm is interesting in some areas such file as transfer in which the client- server paradigm may put a lot of the load on the server machine. However, we need to mention that the P2P paradigm does not ignore the client-server paradigm; it is based on this paradigm.