Post on 15-Jan-2016
transcript
Spring 2000 John Kristoff 1
Applications
Computer Networks
Spring 2000 John Kristoff 2
Where are we?
Spring 2000 John Kristoff 3
Important Note
Although the ISO OSI Reference Model defines a session and presentation layer, they are often integrated into
some other layer in practice. In many cases they are simply not
used.
Spring 2000 John Kristoff 4
Separation of Duties
Network Transfer bits/bytes Operates at the application’s request
Applications What data to transmit When to transmit data Where to transmit data to Meaning of bits/bytes
Spring 2000 John Kristoff 5
Client/Server
Spring 2000 John Kristoff 6
Characteristics
Client Actively initiates contacts with server Uses different source port for each
connectionServer
Passively awaits connections from clients
Uses the same source port for all clients
Spring 2000 John Kristoff 7
Use of Protocol Ports
Each service given unique port number, PServer
Inform Operating System it is using port P Waits for requests to arrive
Client Forms request Sends request to port P on server computer
Spring 2000 John Kristoff 8
Protocol Ports Key Idea
Each application is assigned a unique port identifier. A server must specify the identifier when it begins execution (application startup). A client must
specify the identifier when it requests the network software to contact the server.
Protocol software on the server computer uses the identifier to direct incoming
requests to the correct server application.
Spring 2000 John Kristoff 9
Recall: Application Multiplexing
Spring 2000 John Kristoff 10
Example: IP address and TCP port pairs
Spring 2000 John Kristoff 11
Interacting with Protocol Software
Client or server uses transport protocols
Protocol software resides in OSApplications outside the OSMechanism to bridge the two
Application Programming Interface (API)
The book: TCP/IP Illustrated, Volume 2 - Stevens
Spring 2000 John Kristoff 12
Application Programming Interface
Part of the operating systemPermits applications to use protocolsDefines
Operations allowed Arguments for each operation
Spring 2000 John Kristoff 13
Example API: Sockets
Originally designed for BSD UNIX To use with TCP/IP protocols
Now industry standard available on many operating systems
e.g. winsock
Spring 2000 John Kristoff 14
Sample Socket Procedure
Spring 2000 John Kristoff 15
Example Application: DNS
Internet communication requires IP addresses
Humans prefer to use computer namesAutomated system available to translate
names to addressesKnown as Domain Name System (DNS)Base specs in RFC 1034 and RFC 1035
The book: DNS and Bind - Albitz and Liu
Spring 2000 John Kristoff 16
DNS Functionality
Given Name of a computer
Return Computer’s internet (IP) address
Method Distributed lookup Client contact server(s) as necessary
Spring 2000 John Kristoff 17
Domain Name Syntax
Alphanumeric segments separated by dots
Examples: www.depaul.edu aharp.is-net.depaul.edu www.research.att.com
Most significant part on the right
Spring 2000 John Kristoff 18
Obtaining a Domain Name
Organization Chooses a desired name Must be unique Registers with central authority Placed under one top-level domain
Names subject to international law Trademarks Copyright
Spring 2000 John Kristoff 19
Top-Level Domains
.com commercial organization .edu educational institution .gov government organization .mil military group .net major network provider .org organization other than above .arpa temporary ARPA domain (still used) .int international organization country code A country (e.g. .uk or .tw)
Spring 2000 John Kristoff 20
Example Name Structure
First level is .comSecond level is company nameThird level is division within a
companyFourth level either
company subdivision individual computer
Spring 2000 John Kristoff 21
DNS Illustrated
Spring 2000 John Kristoff 22
Key Concept
The number of segments in a domain name corresponds to the naming hierarchy. There is no universal standard for this
hierarchy; each organization can choose its own naming convention. Furthermore,
names within an organization do not need to follow a uniform pattern; individual
groups within the organization can choose a hierarchical structure that is appropriate
for that group.
Spring 2000 John Kristoff 23
DNS Client/Server Interaction
Client known as resolverMultiple DNS servers usedArranged in a hierarchyEach server corresponds to
contiguous part of naming hierarchy
Spring 2000 John Kristoff 24
Inter-Server Links
All domain name servers are linked together to form a unified system. Each server knows how to reach a
root server and how to reach servers that are authorities for names further down the hierarchy.
Spring 2000 John Kristoff 25
DNS Hierarchy Illustrated
Spring 2000 John Kristoff 26
DNS Record Types
Stored with each nameResolver must specify the type in
lookup request Type A (address): IP address for name Type MX (mail exchanger): IP address of mail server for
the name Type CNAME (Computer Name): alias to another name
Spring 2000 John Kristoff 27
Example Application: Internet Email
Email address text string which specifies destination mailbox e.g. jtk@depaul.edu, jtk@aharp.is-
net.depaul.edu
Mail message format header
identifies sender, receiver, contentsformat is keyword: information
blank line body
Spring 2000 John Kristoff 28
MIME
Original email restricted to ASCII textUsers desire to send
image files audio clips compiled (binary) programs
Solution Multi-purpose Internet Mail Exchange (MIME) Defined in RFC 1521 and RFC 1522
Spring 2000 John Kristoff 29
MIME [continued]
Allows transmission of binary data multimedia files (video/audio clips) multiple types in a single message mixed formats
Backward compatible
Spring 2000 John Kristoff 30
MIME Encoding
Sender inserts additional header lines encodes binary data in (printable) ASCII
Sent like standard messageReceiver
interprets header lines Extracts and decodes parts
Separate standards for content and encoding
Spring 2000 John Kristoff 31
MIME Example
Header lines addedMIME-Version: 1.0Content-Type: Multipart/Mixed; Boundary=xxxsep
Specifies Using MIME version 1.0 Line xxxsep appears before each
message part
Spring 2000 John Kristoff 32
Simple Mail Transfer Protocol (SMTP)
Runs on top of TCPUsed between
Mail transfer program on sender’s computer Mail server on recipient’s computer
Specifies how Client interacts with server Recipients specified Message is transferred
Defined in RFC 821
Spring 2000 John Kristoff 33
Mail Transfer Illustrated
Spring 2000 John Kristoff 34
Computers Without Mail Servers (SMTP)
Typically small, personal computer not continuously connected to the network
To receive email, user must establish mailbox on large computer (server) access mailbox as necessary
Post Office Protocol (POP) often used defined in RFC 1939
Spring 2000 John Kristoff 35
POP Illustrated
Spring 2000 John Kristoff 36
Example Application: Remote Login w/ TELNET
Provides interactive access to computer from a remote site
Text-oriented interface User
invokes client specifies remote computer
Client forms TCP connection to server passes keystrokes over connection displays output on screen
Defined in RFC 854
Spring 2000 John Kristoff 37
Example Application: File Transfer Protocol (FTP)
Complete file copyUses TCPSupports binary or text file transfersLarge set of commandsUntil 1995, it was the major source
of packets on the InternetDefined in RFC 959
Spring 2000 John Kristoff 38
FTP Illustrated
Spring 2000 John Kristoff 39
Example Application: World Wide Web (WWW)
Web pages can contain text, images, imbedded
objects and links standard authoring format is HTML links use URL tags transferred using HTTP
See http://www.w3c.org for all the details
Spring 2000 John Kristoff 40
HyperText Markup Language
Document is free-formatEmbedded tags give display formatTags (often appear in pairs)
Paragraph <P> and </P> Line break <BR> Headings <H1>, <H2> <IMG src=“jtk.jpg” border=“0”> <A
href=“http://www.depaul.edu”>DePaul</A>
Spring 2000 John Kristoff 41
Uniform Resource Locator (URL)
Symbolic representationEmbedded in HTML documentBrowser
hides text of link from user associates link with item on page makes items selectable
Spring 2000 John Kristoff 42
URLs Illustrated
Spring 2000 John Kristoff 43
HyperText Transfer Protocol (HTTP)
Web server makes web pages availableServer uses port 80 by defaultWeb client (browser) requests pagesCreates a TCP connection to serverHTTP sits on top of TCPHTTP v1.1 defined in RFC 2068
major enhancement over v1.0: single TCP connection for multiple HTTP requests
Spring 2000 John Kristoff 44
Browser Operation