Internet / Intranet
CIS-536
Class 2
More Internet Technology
Client-Side Web Technology
Class 2 Agenda
• Internet Technology - Continued
–
–
–
Connectivity
Mail: SMTP / POP
FTP
• HTML
2
Web Hierarchy
TECHNOLOGY
Key Components
Web Applications
Web Forms
World Wide Web
Core Internet Protocols
The Internet
Networking
Scripting, Applets
CGI
HTML, Browsers, Web Servers
SMTP (Mail), FTP, Telnet
TCP/IP, DNS, Backbone
OSI Model, Ethernet, LANs
Operating Systems
UNIX, Windows, Other O/S
Computers
Mainframes, Minis, PC’s
3
Connectivity
• Connectivity Requires:
– Hardware Interface Device
– Transmission Protocol
– TCP/IP Emulation
– A Connection Point Already Linked to the Internet
•
ISP – Internet Services Provider
• Connection Speed
– Measured in Bits Per Second (bps)
– Examples Show Speed to transfer a 1 Megabyte
File
– Actual Performance Depends on:
•
•
•
•
Protocol Overhead
Quality of Connection (Noise)
Error Detection and Recovery
Physical Limitations of Connected Computers
4
Connectivity Options
• Standard Analog Telephone Line
–
Hayes Compatible Asynchronous Modem
•
•
•
–
V.32 : 2400 – 9600 bps : 15 - 55 minutes
V32.bis : 7200bps - 14.4 kbps : 9 – 18 minutes
V34 : 14.4 – 28.8 kbps : 4 – 9 minutes
56 kbps Modems : 2 – 4 minutes
•
•
•
•
•
•
Assume That ISP -> Telco Connection is Digital
Asymmetric: 56kbps max in one direction: 28bps in
the other
K56Flex – (Rockwell Semiconductor)
X2 – (U.S. Robotics / 3Com)
V.90 – Unifies K56Flex / X2
Performance Varies Significantly
5
Connectivity Options (2)
• ISDN
– “Digital” Dial-Up
– 3 Channels: 16 kbps, 64 kbps, 64 kbps
– In Practice: 56-64 kbps (2 minutes)
• Dedicated Analog Telephone Line(s)
–
–
–
Typically Used to Connect Networks (Shared
Bandwidth)
T1 : 1.5 mbps : (5 seconds)
T3 : 44.7 mbps : ( < 1 second)
• xDSL
– Digital Transmission Using Standard Copper Telephone
Cable
– ADSL – Asymmetric
•
•
1.5 – 9 mbps from ISP to Consumer
16-640 kbps from Consumer to ISP
6
Connectivity Options (3)
• LAN – Local Area Network
–
Shared Bandwidth
•
–
Ethernet : 10 mbps
•
•
•
•
–
Theoretical Max: 1MB file in Less than 1 Second
CSMA/CD Algorithm
– Only Get Access to Line If Its Not Busy
Coax (RG58) or Unshielded Twisted Pair (UTP)
100 – 500 Meter Length of Cable Limitation
Fast Ethernet: 100 Megabits Per Second
Token Ring
•
•
“Equal Access” to The Line
4 – 16 mbps
7
Connectivity Options (4)
• Cable Modems
–
–
–
–
–
Use Existing Cable Wiring
Implementations Vary Widely
Require Using Cable Provider as ISP
Shared Bandwidth
30 mbps Theoretical Max : 1.5 mbps Actual
• WAN – Wide Area Network
–
FDDI – Fiber Distributed Data Interface
•
•
•
100 mbps
Can Cover Long Distances
Backbone – High Speed Connection Between Large
Computers
• Other Options: Satellite, ATM, Wireless etc.
8
IP Over Dial-Up Lines
• ISP Acts a Communications Hub
–
–
–
Has a “Fixed” Set of IP Addresses
Dynamically Assigns Them To Users
Dial-Up Protocols
•
•
–
SLIP – Serial Line Interface Protocol
IP Packets Over Point-to-Point Lines
PPP – Point-to-Point Protocol
•
•
•
•
Can Handle Other Protocols Beyond IP
Dynamic Configuration Capabilities
Error Detection
Can Dynamically Assign an IP Address
9
Importance of Routers
• Routers Manage the Flow In a Network
• Serve as “Distribution Centers”
• Additional Protocols Allow Routers to
Communicate With Each Other
• Smart Routers Can Handle Multiple Protocols
• Some Modems are Also Routers
10
Sockets
• The API To the TCP/IP Protocol
–
Often called TCP/IP Protocol “Stack”
• Windows Sockets - “Winsock”
–
–
Not part of Windows 3.1
Mutiple Third-Party Implementation
•
–
–
Implementations Differ
Version 1.1 – TCP/IP Only
Version 2.0 – Other Protocols Also
•
e.g. SPX/IPX – Used in Novell Networks
• WinInet – Win 32 Internet API
–
A Microsoft Attempt to Make it Easier to
Program Winsock
11
FTP : File Transfer Protocol
User
Interface
Server
Protocol
Interpreter
FTP Commands
User
Protocol
Interpreter
FTP Replies
File
System
Server
Data Transfer
Module
Server
Data
User
Data Transfer
Module
File
System
Client
12
FTP: Details
• Session Based
• Data Converted to Neutral Data Format For
Transmisssion
• Client/Server Convert it to Native Data Formats
–
Port 21
• Transmission Modes
– Stream Mode
– Block Mode
– Compressed Mode
• Login: Name/ Password
–
Anonymous FTP
•
•
•
Login: Anonymous
Allows Access to a Particular Directory Structure Only
All Anonymous Users Access Same Directory
13
FTP: Commands
• Get – Retrieve a File From Remote System
• Put – Send a File to the Remote System
• Multiple File Transfer – mput, mget
• List Files in Directory – dir, ls
• Change Directories
–
–
Local System (lcd)
Remote System (cd)
• Transmission Mode
–
–
Binary – No Conversion
Ascii – Format Conversion
•
UNIX and Windows Text File Formats are Different
14
FTP In Practice
• FTP is Still Used to Move Files Between
Machines on the Internet
• Used Extensively For Publishing Web Pages
• GUI Versions of FTP For Windows are
Common
–
–
Hide Internal Details From User
WS_FTP
•
•
–
Shareware: Free For Student Use
/>
Cute FTP
•
•
30-day Evaluation
/>
15
Electronic Mail
• Mail Options
–
Proprietary email Systems
•
•
•
–
Most Based on LAN File Server Model
•
•
–
IBM – PROFS
Microsoft – MS-Mail
cc:Mail (Lotus)
Sender Writes a File to Recipient’s Directory
Gets Difficult When There are Multiple Mail Servers
– Servers Must Route Messages to Other Servers
SMTP – Simple Mail Transfer Protocol
•
•
TCP/IP Methodology For Sending Mail Messages
– Uses Port 25
Routers Forward Messages To Appropriate Server
16
SMTP Session
•
SMTP Protocol is Session Based
–
–
–
Sending Router/Server Establishes a
Connection With Target Router/Server
Waits Until Target is Ready to Receive Mail
Asks Target if It Will Accept Mail For Recipient
Possible Responses:
Yes
Yes: Forwarding Address (Target Will Follow-Up)
No: Forwarding Address (Sender Must Follow-Up)
No
4. Send Data
5. Repeat Step 3,4 For Each Recipient
6. End Session
17
SMTP Mail Message Format
–
–
Messages are a Human Readable Text File
Two Parts: Envelope and Contents
•
•
Envelope:
– Keyword/Value Pairs
– One Per Line
– Common Keywords
» Subject:
» Date:
» From:
» Reply-To:
– Common Mailer Generated Keywords:
» Received:
» Message-Id:
Message Contents
– Separated From Envelope By a Blank Line
18
Mail Limitations
• Many Mail Implementations Impose Limits:
–
–
–
Maximum Line Length: 1000 bytes
Maximum Message Size: 64 KB
ASCII Only
•
ASCII Only Uses 7 Bits of the 8-bit Byte
• NOTE: Intermediate Nodes May Have This
Limitation Even If Sender, Recipient Do Not
• Problem: How to Send Binary Files?
•
•
No Concept of Lines
May Be Over 64 KB
• Solution: Encoding
–
–
“Translate” Binary File Into a Text Based Format
Split Long Messages Into Multiple Mail Messages
19
Encoding: Header Information
–
MIME – Multipurpose Internet Mail Extensions
•
•
Mime Format in Mail Header Identifies the Contents
MIME Body Types
– Text
» Plain – No Encoding Needed
» RTF – Allows Some Formatting
– Image
– Audio
– Application
» A Specific Application Format (e.g. Microsoft
Word)
– Structured
» Allows Multiple Types in One Document
– Message
» Used To Identify Partial Messages
20
Encoding Techniques
• Portable Formats
–
Seven-Bit
•
–
Quoted-Printable
•
–
Most of the Characters are 7-Bit ASCII
– Others are Encoded
– Most of Message is Human Readable
Base64
•
•
•
–
All ASCII Characters – No Encoding
Groups of 3 Bytes Written as 4 Six-Bit ASCII Characters
The Result Is Not Human Readable
33% Increase In File Size
X-Token
•
Format is Privately Negotiated Between the SMTP
Servers
21
Encoding Techniques (2)
• Non-Portable Formats
–
Will Cause Corruption if an Intermediate
Server Has Limitations
–
Eight-Bit
•
•
–
No Encoding
No Line Exceeds 1000 Characters
Binary
•
•
No Encoding
Lines May Be Too Long
22
Retrieving Mail
• Offline Model
– User Doesn’t Have to Be Connected In Order to Receive
Messages
– Mail Server Stores Messages For a User Locally
•
User Then Downloads Them To a Local File
• POP – Post Office Protocol
•
•
•
Uses Port 110
Current Version: POP3 (Version 3)
– Allows Selective Downloading
Session Based:
– Authorization
» User Name, Password
– Transaction
» STAT – Request Statistics (Number of Messages, Size)
» LIST – List of Messages With Size
» RETR – Download a Message
» DELE – Delete Message From Server
» QUIT – End Session
23
Other Mail Retrieval Options
• IMAP – Internet Message Access Protocol
–
–
–
–
Intended for Laptops
Messages Remains on the Server
Laptop Has a Copy of Messages For Offline
Viewing
Protocol Supports Manipulation of Server
Message Files
24
Mail Process Diagram
Sender
SMTP
Server
Formatted Mail
Message
Client’s Mail
Application
Sender
TCP/IP Routing
SMTP
Server(s)
Recipient’s
SMTP
Server
Local Mail
File
POP
SMTP
Server(s)
Recipient’s Mail
Application
“Internet”
Recipient
25