Documente Academic
Documente Profesional
Documente Cultură
piece of software that provides resources to clients A client is something that requests something from a server
Servers
Requests Www.nps.navy.mil
Responses
MyLaptop
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.
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 Its often just very simple text commands
HTTP Protocol
HTTP is a protocol for requesting web
pages from a server. Its 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!
HTTP Protocol
pinafore 55# telnet azure 80 Trying 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>
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
SMTP protocol
Kids, dont 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 wont fool anyone but a novice Some admins get very upset when people do things like this
SMTP
Telnet mailserver.nps.navy.mil 25 HELO pentagon.navy.mil MAIL FROM:admiral@pentagon.navy.mil RCPT TO:ensign@someship.mil DATA From: admiral@pentagon.navy.mil (The admiral in charge) To: ensign@someship.mil Subject: Next assignment Reply-To: admiral@pentagon.navy.mil Report immediately to Adak island. . QUIT
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 shouldnt believe everything your read in your mailbox
FTP
File Transfer Protocol is used to move files
from one machine to another Youll 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
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
Web Servers
There are many web server programs out
there
Commercial: Netscape Enterprise Server, Microsoft IIS Free: Apache
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
Servers
The Internet
Internal Network
Web Server
Firewall
Web Servers
Web servers are often kept outside the
firewall because theyre prone to subversion and attack. A compromised web server outside the firewall wont have really bad consequences for machines inside the firewall