18
Client Server and Protocols

Client Server 1

Embed Size (px)

DESCRIPTION

Client server in computers

Citation preview

Page 1: Client Server 1

Client Server and Protocols

Page 2: Client Server 1

Servers and Clients

A “server” is just a computer running a piece of software that provides resources to clients

A client is something that requests something from a server

Page 3: Client Server 1

Servers

Www.nps.navy.mil

MyLaptop

Requests

Responses

Page 4: Client Server 1

Client/Server

The client machine requests something from the server, in this case a web page. The server looks up the web page and returns it.

Sometimes the server machine is dedicated to only that process, but most of the time it can also do other things

You can run a web server on an NT or Unix box and also do other things with it.

Page 5: Client Server 1

Protocols

Requests are made to the server in a specific format--a protocol.

This is called an application-layer protocol. It runs on top of TCP/IP

It’s often just very simple text commands

Page 6: Client Server 1

HTTP Protocol

HTTP is a protocol for requesting web pages from a server. It’s just a series of text commands that is transmitted via TCP.

Example: telnet <webserver> 80– This connects you to the web server software

running on the destination machine. You can issue commands directly to the server software

– This is actually what your web browser is doing behind the scenes!

Page 7: Client Server 1

HTTP Protocol

pinafore 55# telnet azure 80Trying 131.120.178.4...Connected to azure.stl.nps.navy.mil.Escape character is '^]'.GET /index.html<!DOCTYPE HTML PUBLIC….<html><head> <title>STL</title></head>

Page 8: Client Server 1

Connecting to a port

The “telnet 80” command tells the software to directly connect to port 80 on the destination machine. By convention this is usually where http servers listen for requests. This allows us to pass commands directly to the server software

Other servers listen on different ports

Page 9: Client Server 1

SMTP protocol

Kids, don’t do this at home You can also directly connect to SMTP

mail servers and issue commands to them You can send very bogus fake mail that

won’t fool anyone but a novice Some admins get very upset when people

do things like this

Page 10: Client Server 1

SMTP

Telnet mailserver.nps.navy.mil 25HELO pentagon.navy.mil MAIL FROM:[email protected] RCPT TO:[email protected] DATA From: [email protected] (The admiral in charge) To: [email protected] Subject: Next assignment Reply-To: [email protected] Report immediately to Adak island. . QUIT

Page 11: Client Server 1

Protocols

SMTP has a simple command structure that runs on top of TCP/IP

You can hook up to the mail server software and issue it commands

You probably shouldn’t believe everything your read in your mailbox

Page 12: Client Server 1

FTP

File Transfer Protocol is used to move files from one machine to another

You’ll often use this to transfer HTML files from your PC to an HTML server

ws_ftp is one GUI ftp program; see web searches for others

Page 13: Client Server 1

Clients, Servers, and Protocols

Clients talk to servers to request data They communicate using a protocol These are often very simple text commands

that you can simulate yourself

Page 14: Client Server 1

Web Servers

A web server can be almost any machine, named anything.

The thing that makes it a web server is a program running on that machine that understands the http protocol

The machine can also run other things

Page 15: Client Server 1

Web Servers

There are many web server programs out there– Commercial: Netscape Enterprise Server,

Microsoft IIS– Free: Apache

They can run on almost any OS– Sun, Microsoft, Apple, Linux

Page 16: Client Server 1

Web Servers

They just accept requests and return data Serious servers need to be well connected,

since they take up a lot of bandwidth Serious servers should also be secure

Page 17: Client Server 1

Servers

Firewall

Web Server

Internal NetworkTheInternet

Page 18: Client Server 1

Web Servers

Web servers are often kept outside the firewall because they’re prone to subversion and attack. A compromised web server outside the firewall won’t have really bad consequences for machines inside the firewall