55
Internet Applications IT1 Course Slide IT1 Course Slide Instructor: Majid Taghiloo

Lecture3

Embed Size (px)

DESCRIPTION

Internet Applications for IT1 Course

Citation preview

Page 1: Lecture3

Internet Applications

IT1 Course SlideIT1 Course Slide

Instructor:

Majid Taghiloo

Page 2: Lecture3

Internet ApplicationsInternet Applications

• Domain Name System

• Electronic mailElectronic mail

• Remote login

• File transfer

• World Wide WebWorld Wide Web

• All use client‐server model

2

Page 3: Lecture3

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

Page 4: Lecture3

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

Page 5: Lecture3

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

Page 6: Lecture3

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

Page 7: Lecture3

Top Level DomainsTop‐Level Domains

• Meaning assigned to each

7

Page 8: Lecture3

Within OrganizationWithin Organization

• Subdivision possible

• Arbitrary levels possibleArbitrary levels possible

• Not standardized

• Controlled locally by organization

8

Page 9: Lecture3

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

Page 10: Lecture3

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

Page 11: Lecture3

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

Page 12: Lecture3

Illustration of Foobar Naming Hierarchy

12

Page 13: Lecture3

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

Page 14: Lecture3

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

Page 15: Lecture3

Two Possible DNS HierarchiesTwo Possible DNS Hierarchies

• Choice made by organization

15

Page 16: Lecture3

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

Page 17: Lecture3

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

Page 18: Lecture3

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

Page 19: Lecture3

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

Page 20: Lecture3

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

Page 21: Lecture3

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

Page 22: Lecture3

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

Page 23: Lecture3

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

Page 24: Lecture3

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

Page 25: Lecture3

Other Internet ApplicationsOther Internet Applications

• Invoked directly by user– E‐mail

– Remote login

File transfer– File transfer

– Web browsing

25

Page 26: Lecture3

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

Page 27: Lecture3

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

Page 28: Lecture3

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

Page 29: Lecture3

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

Page 30: Lecture3

Example E mail Header FieldsExample E‐mail Header Fields

• Most header lines optional

30

Page 31: Lecture3

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

Page 32: Lecture3

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

Page 33: Lecture3

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

Page 34: Lecture3

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

Page 35: Lecture3

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

Page 36: Lecture3

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

Page 37: Lecture3

Illustration of Mail TransferIllustration of Mail Transfer

• ServerRequired to receive mail– Required to receive mail

– Places message in user’s mailbox

37

Page 38: Lecture3

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

Page 39: Lecture3

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

Page 40: Lecture3

Illustration of a Mail GatewayIllustration of a Mail Gateway

• Can connect twoCan connect two– Heterogeneous systems– Internet to non‐Internet

40

Page 41: Lecture3

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

Page 42: Lecture3

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

Page 43: Lecture3

Illustration of POPIllustration of POP

• Current version named POP3

43

Page 44: Lecture3

Remote LoginRemote Login

• Provide interactive access to computer from remote site

• Standard protocol is TELNET

44

Page 45: Lecture3

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

Page 46: Lecture3

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

Page 47: Lecture3

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

Page 48: Lecture3

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

Page 49: Lecture3

Illustration of TCP Connections During an FTP File Transfer

• Two TCP connections used

49

Page 50: Lecture3

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

Page 51: Lecture3

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

Page 52: Lecture3

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

Page 53: Lecture3

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

Page 54: Lecture3

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

Page 55: Lecture3

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