Title: Network Applications
1Network Applications
- Rong Wang
- CGS3285
- Spring2004
2CLIENT-SERVER INTERACTION
- Purpose of network or internetwork
- Provide high-level services to users
- The functionality application software provides
- Request service for users
- Provide services to users
- Determine display format and access information
- Define symbolic identities for nodes and station
- The functionality an internet provides
- A general communication infrastructure
3CLIENT-SERVER PARADIGM
- A diagram of arranging for one application
program to wait passively for another application
to initiate communication - Server
- A program running on the remote machine providing
service to the clients - Passively waits for contact
- Client
- A program running on the local machine requesting
a service - Actively Initiates communications with servers
4SERVER
- A program running on the remote machine providing
service to the clients - Passively waits for incoming requests but never
initiates a service (passive open) - Responds to the request, either interactively or
concurrently - Runs infinitely unless a problem arises
- Server-class computer
- A powerful computer used to run server software
5CLIENT
- A program running on the local machine requesting
a service - Started by users
- Actively Initiates communications with servers
(active open) - Send requests and receives responds
- The whole process is finite and eventually comes
to an end - Close communication and terminates when service
is complete (active close)
6A CLIENT-SERVER MODEL
7CLIENT-SERVER RELATIONSHIP
8REQUESTS, RESPONSES, AND DIRECTION OF DATA
- Information can flow in either or both directions
between a client and server - Typically, a client sends one/multiple request(s)
to a server and a server returns a/multiple
response(s) back - E.g., file transfer server
- In other cases, the server provides continuous
output as soon as the client contacts the
server, the server begins sending data - E.g., local weather server
- Server can
- accept incoming information (e.g. download files)
- Deliver outgoing information (e.g. upload files)
9TRANSPORT PROTOCOLS AND CLIENT-SERVER INTERACTION
- Clients and servers application interacts
directly with a transport-layer protocol - Complete stack of protocols need to run on both
client and server
10MULTIPLE SERVICES ON ONE COMPUTER
- A sufficient computer system that can run more
than one service at the same time requires - A separate server program is needed for each
service - Efficiency and practical
- A server does not consume computational resource
while waiting for a request
11CONCURRENCY
- Both clients and server can run in concurrent
mode - Concurrency in clients
- A computer runs client one by one
- Multiple clients can run at the same time
- Concurrency in servers
- Iterative server
- Serve for only one client at a time
- Concurrent server
- Offer service to many clients at same time
- Requires multiple copies of a server for a single
service
12CONNECTIONLESS ITERATIVE SERVER
- Process one request at a time
- Usually uses UDP
- Uses one single port well known port, for this
purpose - All requests wait online to be served
13CONNECTION-ORIENTED CONCURRENT SERVER
- Usually uses TCP
- Can serve many clients at the same time
- Support connection-oriented communication
- Request is a segmented stream of bytes
- Response can occupy several segments
- Need connection establishment and tear down
- Uses one well-known port and many ephemeral ports
14INTERNET APPLICATIONS
- Well known services
- DNS
- Electronic Mail (SMTP) and File Transfer (FTP)
- HTTP and WWW
- Multimedia
15DOMAIN NAME SYSTEM
16NAME SPACE
- People prefer to use names instead of numeric
address - Need a system to map a name to an address or an
address to a name - A name space
- Used to map a each address to a unique name
- can be organized in two ways
- Flat name space
- Hierarchical name space
17NAME SPACE
- Flat name space
- A name is a sequence of characters without
structure - Problem can not avoid ambiguity and duplication
in a large system (e.g., internet) - Hierarchical name space
- Each name has several parts
- Authority to assign and control the name space
can be decentralized
18 DOMAIN NAME SPACE
- A hierarchical name space
- Trees can have 128 levels
19DOMAIN NAME SPACE DOMAIN NAMES AND LABELS
- Label
- String of each node
- Maximum of 63 characters
- To guarantees the uniqueness, children of each
node must have different labels - Domain Names
- A sequence of labels separated by dots(.).
- Always read from the node up to the root
- Last label is the label of the root (null)
- FQDN Fully Qualified Domain Name
- Terminated by a null string
- E.g., eola.cs.ucf.edu.
- PQDN partially qualified domain name
- Label is not terminated by a null string
- E.g., cs.ucf.edu
20Domain names and labels
21DOMAIN NAME SPECE DOMAINS
- Domain- a subtree of the domain name space
- Name of the domain name of the node at the top
of the subtree - Domain may divide itself into subdomains
22DISTRIBUTION OF NAME SPACE
- DNS servers
- computers that store name space information
- Hierarchy of DNS servers
- Same way of hierarchy of names
23DISTRIBUTION OF NAME SPACE
- Zone
- What a server is responsible for , or has
authority over - Root Server
- A server whose zone consists of the whole tree
- Currently there are more than 13 root servers
- Primary server
- Secondary server
24DNS IN THE INTERNET
- Generic Domains
- Define registered hosts according to their
generic behavior - Country Domains
- Follows the same format as the generic domain
- Uses two character country abbreviations (e.g.,
us, jp, etc) - Inverse Domains
- Used to map an address to a name
25GENERIC DOMAINS
26GENERIC DOMAIN LABELS
Label Description
com Commercial organizations
edu Educational institutions
gov Government institutions
int International organizations
mil Military groups
net Network support centers
org Nonprofit organizations
27GENERIC DOMAIN LABELS (CONT)
Label Description
aero Airlines and aerospace companies
biz Businesses or firms (similar to com)
coop Cooperative business organizations
info Information service providers
museum Museums and other nonprofit organizations
name Personal names (individuals)
pro Professional individual organizations
28COUNTRY DOMAINS
29INVERSE DOMAIN
30RESOLUTION
- Name-address resolution
- Napping a name to an address or an address to a
name - Resolver ( DNS client)
- A host that needs to map an address to a name or
a name to an adress - Mapping Names to Address
- Mapping Addresses to Names
- Recursive Resolution
- Iterative Resolution
- Caching
31RECURSIVE RESOLUTION
32Iterative Resolution
33Note
DNS can use the services of UDP or TCP, using
the well-known port 53.
34ELECTRONIC MAIL
- Sending/Receiving Mail
- Addresses
- User Agents
- MIME
- Mail Transfer Agent
- Mail Access Protocols
35MAIL FORMAT
36SENDING/RECEIVING MAIL
- Sending Mail
- Format of an email
- envelope, message
- Envelope contains sender address, receiver
address - Message contains the header and the body
- Header defines the sender, the receiver and the
subject - Body Actual information ready by the recipient
- Receiving Mail
- The email system checks the mailboxes
periodically - Inform the user
- Display mail
- Include summery message
- Sender mail address, subject, time sent/received,
etc.
37EMAIL ADDRESSES
- Addressing system used by SMTP consists of two
parts - Local part
- defines the name of a special file, called user
mailbox - All mail received is stored for retrieval in
mailbox by the user agent - Domain name
- An organization usually selects one or more hosts
to receive and send mail - Mail exchangers
- Comes from DNS database
38USER AGENT
- Also called mail reader
- Services provided
- Composing Messages
- Reading Messages
- Replying to Messages
- Forwarding Messages
- Handling Mailboxes
- User Agent Types
- Command-Driven
- accept one-character command from keyboard
- e.g., mail and pine
- GUI-Based
- contains graphical user interface
- e.g. Outlook and Netscape
39USER AGENT (CONT)
40SMTP and MIME
- SMTP Simple Mail Transfer Protocol
- Standard mechanism for electronic mail in the
internet - Can send messages only in 7-bit ASCII format
- Limitations
- Can not be used for other character code
- Can not send binary files, video, or audio
- MIME Multipurpose Internet Mail Extensions
- A supplementary protocol
- Allows non-ASCII data to be sent through SMTP
- A set of software functions that transform
non-ASCII data to ASCII data and vice versa - An extension to SMTP only
- Cannot replace SMTP
41MIME
42MTA CLIENT AND SERVER
- MTA Mail Transfer Agent
- Perform mail transfer
- A Client MTA sends mails using SMTP Client
- A Server MTA receives mails using SMTP Server
43COMMANDS AND RESPONSES
- Commands
- Sent from the client the server
- Consists of a keyword followed by zero or more
argument - SMTP defines 14 commands
- Responses
- Sent from the server to the client.
- A 3 digit code that may be followed by additional
textual information
44MAIL TRANSFER PHASES
- Well known port of SMTP server 25
- Three phases occurs in a mail transferring
process - Connection Establishment
- Client make a TCP connection to the well known
port 25 - SMTP server starts the connection phase
- Message Transfer
- A single message exchange between a sender and
one or more recipients - Connection Termination
- Client terminates the connection after the
message is transferred successfully
45MAIL DELIVERY
- The delivery of email consists of three stages
- First Stage
- Email goes from user agent to the local server
- The user agent uses SMTP client software
- The local server uses SMTP server software
- Second Stage
- Email is relayed by the local server, which act
as the SMTP Client, to the remote SMTP server - Third Stage
- The remote user agents uses a mail access
protocol (such as POP3 or IMAP4) to access the
mailbox and obtain the mail
46MAIL DELIVERY (CONT)
47PUSH AND PULL PROTOCOLS
- Push protocol
- It pushes the message from the sender to the
receiver - SMTP protocol
- Used on stage 12
- Pull protocol
- Operation must start with the recipient
- Mails stay in mail server mailbox until the
recipient retrieves it - Mail Access Protocol
- POP3
- IMAP4
- Used on stage 3
48MAIL ACCESS PROTOCOLS POP3
- POP3 (Post Office Protocol)
- Simple with limited functionality
- Client POP3
- Installed on the recipient computer
- Server POP3
- Installed on the mail server
- Limitation
- Does not allow the user to organize mail on the
server - User can not have different folders on the
servers - Before downloading, user can not partially check
the contents of the mail
49MAIL ACCESS PROTOCOLS IMAP4
- IMAP4 (Internet Mail Access Protocol version 4)
- Similar to POP3
- Provides more extra functions so a user can
- check the email header prior to downloading
- search the contents of the email for a specific
string of characters prior to downloading - partially download email
- create, delete, or rename mailboxes on the mail
server - create a hierarchy of mailboxes in a folder for
email storage
50WEB-BASED MAIL
- Email service can be provided in some websites
- e.g., hotmail, yahoo
- HTTP protocol is used to transfer message between
browser and local mail server - SMTP protocol is still used to transfer message
between local mail server and remote mail server - Web site provide log-in functionalities
- If login success, the email is transferred from
the web server to users browser in HTML format