chapter 7 by pengxuebo

VIEWS: 4 PAGES: 46

									 Chapter 7: Application Layer


Domain Name System
    Domain Name System (DNS)
         Memorizing the IP address is very difficult.
         IP addresses may be change while names are can
          be saved for the owner.
         A server is necessary like the directory operator in
          telephone network.
         It should answer automatically.
         DNS is defined in RFC1034, 1035


84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Domain Name System
    Domain Name System (DNS)
         An application program called resolver pass the
          name to a known DNS server and get the IP
          address.
         One or more DNS server is defined for any host.
         Any DNS server whose database is limited ask the
          IP address from a larger DNS server.
         For simple memorizing the name have special
          spaces.

84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Domain Name System
    DNS name spaces




             biz (business)                        coop (co-operatives)
             info (information)                    aero (aerospace)
             name (people names)                   museum (museums)
             pro (professions)
84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Domain Name System
    Resource records
             Any entry in the DNS server is save as a resource record
             Any resource record has 5 part and it is saved as binary
              or ASCII
              Domain_name Time_to_live Class Type Value

                cs.mit.edu 86400 IN CNAME
                         lcs.mit.edu




84-85:1                          Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Domain Name System




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Domain Name System
         DNS Server
         Name space zones
             Name servers shouldn’t be single because of size and
              reliability




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Domain Name System
         DNS Server query




         This procedure can not repeat every time so it is
          cashed in local DNS server
         DNS can not tell information about hosts, services
          and so on.
         LDAP (light-weight directory access protocol do it)

84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
         First e-mail system was a file transfer and at first
          line was the address of receiver.
         Internet e-mail architecture and services
             User agent
             Message transfer agent
         E-mail services
             Composition
             Transfer
             Reporting
             Displaying
             Disposition

84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
         Advanced mail services
             Mailboxes
             Mailing lists
             Carbon copies
         E-mail is conclude of
             Envelope (use for transporting, security,…)
             Header (control information for the user agents)
             Body      (message for recipient)




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
         User agent
             Sending e-mail
                 Sender and receiver mail address
                 Text editors
                 Local and remote mailing list
             Reading e-mail




84-85:1                           Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
         Message format
         RFC822
             Header format




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
         Message format
         RFC822
             Header format




             RFC822 allow user to add other header lines starting
              with X-

84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
         Multipurpose internet mail extensions (MIME)
          Messages in languages with accents (e.g., French and German).
          Messages in non-Latin alphabets (e.g., Hebrew and Russian).
          Messages in languages without alphabets (e.g., Chinese and Japanese)
          Messages not containing text at all (e.g., audio or images).
    MIME is described in RFC1341 and revised at RFC2045-2049
         MIME headers added to RFC822
                                                          7-bit ASCII
                                                          8- bit character
                                                          Binary encoding



84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
         Binary encoding
         Base64 encoding:
             3 bytes=4 six bits
             Each 6-bit is replaced by an ASCII code
             == and = show that the last group has 8 or 16 bits
             CR and line feed codes are used to separate lines
         Quoted-printable encoding
             ASCII codes not change other codes are replace by =XX
              each X is a hexadecimal digit.


84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
    MIME types and subtypes




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
    MIME header




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
    Message transfer
    Simple Mail Transfer Protocol (SMTP)
         It use TCP connection to mail server on port 25
         It is ASCII protocol




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail




    SMTP problem have been solved in ESMTP

84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
    Final Delivery
    POP3 (post office protocol)




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
    POP3 services
         Port 110
         Authorization
         Transfer
         Update




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
    IMAP (Internet Message Access Protocol)
         Port 143
         The mail boxes are
          placed on server




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


Electronic Mail
    Delivery features
         Filters
         Vacation Daemon (auto reply)
    Webmail
         There is no special program for user agent
         The GUI of the user agent may be changed by user
          options or server decision



84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    www is designed to accessing linked
     documents
    www cause the next revolution in expanding
     the science after invention of publication.
    First www provided by CERN as text-based
    www consortium can be accessed www.w3.org



84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    Web structure
         WebPages :hypertext documents
         Web addressing (URL)
         Browser :an application program to:
             Fetch the pages
             Interpreting and formatting coomands
             Show the pages




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    Web structure




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    Browser procedure to show a page
          1.   The browser determines the URL (by seeing what was selected).
          2.   The browser asks DNS for the IP address of www.itu.org.
          3.   DNS replies with 156.106.192.32.
          4.   The browser makes a TCP connection to port 80
                on156.106.192.32.
          5.   It then sends over a request asking for file /home/index.html.
          6.   The www.itu.org server sends the file /home/index.html.
          7.   The TCP connection is released.
          8.   The browser displays all the text in /home/index.html.
          9.   The browser fetches and displays all images in this file.


84-85:1                            Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    To show the pages as the writer create it, the
     browser should know the format.
    Hypertext markup language (HTML) is a standard
     format
    HTML at first was designed to link texts to other
     pages but later versions are graphical and can link
     any object to other pages and objects.
    In new versions each page should not include texts. It
     can include picture or documents in PDF format or
     any other files with different formats.
84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    When the page is not a HTML type the MIME
     version of the information helps to show it by
     proper program
    The program for displaying the page may be
     plug-in or helper applications
         Plug in is a code module that browser fetch from
          hard disk and show the program and remove it
          when it is not needed anymore.
         Helper application is an independent program that
          shows the page proper to MIME type.

84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    Browsers has a special program for
     automatically invoke the application helper




84-85:1                         Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    What happens in server side
     1. Accept a TCP connection from a client (a browser).
     2.   Get the name of the file requested.
     3.   Get the file (from disk).
     4.   Return the file to the client.
     5.   Release the TCP connection.

    By the above design the number of clients that
     each server can reply is limited by bandwidth
     and file access from hard disk.

84-85:1                          Elec. Eng. Dept. , IUST
 Chapter 7: Application Layer


World Wide Web
    To improve this limitation web servers cash few mostly
     used files in their memory to eliminate the disk access.
    Another way to speed up the server is multithread process




84-85:1                         Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


World Wide Web
      Single thread with multiple disks can also improve the performance.
      Modern servers perform more complicated process to reply the clients:
           1. Resolve the name of the Web page requested.

           2. Authenticate the client.

           3. Perform access control on the client.

           4. Perform access control on the Web page.

           5. Check the cache.

           6. Fetch the requested page from disk.

           7. Determine the MIME type to include in the response.

           8. Take care of miscellaneous odds and ends.

           9. Return the reply to the client.

           10. Make an entry in the server log.




    84-85:1                         Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


World Wide Web
      When the CPU power is the bottle neck server farm is
       another solution for speed up:
      It is better that any server be specialist for some pages
      TCP connection is another problem in server farm




    84-85:1                         Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


World Wide Web
      TCP handoff may improve this problem




    84-85:1                         Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


World Wide Web
      Uniform resource locator (URL)
             URL has three parts
                 DNS name of the machine that page is located there.
                 A local name (the file name) that indicates specific page.
                 The protocol that shows the page format.




    84-85:1                               Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


World Wide Web
      Statelessness and cookies in Web
             Web is stateless because when the page is fetched the TCP
              connection is released and server forget such client.
             States are necessary in new application like e-commerce and
              registering the clients.
             Netscape gave a solution by sending cookies to the client
             Cookies have 5 parts:




             To remove a cookie server send it again by a expired time


    84-85:1                           Elec. Eng. Dept. , IUST
        Chapter 7: Application Layer


    World Wide Web
   Before sending a request to server browser check for all
    cookies which are sent by that domain and send those to the
    server.
   Contain of the cookies are used by server as they want.
   Cookies may be used to know the customer ID, as a buying
    cart, or as a counter for server.
   Cookies might be misused by hackers:
        Cookies should be sent to the server sent it. But hacker may use many
         bugs of browser to capture cookies not intended for them.
        Cookies may be used to secretly collect the user web browsing habits.
        Cookie eating program can reject cookies based on the user privacy
         rules.

    84-85:1                            Elec. Eng. Dept. , IUST
        Chapter 7: Application Layer


    Wireless Web
   Wireless Application Protocol (WAP)
   WAP is designed to provide WebPages to Mobile phones
   WAP 1.0 is a circuit switched system
   WAP 2.0 and i-mode improved the service to attract more
    customers.
   WAP is protocol stack designed for mobile phones which have
        Weak CPU
        Low memory
        Low resolution and small display



    84-85:1                            Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


    Wireless Web
   WAP protocol stack




   WAE use WML instead of HTML


    84-85:1                         Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


    Wireless Web
   WAP interpreter




    84-85:1                         Elec. Eng. Dept. , IUST
        Chapter 7: Application Layer


    Wireless Web
   Information mode (i-mode)
   i-mode is invented in Japan
   i-mode has three components
        New transmission system : a packet switched network beside a circuit
         switched network for voice.
        New handset: both transmission systems are in one handset with small
         graphical display.
        New language for Webpage design




    84-85:1                            Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


    Wireless Web
   i-mode structure




   i-mode uses cHTML instead of HTML


    84-85:1                         Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


    Wireless Web
   i-mode and WAP comparison




    84-85:1                         Elec. Eng. Dept. , IUST
     Chapter 7: Application Layer


    Wireless Web
   WAP 2.0
   WAP 2.0 saved many good things from WAP 1.0 and i-mode
    and improved many things.
   The two biggest differences are protocol stack and markup
    language.




    84-85:1                         Elec. Eng. Dept. , IUST

								
To top