TCP/IP Servers

Download Report

Transcript TCP/IP Servers

TCP/IP Servers
•
•
•
•
•
•
LPD (Printing)
SMTP (Mail)
FTP (File Transfer)
NTP (Network Time)
NNTP (News)
WEB
Network Printing
• Configure the printer hardware on
the host system by using either the
parallel or usb interfaces.
• Add the Windows component “Other
Network File and Printing Services”
– uses port 515 (LPD) for BSD Unix printing
• Or get HP JetAdmin software for the
system
– uses port 9100 (Jet Direct)
• Or get a network ready printer
Printing cont.
• Printer protocols:
– Postscript (Adobe)
• is a language executed by the printer
• is very configurable
– PCL (Hewlett Packard)
• is a bit mapped graphics mode
• is faster than postscript
– ASCII (text)
• Plain old printable characters
Printer Setup (Network Ready)
• Plug it in to the wall outlet
(power)
• Plug in the network cable
• Power up the printer
• Print the configuration sheet
• Register the printer address
(preferably non-routable)
Printing
• PDL (Print Description
Languages), basically printer
drivers.
• Provide a standard interface
from the application to the
printer.
Printer maintenance
• Expendable supplies (paper and
toner)
• How to fix a paper jam
• Monitor the printer output bin
• Monitor the print quality
• Clean the printer
Simple Mail Trasnsfer
Protocol
•
•
•
•
•
The protocol is very simple
Uses port 25
All files are ascii text
Syntax: [email protected]
Mail relay:
user%[email protected]
• Mail Exchange (MX)
– Allows mail server redirection
SMTP Mail Servers
• POP2, POP3
– Uses port 109 or 110
– Post Office Protocol, mail transfers to
client, download all mail to the client
(older protocol, replaced by):
• IMAP
– Uses port 143
– Internet Message Access Protocol, mail
stays on server
– Better for mobile (transient) clients
• Webmail
– uses a Web interface to access mail
Mail Clients
• Eudora
– Commercial
• Netscape Messenger
– Comes with Netscape
• Outlook
– Comes with Windows 9x, 2000
• Webmail, Groupwise
– Uses any web browser
Client Setup
• Client can have separate mail
server and smtp server.
• Mail server is where our mail is
received
• SMTP server is where we send
our messages
• The Mail server can have virus
and spam filters
Spamming
• Mail Relaying to an off site
recipient
• Testing SMTP mail
– abuse.net
• Configuration to prevent SPAM
– allow only local domain relays to
internet
Headers
•
•
•
•
•
•
From
Date:
Subject:
To:
Resent-date:
Resent-from:
Attachments
• Using mail to transfer files
• Simple operation
• Incompatible programs
– Word for MAC vs. Word for PC
– .pdf solves the compatibility problem
• Dangers (viruses, trojan horses)
– Executable programs that the client
downloads and automatically executes
Encoding Methods
• Binary Files (programs, sound,
video)
• UUENCODE (UNIX)
– one file per encode
• MIME (WWW, POP, IMAP)
– multiple files per encode
• BinHex (Apple)
– one file per encode
SMTP Example
1> telnet cc.usu.edu.edu 25
2> 220 grumpy.usu.edu – ESMTP Server (PMDF V5.2-32)
1> HELO pc15.logan.tv
2> 250 grumpy.usu.edu Ok, “port 32443”@techsun.cs.usu.edu”
[129.123.7.33]
1> MAIL From:<[email protected]>
2> 250 2.5.0 Address Ok.
1> RCPT To:<[email protected]>
2> 250 2.1.5 [email protected] Ok.
1> DATA
2> 354 Start Mail input; end with <CRLF>.<CRLF>
1> Date: Sat, 22 Mar 1998 13:26:31 MST
1> From: [email protected]
1>Subject: Meeting tomorrow
SMTP Example cont.
1> The meeting is TOMORROW at 3:00 PM!
1>
1> .
2> 250 2.5.0 Ok
1> QUIT
2> 221 2.3.0 Bye received. Goodbye.
FTP
• File Transfer Protocol
– User
– Anonymous
• GET/PUT/DEL/CWD
– GUI Interface
• Binary/Ascii
• Hash
FTP Example
• requires 2 ports
• telnet ftp.remotesite.com 21
–
–
–
–
–
–
220 ftp.remotesite.com FTP server ready
user anonymous
331 password required for anonymous
password [email protected]
230 user anonymous logged in
PORT 1200
FTP Example cont.
•
•
•
•
PORT 129,123,7,55,4,76
200 PORT command successful
pwd
257 “/export/guest/bobw” is current
directory
• RETR ./.login
• 150 ASCII data connection for
./.login(129.123.7.55,1100)(795 bytes)
• QUIT
NTP
• Network Time Protocol
– Uses port 123
•
•
•
•
UDP (User Datagram Protocol)
Atomic Clock Synchronization
Multiple Servers
Used for
– Distributed Databases
– Client/Server
– Security
Clock Synchronization
mt
mr
Time Server
Time Client
Tround = mt + mr
time = t
Clock set is t + Tround/2
NNTP
• Network News Transfer Protocol
– Uses port 119
• Distributed Bulletin Board
– Uses a tree hierarchy
• Minimizes Duplicate
messages/disk space
• Tree based distribution
• Store and Forward
Web Browsers
• Mosaic
– More or less the first web browser
• Netscape
– Became extremely popular very quickly
• Microsoft Internet Explorer
– Plays catch up with Netscape
• HotJava
– Sun Microsystems Browser
Web Browsers Cont.
• Web Browsers can cache pages
and pictures locally to speed up
access
• Web Browsers can use a proxy
server to remotely cache pages
and pictures for many systems.
• The proxy can act as a firewall
and IP translator.
Web Servers
•
•
•
•
Apache
Roxen
Netscape
Microsoft
– IIS
Web Servers Cont.
• Use http (hyper text transfer
protocol) to create file and service
access
• Can have virtual servers to save IP
addresses
• Can have additional ports (services)
• Most of the fancy stuff is done by the
browser.
HTML
•
•
•
•
Hyper Text Markup Language
Uses ascii text and commands
Automatically formats text
Sets up hyper links and displays
pictures
• Connects to services such as ftp
• Start with <command> and end with
</command>
HTML Cont.
• <BODY>
• <a
href=“http://www.usu.edu></a>
• <a image=“fred.gif”></a>
• <li>Hello</li>
• </BODY>
XML
• eXtensible Markup Language
• Extends basic HTML to aid in
creating documents and
document systems.
• Creates access to data bases
CGI’s
Common Gateway Interface
• Allow Web browsers to execute
programs on the Web server.
• Uses: Mail, finger, database,
animation, sound
• Found in /cgi directory in the
Web page home
• Are executable C, perl, java, or
shell programs
ASP
• Active Server Pages
• Similar functions to CGI’s
• Can do access counters,
database access and online
forms (fill in the blank)
PHP
• Personal Home Page Tools
• Language for creating Web
programs
• Syntax is similar to Basic
Java
• Developed by Sun
• C++ context
• Builds GUI’s (Graphical User
Interfaces)
• Handles animated objects on
the web page
Security and the WEB
• WEB files must be world readable.
• The WEB server may be run by root
• CGI’s can be dangerous security
holes.
• PHP, ASP, and VBscripts can have
security holes (buffer overflows)
• WEB servers are searched by many
search engines that broadcast your
data.