Upload
majid-taghiloo
View
306
Download
6
Tags:
Embed Size (px)
DESCRIPTION
Internet Applications for IT1 Course
Citation preview
Internet Applications
IT1 Course SlideIT1 Course Slide
Instructor:
Majid Taghiloo
Internet ApplicationsInternet Applications
• Domain Name System
• Electronic mailElectronic mail
• Remote login
• File transfer
• World Wide WebWorld Wide Web
• All use client‐server model
2
NamesNames
• Internet communication requires IP addresses
• Humans prefer to use computer namesHumans prefer to use computer names
• Automated system available to translate ddnames to addresses
• Known as Domain Name System (DNS)y ( )
3
DNS FunctionalityDNS Functionality
• Given– Name of a computerp
• ReturnsC ’ i dd– Computer’s internet address
• Method– Distributed lookup
Client contacts server(s) as necessary– Client contacts server(s) as necessary
4
Domain Name SyntaxDomain Name Syntax
• Alphanumeric segments separated by dots
• ExamplesExampleswww.netbook.cs.purdue.edu
b k ll dwww.eg.bucknell.edu
• Most significant part on rightg p g
5
Obtaining a Domain NameObtaining a Domain Name
i i• Organization– Chooses a desired name– Must be unique– Registers with central authorityg y– Placed under one top‐level domain
• Names subject to international law for• Names subject to international law for– Trademarks
C i ht– Copyright
6
Top Level DomainsTop‐Level Domains
• Meaning assigned to each
7
Within OrganizationWithin Organization
• Subdivision possible
• Arbitrary levels possibleArbitrary levels possible
• Not standardized
• Controlled locally by organization
8
Example Name StructureExample Name Structure
• First level is .com
• Second level is company nameSecond level is company name
• Third level is division within company
• Fourth level either– Company subdivisionCompany subdivision
– Individual computer
9
An ExampleAn Example
• Assume– Company is Foobarp y
– Has two divisions
• Soap division• Soap division
• Candy division
– Candy division has subdivisions
– Soap Division has no subdivisionsp
10
An Example (continued)An Example (continued)
• Names in soap division have form
computer.soap.foobar.com• Names in candy division have form
computer.subdivision.candy.foobar.com
11
Illustration of Foobar Naming Hierarchy
12
The Point About NamesThe Point About Names
The number of segments in a domain name corresponds to the naming hierarchy. There is nocorresponds to the naming hierarchy. There is no universal standard; each organization can choose how to structure names in its hierarchy. yFurthermore, 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 the group.
13
DNS Client Server InteractionDNS Client‐Server Interaction
• Client known as resolver
• Multiple DNS servers usedMultiple DNS servers used
• Arranged in hierarchy
• Each server corresponds to contiguous part of naming hierarchyg y
14
Two Possible DNS HierarchiesTwo Possible DNS Hierarchies
• Choice made by organization
15
Inter Server LinksInter‐Server Links
All domain name servers are linked t th t f ifi d t E htogether to form a unified system. Each server knows how to reach a root server
d h t h th tand how to reach servers that are authorities for names further down the hi hhierarchy.
16
In PracticeIn Practice
• DNS uses backup server(s)
• ISPs and othersISPs and others– Offer DNS service to subscribers
• Small organizations and individuals– Only need domain names for computers running y p g
servers
– Contract with an ISP for domain serviceContract with an ISP for domain service
17
DNS LookupDNS Lookup
• Application– Becomes DNS client– Sends request to local DNS server
• Local server– If answer known, returns response– If answer unknown
• Starts at top level server• Starts at top‐level server• Follows links• Returns responseReturns response
– Called name resolution
18
Caching in DNSCaching in DNS
• Server always caches answers
• Host can cache answersHost can cache answers
• Caching– Improves efficiency
– Eliminates unnecessary searchy
– Works well because high locality of reference
19
DNS TypesDNS Types
E h i i f• Each entry in server consists of– Domain name
DNS type for name– DNS type for name– Value to which name corresponds
• During lookup, client must supplyDuring lookup, client must supply– Name– Type
• Server– Matches both name and type
20
The Point About TypesThe Point About Types
The domain name system stores a type with each entry When a resolver lookswith each entry. When a resolver looks up a name, the resolver must specify the type that is desired; a DNS server returnstype that is desired; a DNS server returns only entries that match the specified typetype.
21
Example DNS TypesExample DNS Types
( dd )• Type A (Address)– Value is IP address for named computer
• Type MX (Mail eXchanger)– Value is IP address of computer with mail serverValue is IP address of computer with mail server
for name
• Type CNAME (Computer NAME)Type CNAME (Computer NAME)– Value is another domain name
U d t t bli h li ( )– Used to establish alias (www)
22
Domain Name AbbreviationDomain Name Abbreviation
• DNS lookup uses full names
• Users desire abbreviationsUsers desire abbreviations
• Technique– Configure resolver with list of suffixes
– Try suffixes one at a timey
23
Example of DNS AbbreviationsExample of DNS Abbreviations
ffi• Suffixes are– foobar.com– candy.foobar.com
• User enters name walnutUser enters name walnut• Resolver tries
l t– walnut– walnut.foobar.com– walnut.candy.foobar.com
24
Other Internet ApplicationsOther Internet Applications
• Invoked directly by user– E‐mail
– Remote login
File transfer– File transfer
– Web browsing
25
Electronic MailElectronic Mail
i i ll• Originally– Memo sent from one user to another
• Now– Memo sent to one or more mailboxesMemo sent to one or more mailboxes
• MailboxD ti ti i t f– Destination point for messages
– Can be storage or program– Given unique address
26
E mail AddressE‐mail Address
T i• Text string• Specifies mail destination
l f• General formmailbox@computer
• computer– Domain name of computer
Actually type MX– Actually type MX
• mailbox– Destination on the computer– Destination on the computer
27
Use of E mail AddressUse of E‐mail Address
Each electronic mailbox has a unique address which is divided into two parts: theaddress, which is divided into two parts: the first identifies a user’s mailbox, and the second identifies a computer on which thesecond identifies a computer on which the mailbox resides. E‐mail software on the sender’s computer uses the second part tosender s computer uses the second part to select a destination; e‐mail software on the recipient’s computer uses the first part torecipient s computer uses the first part to select a particular mailbox.
28
Mail Message FormatMail Message Format
• Header– Identifies sender, recipient(s), memo contents, p ( ),
– Lines of form
keyword:informationkeyword:information
• Blank line
• BodyContains text of message– Contains text of message
29
Example E mail Header FieldsExample E‐mail Header Fields
• Most header lines optional
30
Extending E mailExtending E‐mail
i i l il• Original e‐mail– SMTP ‐ message restricted to ASCII text
• Users desire to send– Image filesImage files– Audio clips
Compiled (binary) programs– Compiled (binary) programs
• Solution– Multi‐purpose Internet Mail Extensions (MIME)
31
MIMEMIME
• Allows transmission of– Binary datay
– Multimedia files (video/audio clips)
Multiple types in single message– Multiple types in single message
– Mixed formats
• Backward compatible
32
MIME EncodingMIME Encoding
d• Sender– Inserts additional header lines– Encodes binary data in (printable) ASCII
• Sent like standard messageSent like standard message• Receiver
I t t h d li– Interprets header lines– Extracts and decodes parts
• Separate standards for content and encoding
33
Example of MIMEExample of MIME
• Header lines added
MIME-Version: 1.0Content-Type: Multipart/Mixed; Boundary=Mime_sep
• Specifies– Using MIME version 1.0
– Line Mime_sep appears before each message part
34
MIMEMIME
Although Internet e‐mail only transfers text, MIME can be used to transport binary dataMIME can be used to transport binary data by encoding it in printed characters. A MIME mail message includes additionalMIME mail message includes additional information that a receiving application uses to decode the message.
35
Mail TransferMail Transfer
P l i Si l M il T f P l (SMTP)• Protocol is Simple Mail Transfer Protocol (SMTP)• Runs over TCP
d b• Used between– Mail transfer program on sender’s computer
Mail server on recipient’s computer– Mail server on recipient s computer
• Specifies how– Client interacts with serverClient interacts with server– Recipients specified– Message is transferred
36
Illustration of Mail TransferIllustration of Mail Transfer
• ServerRequired to receive mail– Required to receive mail
– Places message in user’s mailbox
37
TerminologyTerminology
• Mail exploder– ProgramProgram
– Accepts incoming message
– Delivers to multiple recipientsp p
• Mailing list– Database
– Used by exploder
• Mail gatewayMail gateway– Connects two mail systems
38
Illustration of a Mailing ListIllustration of a Mailing List
• Separate permissions forM ili li– Mailing to list
– Adding/deleting members
• Public anyone can join• Public – anyone can join
• Private – access restricted by owner
39
Illustration of a Mail GatewayIllustration of a Mail Gateway
• Can connect twoCan connect two– Heterogeneous systems– Internet to non‐Internet
40
Automated Mailing ListsAutomated Mailing Lists
• Automated program to handle routine chores of maintaining mailing list: list managerg g g
• Used in conjunction with exploder
E l d d• Example expected command:
add mailbox to list
41
Computers Without Mail ServersComputers Without Mail Servers
• Typically– Small, personal computer, p p
– Not continuously connected to Internet
T i il t• To receive e‐mail, user must– Establish mailbox on large computer
– Access mailbox as necessary
• Post Office Protocol (POP) used• Post Office Protocol (POP) used
42
Illustration of POPIllustration of POP
• Current version named POP3
43
Remote LoginRemote Login
• Provide interactive access to computer from remote site
• Standard protocol is TELNET
44
TELNETTELNET
i d i f• Text‐oriented interface• User
– Invokes client– Specifies remote computerSpecifies remote computer
• ClientF TCP ti t– Forms TCP connection to server
– Passes keystrokes over connection– Displays output on screen
45
File TransferFile Transfer
• Complete file copy
• Major protocol is File Transfer Protocol (FTP)Major protocol is File Transfer Protocol (FTP)– Uses TCP
S bi f– Supports binary or text transfers
– Large set of commands
– Until 1995 was major source of packets in Internet
46
FTP ParadigmFTP Paradigm
• Command‐line interface• User
– Forms TCP connection to server (called control )connection)
– Logs in– Enters commands to list directories, transfer files
• Server– Established new TCP connection for each transfer
47
Transfer ModesTransfer Modes
FTP has two basic transfer modes: one used for text files and the other for all non‐textfor text files and the other for all non text files. Although binary mode produces an exact copy of the bits the resulting copyexact copy of the bits, the resulting copy may be meaningless because does not convert values to the local representations.
48
Illustration of TCP Connections During an FTP File Transfer
• Two TCP connections used
49
TFTPTFTP
• Second file transfer service in TCP/IP: Trivial File Transfer Protocol (TFTP)( )
• Uses UDP instead of TCP
O l fil f• Only supports file transfer
• Useful for bootstrapping a hardware device pp gthat has no disk for system software
50
Network File SystemNetwork File System
il f d d f ll d f• File transfer not needed for all data transfers• File access service allows remote clients to
copy or change small parts of file• File access mechanism used with TCP/IP isFile access mechanism used with TCP/IP is
Network File System (NSF)Allows client to copy or change pieces of file– Allows client to copy or change pieces of file
– Allows shared file accessI t t d i t t ’ fil t– Integrated into computer’s file system
51
SummarySummary
• Applications use client‐server paradigm for interaction
• ClientA bit li ti– Arbitrary application
– Actively initiates communication
– Must know server’s• IP address
• Protocol port number
52
Summary (continued)Summary (continued)
• Server– Specialized programp p g
– Runs forever
Usually offers one service– Usually offers one service
– Passively waits for clients
– Can handle multiple clients simultaneously
53
Summary (continued)Summary (continued)
• Domain Name System– Maps name to IP addressp
– Uses on‐line servers
Uses caching for efficiency– Uses caching for efficiency
• Two e‐mail transfer protocols– SMTP
– POP3POP3
54
Summary (continued)Summary (continued)
• Remote login– Remote, interactive use,
– Protocol is TELNET
Fil t f• File transfer– Copy of entire file
– Protocol is FTP
55