Anda di halaman 1dari 24

Network Applications (typically) CLIENT-SERVER

Examples of the Application level of the OSI model One typically provides a service to the other Servers for hardware
file printer fax
Application

Servers for software support


providing terminal access providing translation from internet name addresses to internet numeric addresses
A\ND LOTS OF OTHER FUNCTIONALITY!!!

(pcs.cnu.edu) (137.155.10.2)

Common CLIENT-SERVERs
FTP for transferring files from one machine
to another WITHOUT having an account at both machines.

TELNET for providing remote commandline (shell) access when you have an account on both machines. TELNET also will provide other functionality as we will see later. Info services from ARCHIE, WAIS (Wide Area Information Servers), GOPHER, etc.

MAIL transfer agents WWW (WorldWideWeb) servers/browsers

Terminal - little local intelligence


Display Keyboard

(Display and) xmit

Application

Terminal
Display Keyboard

Mainframe
NO local processing per se. Only a conduit to the Mainframe.

Application

PC

Here the PC has the program instead of the mainframe! In previously graphic, terminal is a relay.

Remote terminal
Run program remotely Like a long cable to a keyboard at your house Hyperterminal on Windows 95/98 Typically requires a modem Only run command shell, not windows apps. What if you want a terminal access through the internet? Telnet is your answer

Telnet example
telnet cambria@pcs.cnu.edu SunOS 5.6 login: dgame Password:(.) Last login: Tue Jan 25 19:07:04 from cx81733-c.nwptn1 You have new mail. {dgame@cambria:~ } pwd /home/faculty1/dgame {dgame@cambria:~ }exit {dgame@cambria:~ }logout (back on the original machine)

How is telnet organized?


Computer now using Computer to Use

Telnet Client

Internet

Telnet Server

Unix Shell Keyboard Display and xmit Display

Unix Shell Mainframe

Terminal

Lets Probe a Little Deeper!

Quick Review of Ascii


7 bit character code internally or elsewhere the 8th bit is 0 standard char data keyboard input PLUS communications characters be sure to understand HEX notation
0000000 0000001 0001000 0001010 0001101 0010110 0100000 0100001 00 01 08 0A 0D 16 NUL SOH BS LF CR SYN Comm Chars

20 21

SP !
Display Chars

No 8 bit value defined! In binary 0..127 (0000000..1111111)

Focus on the server and shell


Computer now using Computer to Use

Telnet Client

Internet

Telnet Server

Unix Shell

Control Characters in telnet


8 bit values really transmitted Values greater than 127 interpreted differently Any character less than 128 passed directly to the shell Any character greater than 127 is not to be passed through but used to interpret.

(0-127 chars)
(0-255 chars) Telnet server
(holds 128-255)

Unix shell

Control

The basic idea


(not actually fact - see the text for the real story)

Telnet server

mkdirr(245)(OD)

Unix shell

(245) holds r

mkdir(OD)

Control

Data intended for the receiving program is passed through. The control character (245) tells the server to delete the previous character before passing the character to the shell.

General Interaction
Telnet:
Internet Telnet Client Appl or shell

Telnet Server

Most Often:
Internet Client Server

Another View!
Types ls.. gets directory USER Telnet Client Unix Shell Telnet Server

Additional layering
of application on top of standard applications such as telnet, ftp, etc.

ftp

Commands ftp Client Internet

ftp Server

Files

Telnet distinguishes data from commands by code value. Ftp distinguishes data from commands by channel.

FTP
A program for copying files from one machine to another Lets you do a FEW unix-type commands in the command-line version

FTP
connect request login CLIENT login request file send file logoff SERVER

General Exchange of Messages

Sample client interaction w/ftp


{dgame@cambria} ftp ftp.pcs.cnu.edu Connected to ftp.pcs.cnu.edu. 220 america3 FTP server (UNIX(r) System V Release 4.0) ready. Name (ftp.pcs.cnu.edu:dgame): anonymous 331 Guest login ok, send ident as password. Password: (your id) 230 Guest login ok, access restrictions apply. ftp> cd pub/dgame/335 250 CWD command successful. ftp> binary 200 Type set to I. ftp> mget * mget AaronsFavCar.bmp? y 200 PORT command successful. 150 Binary data connection for AaronsFavCar.bmp (137.155.2.17,33136) (177562 bytes). 226 Binary Transfer complete. local: AaronsFavCar.bmp remote: AaronsFavCar.bmp 32768 bytes received in 0.017 seconds (1880.25 Kbytes/s) ftp> bye 221 Goodbye. {dgame@cambria}

Client to Server

Server to Client

Commands to use
Table 8.3 Not like a shell, but a few of the commands
cd close pwd lcd (change on the client side!) binary get put mget prompt

Archie
FTP provides a unix-look directory which you navigate, ls, and copy/send files If you have trouble managing your own account, how much trouble do you have locating information when the entire FTP world is your directory? Database server containing information on the contents of FTP sites around the world Being replaced with good WWW search engines which envelope ftp sites.

Other Client Servers


SMTP (Simple Mail Transfer Protocol)
More than meets the eye Server can also be a client (same process)

WWW (World-Wide Web)


(more to come)

SMTP
SERVER mail.pcs.cnu.edu SMTP SERVER mail.uva.edu POP or IMAP

POP or IMAP

pine

Whatever client the user chooses

Here a local server and remote server in addition to a remote and local client. For SMTP, the servers also function as clients depending on which server makes the request. See Figure 8.7

General Issues at Application Layer


Timing of interaction (Time Sequence Diagrams) Types of problems encountered How does one approach programming one of them?

HORIZONTAL communication between Client and Server


Consider the timing of the interaction This is a TIME-SEQUENCE DIAGRAM.
CLIENT Send Wait SERVER

Receive
1 GetAnswer 2

1. SERVER waits 2. SERVER works 3. CLIENT waits 3 4. CLIENT works

Send

Process Answer

TIME

TIME

Problems which can occur


Messages are lost Message are altered Messages arrive out of order Client and Server are not synchronized for each other. Client does not have room for the answer. Client can not wait any longer for the answer. Server machine may not be turned on Connection between the two machines may not be functioning

How do you write programs to interact over a network?


Although you may not actually write the code, youll learn how in this course. Different ways. (ignore the text, middle p. 483)
Ad hoc... you do all of the work Use libraries socket libraries for tcp/ip based communication RPC (Remote Procedure Calls) are a little more involved than using a library of procedures but that model is sufficient for now We will cover DOS (ad hoc) and Unix (sockets)

In ALL cases, messages are exchanged

Anda mungkin juga menyukai