SlideShare une entreprise Scribd logo
1  sur  116
Computer Networking :
         Principles, Protocols and Practice

                   Part 2 : Applications


                    Olivier Bonaventure
                   http://inl.info.ucl.ac.be/


CNP3/2008.2.                                    © O. Bonaventure 2008
The Application Layer

       Contents

              The client-server model
              Name to address resolution
              email
              world wide web
              peer-to-peer applications




CNP3/2008.2.                                        © O. Bonaventure 2008
The client server model

               Client                                  Server




                        Service provider (“the network”)




CNP3/2008.2.                                                    © O. Bonaventure 2008
The client server model

                      Client                                  Server




                               Service provider (“the network”)

      Client
              interacts with server through transport layer
              sends queries or commands




CNP3/2008.2.                                                           © O. Bonaventure 2008
The client server model
                                            Queries
                      Client                                  Server




                               Service provider (“the network”)

      Client
              interacts with server through transport layer
              sends queries or commands




CNP3/2008.2.                                                           © O. Bonaventure 2008
The client server model
                                            Queries
                      Client                                  Server
                                            Responses

                               Service provider (“the network”)

      Client
              interacts with server through transport layer
              sends queries or commands
      Server
         Answers the queries received from clients
         Executes the commands from clients
         Many clients can use the same server

      Example           : email, www, ...
CNP3/2008.2.                                                           © O. Bonaventure 2008
The client server model (2)

                      Client                                  Server
                                            Responses


                               Service provider (“the network”)


              Client and servers interact with service provider
              Both the client and the server must speak the
               same language
               Application-level protocol : set of syntactical and
                semantical rules that define the messages exchanged
                between the client and the server and their ordering



CNP3/2008.2.                                                           © O. Bonaventure 2008
The client server model (2)
                                            Queries
                      Client                                  Server
                                            Responses


                               Service provider (“the network”)


              Client and servers interact with service provider
              Both the client and the server must speak the
               same language
               Application-level protocol : set of syntactical and
                semantical rules that define the messages exchanged
                between the client and the server and their ordering



CNP3/2008.2.                                                           © O. Bonaventure 2008
Transport service on the Internet
  On     the Internet, applications can use two different
      transport services
        The service provided by the User Datagram Protocol
         (UDP)
              unreliable connectionless service with error detection

        The service provided by the Transmission Control
         Protocol (TCP)
              reliable bytestream connection-oriented service




CNP3/2008.2.                                                      © O. Bonaventure 2008
UDP service
                                Applic.                                 Applic.
                                  1                                       2


                                              UDP service
  Identification:
  IP address : 2001:6a8:3080:2:217:f2ff:fed6:65c0       Identification
  Protocol : UDP                                        IP address : 2001:4860:a005::68
  Port : 1234                                           Protocol : UDP
                                                        Port : 53
        Identification of an application
              IP address + UDP + port number
        Characteristics of UDP service
              connectionless
              unreliable
               messages can be lost
               transmission errors can be detected but not recovered
               sequence is not preserved
              Maximum size of messages : almost 64 Kbytes
CNP3/2008.2.                                                               © O. Bonaventure 2008
TCP service
                                   Applic.                               Applic.
                                     1                                     2

Identification:
IP address : 138.48.32.107                         TCP service
Protocol : TCP
Port : 9876
                                                                 Identification
         Identification of an application                        IP address: 139.165.16.12
              IP address + UDP + port number                    Protocol : TCP
                                                                 Port : 80
         Characteristics of TCP service
              connection-oriented
              bidirectional
              reliable
              byte stream
              connection release
                  abrupt if initiated by service provider
                  graceful or abrupt if initiated by user

CNP3/2008.2.                                                                 © O. Bonaventure 2008
Internet applications

       Contents

              The client-server model
              Name to address resolution
              email
              world wide web
              peer-to-peer applications




CNP3/2008.2.                                         © O. Bonaventure 2008
Names and addresses




CNP3/2008.2.                    © O. Bonaventure 2008
Names and addresses
   Address           of a server
         IP Address of the host on which the server is running
          port number (TCP or UDP)
              usually well known port number




CNP3/2008.2.                                          © O. Bonaventure 2008
Names and addresses
   Address           of a server
         IP Address of the host on which the server is running
          port number (TCP or UDP)
              usually well known port number

   Drawback
         Difficult to remember an IP address for a human




CNP3/2008.2.                                          © O. Bonaventure 2008
Names and addresses
   Address           of a server
         IP Address of the host on which the server is running
          port number (TCP or UDP)
              usually well known port number

   Drawback
         Difficult to remember an IP address for a human

   Idea
         Replace IP address by a hostname
         Easier for humans
              but IP address is necessary to contact server

         How to translate a hostname in an IP address ?


CNP3/2008.2.                                                   © O. Bonaventure 2008
Names and addresses (2)
   hosts.txt         file
         contains the name-address table
         must be updated regularly
                     #
                     # Internet host   table
                     #
                     127.0.0.1         localhost
                     138.48.32.99      babbage
                     138.48.32.100     leibniz
                     138.48.32.1       routeur
                     138.48.32.92      corneille
                     138.48.32.107     backus
                     138.48.20.152     arzach
                     138.48.32.137     almin01
                     138.48.32.170     duke




         cannot be used in a large network
CNP3/2008.2.                                       © O. Bonaventure 2008
Hostnames

       Requirement
              Host names should be unique

       How          to achieve this in a scalable manner ?
              Introduce hierarchy
              Each hostname is composed of two parts
                  domain name (globally unique)
                  hostname (unique within a given domain)

              How to uniquely distribute domain names ?
                  Introduce hierarchy
                  A small number of top-level domain names
                  Inside each top-level domain, allocate uniquely second
                   level domain names
                  Inside each seconde-level domain, allocate uniquely
                   either third-level domain names or host names,
                  ...
CNP3/2008.2.                                                     © O. Bonaventure 2008
Host names and domain names
   Tree         of all host names



           edu      com         net          gov         mil           be               fr        de


                 Sun    apple          fbi whitehouse             ac     rtbf     cec     inria


                 java     eng         mail    www          fundp       ulg       ucl

                                                   www     info    lihd scf



                                         Pollux backus leibniz                  Angora
      siamois spirou




CNP3/2008.2.                                                                                       © O. Bonaventure 2008
How to translate names into
                                           addresses ?
       How             to efficiently translate a host name ?
               By using a centralised database
                    there are more than 1 billion host names today
               By using a distributed database
                    DNS : Domain Name System
                    relies on the hierarchy of domain names
                    there is one server responsible for each domain and
                     this server must be queried to translate host names
                     inside this domain


               edu      com         net          gov         mil           be            fr      de


                     sun    apple         fbi whitehouse              ac    rtbf   cec   inria


                     java                 mail    www          fundp       ulg     ucl

                                                       www     info    lihd scf
CNP3/2008.2.                                                                                     © O. Bonaventure 2008
How to translate names into
                                            addresses ?
   Domain              Name Service (DNS)
         Each DNS server is responsible for a domain and
          knows
              The IP addresses of all host names in this domain
              The IP addresses of the DNS servers responsible for
               subdomains

         Examples
                edu      com         net          gov       mil        be            fr        de


                      sun    apple         fbi whitehouse         ac    rtbf   cec   inria


                      java                 mail    www        fundp    ulg     ucl

                                                                        www      info math fsa
              java.sun.com
              www.ucl.ac.be
CNP3/2008.2.                                                                                 © O. Bonaventure 2008
DNS resolver
   To   be able to translate name to addresses, a
       DNS implementation needs
         to know actual list of IP addresses of root servers
         to implement the DNS protocol and traverse the
          domain names hierarchy
         Difficult to do this on all endhosts

   Solution
         DNS resolver
              one resolver for a set of endhosts
              maintains up-to-date list of IP addresses of root servers
              implements DNS protocol

         endhosts
              only need to be able to send DNS requests to resolver
              must know IP address of closest DNS resolvers
CNP3/2008.2.                                                      © O. Bonaventure 2008
DNS : optimisations
   Reduce           risk of failures
         several root-servers
         server DNS servers authoritative for each domain
         each endhost can send queries to multiple resolvers

   Improved           performance
         avoid sending several times the same query
         cache memory on DNS resolvers containing
              recent name-addresses translations
              addresses of DNS servers recently contacted

   DNS          protocol
         usually runs over UDP
         sometimes is also used over TCP


CNP3/2008.2.                                                 © O. Bonaventure 2008
DNS : message format

Each DNS request contains a number that will be returned in the
response by the server to allow the client to match the request.

                                      32 bits
                                                           Question/Response
                                                           Recursive question or not
                  Identification            Flags
                                                           Authoritative answer or not
    12 bytes   Number of questions Number of answers
                                                           Possible error

               Number of authority Number of additional
                              Questions
                 (variable number of resource records)
                                 Answers
                   (variable number of resource records)

                                 Authority
                   (variable number of resource records)
                           Additional information
                  (variable number of resource records)




CNP3/2008.2.                                                               © O. Bonaventure 2008
DNS : resource records

       Each    DNS messages is composed of
           resource records (RR) encoded as TLV
              < Name, Value, Type, TTL>
              Types de RR            Lifetime of the             RR in serverʼs cache
                  A (Address)
                      Name is a hostname and Value an IPv4 address
                  AAAA (Address)
                      Name is a hostname and Value an IPv6 address
                  NS (NameServer)
                      Name is a domain name and Value is the hostname of the DNS
                       server responsible for this domain
                  MX (Mail Exchange)
                      Name is a domain name and Value is the name of the SMTP
                       server that must be contacted to send emails to this domain
                  Type CNAME
                      Alias

CNP3/2008.2.                                                               © O. Bonaventure 2008
Internet applications

       Contents

              The client-server model
              Name to address resolution
              email
              world wide web
              peer-to-peer applications




CNP3/2008.2.                                         © O. Bonaventure 2008
Email
   Simplified       model
         Alice sends an email to Bob




                       Aliceʼs            b.net ʻs
                     email server       email server
      Alice@a.net                                         Bob@b.net




CNP3/2008.2.                                           © O. Bonaventure 2008
Email
   Simplified              model
         Alice sends an email to Bob




                                Aliceʼs        b.net ʻs
                              email server   email server
      Alice@a.net                                              Bob@b.net


                Alice sends her email
               to local mail forwarder




CNP3/2008.2.                                                © O. Bonaventure 2008
Email
   Simplified              model
         Alice sends an email to Bob




                                Aliceʼs                 b.net ʻs
                              email server            email server
      Alice@a.net                                                       Bob@b.net


                Alice sends her email
               to local mail forwarder
                                     Aliceʼs server sends email
                                            to b.netʼs MX



CNP3/2008.2.                                                         © O. Bonaventure 2008
Email
   Simplified              model
         Alice sends an email to Bob




                                Aliceʼs                b.net ʻs
                              email server           email server
      Alice@a.net                                                            Bob@b.net


                Alice sends her email                          Bob retrieves message
               to local mail forwarder                            from his server
                                     Aliceʼs server sends email
                                            to b.netʼs MX



CNP3/2008.2.                                                              © O. Bonaventure 2008
Email message format

                                    From: president@abc.be
                                    To: ceo@def.com
                                    Subject: Hello              Header
                                    Date : 27 Sept. 1999 0901

     Exp: ABC S.A.                   Dear Sir,
     Rue de Fer 10
     5000 Namur
                                     Bla Bla Bla...
                                                                Message
               DEF Corp.
                                                                body
               Steel street 9
               WA78 AX London
               Grande Bretagne




CNP3/2008.2.                                                © O. Bonaventure 2008
Message format (2)
   Header             format
         Contains only US-ASCII (7bits) characters
         At least three lines that end with <CRLF>
              From: sender@domain
              To:recipient@domain
              Date: <creation date of message>
                  example : 26 Aug 199 1445 EDT
         Optional fields
              Subject: subject of message
              cc: copy@domain
              Message-ID: <number@domain>
              Received: information on path followed by message
              In-Reply-To: <message-ID>
         Header ends with empty line (<CRLF>)



CNP3/2008.2.                                                  © O. Bonaventure 2008
MIME




CNP3/2008.2.          © O. Bonaventure 2008
MIME
  Internet    email was designed for US-ASCII
        How to transmit more complex messages ?




CNP3/2008.2.                                       © O. Bonaventure 2008
MIME
  Internet           email was designed for US-ASCII
        How to transmit more complex messages ?
  Multipurpose                Internet Mail Extensions
        Improved email message format
        Constraints
              must remain compatible with old email servers
                most of them only support US-ASCII and short lines
              must support non-English text
                character set must be beyond 7bits US-ASCII
              must support various formats in a single message
                message body, attachments, ...
              must allow to transmit audio, video, ...
                need to identify the type of content




CNP3/2008.2.                                                          © O. Bonaventure 2008
MIME
  Internet           email was designed for US-ASCII
        How to transmit more complex messages ?
  Multipurpose                Internet Mail Extensions
        Improved email message format
        Constraints
              must remain compatible with old email servers
                most of them only support US-ASCII and short lines
              must support non-English text
                character set must be beyond 7bits US-ASCII
              must support various formats in a single message
                message body, attachments, ...
              must allow to transmit audio, video, ...
                need to identify the type of content

  Solution
        add new optional fields in header
        add optional fields inside message body when
CNP3/2008.2.                                                          © O. Bonaventure 2008
MIME (2)
   New          header fields
         MIME-Version:
              version of MIME used to encode message
              current version : 1.0
         Content-Description:
              comment describing the content of the message
         Content-Type:
              type of information inside message
         Content-Transfer-Encoding:
              how the message has been encoded
         Content-Id:
              unique identifier for the content




CNP3/2008.2.                                                   © O. Bonaventure 2008
MIME: Content-Type
   Content-Type                   : type/encoding
         type of content
              text, image, video, application
              multipart
         encoding of content
              text/plain , text/html
              image/gif, image/jpeg
              audio/basic
              video/mpeg, video/quicktime
              application/octet-stream, application/postscript
              multipart/alternative
                   message contains several times the same information with different
                    encodings
              multipart/mixed
                   message contains several information of different types
                    example : text of message body and attachment




CNP3/2008.2.                                                                  © O. Bonaventure 2008
Character sets and
                                       content encoding
   How          to support rich character sets ?
         Content-Type: text/plain; charset=us-ascii
              ASCII 7bits, default
         Content-Type: text/plain; charset=iso-8859-1
              Character set suitable for Western European languages,
               defined by ISO, 8 bits per character
              Content-Type: text/plain; charset=unicode
              Universal character set, defined by ISO, 16 bits per character
   How          to encode non-text data ?
         data must be encoded in US-ASCII 7 bits characters
         Base64
         uses ASCII characteres A...Z,a...z,0...9, "+" et "/"
              A=0, B=1, C=2, ... +=62 et /=63
         Each character is used to encode 6 bits
              24 bits from initial message -> 4 ASCII characters
         Special character “=” used for padding
CNP3/2008.2.                                                        © O. Bonaventure 2008
Multipart/mixed
   How     to place different contents and encoding in
       a single message ?
         We need a delimiter between the different content
          types placed inside message body

               Date: Mon, 20 Sep 1999 16:33:16 +0200
               From: Nathaniel Borenstein <nsb@bellcore.com>
               To: Ned Freed <ned@innosoft.com>
               Subject: Test
               MIME-Version: 1.0
               Content-Type: multipart/mixed; boundary="simple boundary"
               preamble, to be ignored
               --simple boundary
               Content-Type: text/plain; charset=us-ascii
               partie 1
               --simple boundary
               Content-Type: text/plain; charset=us-ascii
               partie 2
               --simple boundary



CNP3/2008.2.                                                               © O. Bonaventure 2008
Email transmission
   SMTP              : Simple Mail Transfer protocol
         uses TCP service
         Address of SMTP server
              IP address of server + TCP + port number: 25
                  RR of type MX can be used to find the SMTP server responsible for a
                   given domain




                                           SMTP                    Email
                      SMTP
                                                                  retrieval
                               a.netʼs             b.netʼs SMTP
                             SMTP server              server
       Alice@a.net                                                            Bob@b.net

CNP3/2008.2.                                                              © O. Bonaventure 2008
SMTP
   Client-server                model
         Server waits for email messages to relay/deliver
         Client sends email messages through server

   Application-level              protocol
         client opens TCP connection
         Client sends commands composed of
              command parameter <CRLF>
                  HELO
                  MAIL FROM:
                  RCPT TO:
                  DATA
                  QUIT
         Server answers with one-line replies
              numeric_code comment (text) <CRLF>
                  250 OK
                  221 closing

CNP3/2008.2.                                          © O. Bonaventure 2008
SMTP (2)
   Three            phases of SMTP
     1.   Establishment of an SMTP association
              TCP connection established upon request from client
              Server greetings
              HELO command from client
     2.   Message transfer
              MAIL FROM: <user@domaine>
              RCPT TO: <user@domaine>
              DATA
                  transmission of entire message including headers
                  one line containing only the dot “.” characters marks end of message
              Other subsequent messages can be transmitted after
     3.   Release of the SMTP association
              QUIT
              Closing message from server
              TCP connection is closed


CNP3/2008.2.                                                               © O. Bonaventure 2008
Retrieval of email messages
   In         the old days
     1.   Destination is always connected to the Internet
              email addresses are username@hostname
              When an email arrives, it is stored in a file that belongs to the
               user, e.g. /var/mail on Unix

   Today
         Most networks have one or a few SMTP servers used
          to receive emails, but also detect spam, viruses, ...
         Endusers retrieve their emails from this server
              Post Office Protocol (POP)
              Internet Mail Access Protocol (IMAP)
              Webmail




CNP3/2008.2.                                                       © O. Bonaventure 2008
POP
   Goal
         Allow authenticated users to retrieve email messages
          from server
   Operation
         POP uses TCP service
         Address of POP server
              Host address + TCP + port number : 110
         Client send commands
              command : one ASCII line ending with <CRLF>
              USER, PASS, STAT, RETR, DELE, QUIT
         server replies with
              +OK if command was successful
                  email messages follow some +OK replies
              -ERR in case of errors



CNP3/2008.2.                                                 © O. Bonaventure 2008
POP (2)
   Three            phases of the protocol
     1.   Authorisation : checking the user credentials
              USER <username>
              PASS <password>
     2.   Transaction
              retrieval and removal of messages
              STAT
                  list headers of stored messages
              RETR <n>
                  retrieval of the nth message
              DELE <n>
                  the nth message is marked for deletion
     3.   Update
              End of the retrieval phase
                  Messages marked for deletion are removed from server
                  TCP connection is closed



CNP3/2008.2.                                                              © O. Bonaventure 2008
Internet applications

       Contents

              The client-server model
              Name to address resolution
              email
              world wide web
              peer-to-peer applications




CNP3/2008.2.                                         © O. Bonaventure 2008
FTP : File Transfer Protocol
       Protocol          from the old days
              allows a client to send/retrieve files from a server

       Problems            solved by FTP
              User authentication
                  username, password
              Filesystem traversal
                  browse directories on server and locate files
              file transfer
                  to or from the server




CNP3/2008.2.                                                      © O. Bonaventure 2008
FTP : File Transfer Protocol
       Protocol           from the old days
              allows a client to send/retrieve files from a server

       Problems             solved by FTP
              User authentication
                  username, password
              Filesystem traversal
                  browse directories on server and locate files
              file transfer
                  to or from the server
                                                        Server
                        Client
                                    Commands
                                 Ftp-control : port21
                                    Responses
                                 Ftp-data : port 20


CNP3/2008.2.                                                      © O. Bonaventure 2008
FTP : main commands
        Main         commands
              USER <user>
                  username, ftp for anonymous access
              PASS <pass>
                  allows user to send password associated to username
              SYST
                  information about type of server
              CWD <path>
                  directory traversal
              STOR <file>
                  save file in the current directory on server
              RETR <file>
                  retrieve file from current directory on server
              PORT <B1,B2,B3,B4,B5,B6>
                  use TCP connection on port B5*256+B6 on
                   B1.B2.B3.B4

CNP3/2008.2.                                                       © O. Bonaventure 2008
World Wide Web

       Goals
              Allow browsers to browse hypertext documents
               stored on multiple servers

                                    Server www.machin.be

                                                  Server www.truc.fr
                     Query
                             Information


           Client
         (browser)


                                           Server www.stuff.com
CNP3/2008.2.                                                           © O. Bonaventure 2008
World Wide Web (2)

       The         five key elements of www
          1.   An addressing scheme that allows to identify any
               document stored on a server
                  URL : Uniform Resource Locator
          2.   An hypertext language that allows to easily write
               documents with hypertext links
                  HTML : HyperText Markup Language
          3.   An efficient and lightweight application-level
               protocol to exchange documents
                  HTTP : HyperText Transfer Protocol
          4.   Servers
          5.   Clients (browsers)


CNP3/2008.2.                                              © O. Bonaventure 2008
Uniform Resource Locator (URL)
   Uniform               Resource Locator (URL)
         generic syntax : <protocol>://<document>
              protocol used to retrieve document from server
                  http is the most common one but others are frequently used
              document indicates the server and the location of the
               document
              <user>:<password>@<server>:<port>/<path>
                      <user> : optional username
                      <password> : optional password
                      <machine> : hostname or IP address of the server that hosts the
                       document
                      <port> : optional port number
                      <path> : document location on server
              examples
                  http://www.info.ucl.ac.be
                  http://alice:secret@inl.info.ucl.ac.be:80/index.html



CNP3/2008.2.                                                                © O. Bonaventure 2008
HTML
   HyperText             Markup Langage
         Language used to encode documents on the web
         Keywords
                  <HTML>...</HTML>
                  <HEAD>...</HEAD>
                  <BODY>...</BODY>
                  <TITLE>..</TITLE>
                  <B>...</B>
                  <I>...</I>
                  <H1>...</H1>
                  <P>
                  <HR>
                  <UL>...</UL>
                  <OL>...</OL>
                  <IMG SRC="URL">
                  <A HREF="URL">text anchor</A>




CNP3/2008.2.                                       © O. Bonaventure 2008
HTML (2)
   Example

               <HTML>
               <HEAD>
Header         <TITLE>HTML test page</TITLE>
               </HEAD>                                        Image on remote server
               <BODY>
               <IMG SRC="http://www.images.be/logo.gif">
               <H1>Web servers from UCL UCL<P></H1>
               <HR>                                           First level   title
               <UL>
                <LI><A HREF="http://www.uclouvain.be">UCL</A>
 Body           <LI><A HREF="http://www.info.ucl.ac.be">CSE Dept.</A>
                <LI><A HREF="http://www.math.ucl.ac.be">Math</A>
               </UL>
               </BODY>
               </HTML>
                                                             External hypertext link




CNP3/2008.2.                                                          © O. Bonaventure 2008
Information transfer www
   HTTP           1.0 - non-persistent connection
         Principle
              relies on TPC service (default port : 80)
              Client sends request, server sends reply
      Client                                               Server




CNP3/2008.2.                                                 © O. Bonaventure 2008
Information transfer www
   HTTP           1.0 - non-persistent connection
         Principle
              relies on TPC service (default port : 80)
              Client sends request, server sends reply
      Client                                                  Server

    CONNECT.request                                    CONNECT.indication

                                                       CONNECT.response
    CONNECT.confirm




CNP3/2008.2.                                                     © O. Bonaventure 2008
Information transfer www
   HTTP           1.0 - non-persistent connection
         Principle
              relies on TPC service (default port : 80)
              Client sends request, server sends reply
      Client                                                   Server

    CONNECT.request                                    CONNECT.indication

                                                       CONNECT.response
    CONNECT.confirm

    DATA.request(Request)                            DATA.ind(Request)

                                                     DATA.req(Response)
        DATA.ind(Response)



CNP3/2008.2.                                                      © O. Bonaventure 2008
Information transfer www
   HTTP           1.0 - non-persistent connection
         Principle
              relies on TPC service (default port : 80)
              Client sends request, server sends reply
      Client                                                   Server

    CONNECT.request                                    CONNECT.indication

                                                       CONNECT.response
    CONNECT.confirm

    DATA.request(Request)                            DATA.ind(Request)

                                                     DATA.req(Response)
        DATA.ind(Response)
                                                     DISCONNECT.req
         DISCONNECT.ind
                                                    DISCONNECT.ind
     DISCONNECT.req
CNP3/2008.2.                                                      © O. Bonaventure 2008
HTTP




                               Server
               Client




CNP3/2008.2.                        © O. Bonaventure 2008
HTTP
                                                 Method
  Header contains additional information         GET
                                                 POST
  about request sent by client
                                                 ...



                                   Request
                                     Method
                                     Header
                                      CRLF
                                 MIME Document            Server
               Client




CNP3/2008.2.                                                   © O. Bonaventure 2008
HTTP
                                                   Method
  Header contains additional information           GET
                                                   POST
  about request sent by client
                                                   ...



                                   Request
                                     Method
                                     Header
                                      CRLF
                                 MIME Document              Server
               Client
                                   Response
                                   Status line
                                      Header
                                       CRLF
                                  MIME Document
                                                        Success or failure

   Header contains information about server
   and optional parameters specific to response


CNP3/2008.2.                                                     © O. Bonaventure 2008
HTTP
                                                           Method
  Header contains additional information                   GET
                                                           POST
  about request sent by client
                                                           ...



                                     Request
                                       Method
                                       Header
                                        CRLF
                                   MIME Document                    Server
           Client
                                      Response
                                     Status line
                                        Header
                                         CRLF
                                    MIME Document
                                                                Success or failure

  Header contains information about server
  and optional parameters specific to response
       HTTP is a stateless protocol, server does not maintain any state from
       one request to another
       POP, FTP, SMTP are examples of stateful protocols in contrast
CNP3/2008.2.                                                           © O. Bonaventure 2008
HTTP : Example


                                   Server
                                   www.info.ucl.ac.be


               Client




CNP3/2008.2.                             © O. Bonaventure 2008
HTTP : Example


                Request                             Server
                   GET /index.html HTTP/1.1
                  Host: www.info.fundp.ac.be        www.info.ucl.ac.be
                             CRLF


               Client




CNP3/2008.2.                                              © O. Bonaventure 2008
HTTP : Example


                Request                                        Server
                   GET /index.html HTTP/1.1
                  Host: www.info.fundp.ac.be                   www.info.ucl.ac.be
                             CRLF


               Client


                           Response
                           HTTP/1.1 200 OK
                           Date: Fri, 10 Sep 1999 14:29:19 GMT
                           Server: Apache/1.3.0 (Unix) ApacheJServ/1.0b5
                           Last-Modified: Thu, 02 Sep 1999 11:50:50 GMT
                           Content-Length: 1224
                           Content-Type: text/html
                           CRLF
                           <HTML>
                           . . .
                           </HTML>


CNP3/2008.2.                                                        © O. Bonaventure 2008
HTTP : Methods
   Methods
         GET
              method used to request a "document" stored on server
                  GET <document>      HTTP/1.0
              example
                  GET /index.html      HTTP/1.0

         POST
              method used to send a "document" to a server
                  document is part of the request and encoded as a MIME document




CNP3/2008.2.                                                            © O. Bonaventure 2008
HTTP : Request headers
    Request           headers
          Allow to add information about the client or the request
          Host: <name>
              Name of the server where the document is stored
          Authorization
              allows to perform access control
          If-Modified-Since:                <date>
              server will only send the requested document if the document
               is more recent than date
          Referer: <url>
              Information, indicates the URL visited by the client before this
               request
          User-Agent: <agent>
              information, indicates the browser used on the client



CNP3/2008.2.                                                      © O. Bonaventure 2008
HTTP : Status line
   Status          liine
        Format : Version_HTTP Code Comment
        Success/Failure
              1xx : For information (unused)
              2xx : Success
                Example : HTTP/1.0 200 OK
              3xx : Redirection
             Request could not be handled on local server and should be sent to
              another server
             Example :
              HTTP/1.0 301 Moved permanently
              attached MIME document will contain URL of document
              4xx : Client-side error
                examples
                 syntax error, unreachable URL, unauthorised, ...
              5xx : Server-side error
                examples :
                 internal error, method not implemented on server, ...


CNP3/2008.2.                                                              © O. Bonaventure 2008
HTTP : Response headers
   Header
         Optional information about the server, the response or
          the document attached to the response
         Date
              date of the document attached to response
              example : Date: Wed, 05 Sep 2001 13:27:34 GMT
         Server
              Name and version of http server used
              example :
               Server: Apache/1.3.20 (Unix)ApacheJServ/1.1.2 PHP/4.0.6
         Content-*
              MIME header of the attached document
              example :
               Content-Length: 5891
               Content-Type: text/html


CNP3/2008.2.                                               © O. Bonaventure 2008
HTTP 1.1




CNP3/2008.2.              © O. Bonaventure 2008
HTTP 1.1

       HTTP           1.0
              a single TCP connection used to transmit
               a single document (html file, image,...)
                  the establishment and release of the TCP connection
                   induce a significant overhead, in particular for small pages




CNP3/2008.2.                                                      © O. Bonaventure 2008
HTTP 1.1

       HTTP           1.0
              a single TCP connection used to transmit
               a single document (html file, image,...)
                  the establishment and release of the TCP connection
                   induce a significant overhead, in particular for small pages

       HTTP           1.1
              uses a single persistent TCP connection
                  This TPC connection can be used for several requests
                   and the corresponding responses
                  the cost of establishing and releasing the TCP connection
                   is amortised over multiple requests
                  Although HTTP 1.1 uses a single TCP connection for
                   multiple requests, HTTP 1.1 remains stateless



CNP3/2008.2.                                                      © O. Bonaventure 2008
HTTP 1.1 : Persistent connection
                                       Server
     Client




CNP3/2008.2.                                © O. Bonaventure 2008
HTTP 1.1 : Persistent connection
                                          Server
     Client




     CONNECT.request                  CONNECT.indication

     CONNECT.confirm                  CONNECT.response




CNP3/2008.2.                                   © O. Bonaventure 2008
HTTP 1.1 : Persistent connection
                                           Server
     Client




     CONNECT.request                   CONNECT.indication

     CONNECT.confirm                   CONNECT.response
GET / HTTP1.1
Connection: Keep-Alive
...




CNP3/2008.2.                                    © O. Bonaventure 2008
HTTP 1.1 : Persistent connection
                                            Server
     Client




     CONNECT.request                   CONNECT.indication

     CONNECT.confirm                   CONNECT.response
GET / HTTP1.1
Connection: Keep-Alive
...                                    HTTP/1.1 200 OK
                                       Keep-Alive: timeout=15, max=100
                                       Connection: Keep-Alive
                                       ...




CNP3/2008.2.                                       © O. Bonaventure 2008
HTTP 1.1 : Persistent connection
                                            Server
     Client




     CONNECT.request                   CONNECT.indication

     CONNECT.confirm                   CONNECT.response
GET / HTTP1.1
Connection: Keep-Alive
...                                    HTTP/1.1 200 OK
                                       Keep-Alive: timeout=15, max=100
                                       Connection: Keep-Alive
GET /images/logo.gif HTTP1.1           ...
Connection: Keep-Alive
...




CNP3/2008.2.                                       © O. Bonaventure 2008
HTTP 1.1 : Persistent connection
                                            Server
     Client




     CONNECT.request                   CONNECT.indication

     CONNECT.confirm                   CONNECT.response
GET / HTTP1.1
Connection: Keep-Alive
...                                    HTTP/1.1 200 OK
                                       Keep-Alive: timeout=15, max=100
                                       Connection: Keep-Alive
GET /images/logo.gif HTTP1.1           ...
Connection: Keep-Alive
...
                                      HTTP/1.1 200 OK
                                      Keep-Alive: timeout=15, max=99
                                      Connection: Keep-Alive
                                      ...




CNP3/2008.2.                                       © O. Bonaventure 2008
HTTP 1.1 : Persistent connection
                                                Server
     Client




     CONNECT.request                       CONNECT.indication

     CONNECT.confirm                       CONNECT.response
GET / HTTP1.1
Connection: Keep-Alive
...                                        HTTP/1.1 200 OK
                                           Keep-Alive: timeout=15, max=100
                                           Connection: Keep-Alive
GET /images/logo.gif HTTP1.1               ...
Connection: Keep-Alive
...
                                          HTTP/1.1 200 OK
                                          Keep-Alive: timeout=15, max=99
                                          Connection: Keep-Alive
                                          ...

                                          DISCONNECT.req
               DISCONNECT.ind
                                         DISCONNECT.ind
       DISCONNECT.req
CNP3/2008.2.                                           © O. Bonaventure 2008
Improving performance

       Observation
              Many pages are requested multiple times or from
               close endhosts
       Solution
              local cache on each client
                  if-modified-since header helps
              one cache for multiple endhosts




CNP3/2008.2.                                           © O. Bonaventure 2008
Improving performance

       Observation
              Many pages are requested multiple times or from
               close endhosts
       Solution
              local cache on each client
                  if-modified-since header helps
              one cache for multiple endhosts      ServerA
         Client1



                                                         ServeurB
         ClientN
                                  Proxy


CNP3/2008.2.                                                  © O. Bonaventure 2008
HTTP Authentication
               Example


       Client


                                        Server




CNP3/2008.2.                               © O. Bonaventure 2008
HTTP Authentication
               Example


       Client


                                                        Server
GET / HTTP1.1
...
                                               HTTP/1.0 401 Authorization req
                                               WWW authenticate: machin
                                               ...
Browser asks user/password to user




CNP3/2008.2.                                                 © O. Bonaventure 2008
HTTP Authentication
               Example


       Client


                                                        Server
GET / HTTP1.1
...
                                               HTTP/1.0 401 Authorization req
                                               WWW authenticate: machin
                                               ...
Browser asks user/password to user
GET / HTTP1.1
Authorization: User-password
...
                                                HTTP/1.1 200 OK
                                                ...
 GET /images/t.gif HTTP1.1
 Authorization: User-password
 ...
 Browser sends user/password in each request
CNP3/2008.2.                                                 © O. Bonaventure 2008
HTTP Cookies
        Example

       Client


                              Server



                              Normal response




CNP3/2008.2.                      © O. Bonaventure 2008
HTTP Cookies
        Example

       Client


                                       Server
GET / HTTP1.1
...
                              HTTP/1.0 200 OK
                              Set-Cookie: machin
                              ...
Browser saves cookie
                                      Normal response




CNP3/2008.2.                               © O. Bonaventure 2008
HTTP Cookies
        Example

       Client


                                               Server
GET / HTTP1.1
...
                                      HTTP/1.0 200 OK
                                      Set-Cookie: machin
                                      ...
Browser saves cookie
                                              Normal response
 GET /doc HTTP1.1
 Cookie: machin
 ...
                                      HTTP/1.1 200 OK
                                      ...
                                              Response is function
 GET /images/t.gif HTTP1.1
 Cookie: machi                                of URL and cookie
 ...
 Browser sends cookie in all
 requests sent to server
CNP3/2008.2.                                       © O. Bonaventure 2008
Internet applications

       Contents

              The client-server model
              Name to address resolution
              email
              world wide web
              peer-to-peer applications




CNP3/2008.2.                                         © O. Bonaventure 2008
Predicted IP traffic growth

                                                              Predicted IP traffic growth
                          30000000




                          22500000
               TB/month




                          15000000




                          7500000




                                0
                                     2005    2006   2007      2008    2009   2010    2011



                                       Internet            Non-Internet IP          Total
CNP3/2008.2.                                                                                © O. Bonaventure 2008
Predicted IP traffic growth
                                                       Predicted IP traffic growth
                          20000000




                          15000000
               TB/month




                          10000000




                           5000000




                                0
                                     2005    2006      2007        2008       2009       2010   2011

                                            Consumer          Business          Mobile




CNP3/2008.2.                                                                                    © O. Bonaventure 2008
Predicted IP traffic growth (3)
                                                          Consummer IP traffic growth
                          8000000




                          6000000
               TB/month




                          4000000




                          2000000




                               0
                                    2005       2006        2007      2008      2009     2010   2011


                                           Web/Mail/FTP            P2P          Gaming
                                           VideoComm               VoIP         VideotoPC
                                           VideotoTV
CNP3/2008.2.                                                                                      © O. Bonaventure 2008
Peer-to-peer file sharing

        Evolution            of file sharing on the Internet
        Servers            using ftp protocol
              A single server that serves all files on disk
              A set of mirror serves serving the same content

        The           innovation introduced by Napster
              How to distribute many files from many nodes ?
                  Keep the files on their source nodes
                  Central Napster server stores description and URL of
                   each shared file
                  Users willing to obtain a file consult central server to
                   obtain file URL and then download file from their
                   respective source nodes
                      server remains simple and can index large number of files
                      server does not directly participate in file transfer
CNP3/2008.2.                                                              © O. Bonaventure 2008
Peer-to-peer file sharing (2)

        Limitations          of the Napster approach
              a single server indexes all files
              if a source node fails, then the ongoing file
               transfers must be restarted
                  completely or partially depending on the file transfer
                   protocol begin used for the transfer
              performance of file transfer is function of
               performance of the corresponding source node
                  if source node is connected via ADSL, performance will
                   be severely limited
        How         to improve ?
              Divide the file in blocks
              Each block can be served by multiple nodes
                  provides redundancy
              Download from several nodes at the same time
                  one TCP connection may be slow and others faster
CNP3/2008.2.                                                      © O. Bonaventure 2008
Distributed Hash Table based P2P
        How  to scale file sharing to a very large
         number n of nodes ?
        Principle of the solution
              Use a hash function such as SHA-1
              Each node has one identifier, id=hash(IPaddress)
               and a pointer to its successor on the Chord ring
                                            Node 1
                     Node 15



                                                 Node 5

                    Node 12
CNP3/2008.2.                                Node 7        © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15



                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15


  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15


  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15


  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15


  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15


  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15

                                                  Hash(BARFOO)=5
  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15

                                                  Hash(BARFOO)=5
  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15

                                                  Hash(BARFOO)=5
  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15

                                                  Hash(BARFOO)=5
  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to store files ?
         Principle
              File FOOBAR is stored on the node whose id is
               the successor of hash(“FOOBAR”) on the ring
              A node on the ring uses its successors to find the
               responsible node for a given file
                  Examples
                                            Node 1
                      Node 15

                                                  Hash(BARFOO)=5
  Hash(FOOBAR)=13
                                                Node 5

                     Node 12
                                            Node 7
CNP3/2008.2.                                             © O. Bonaventure 2008
How to find files faster ?




CNP3/2008.2.                          © O. Bonaventure 2008
How to find files faster ?

        Performance             of file lookup
              O(n)
                  worst case is to follow linked list of n nodes




CNP3/2008.2.                                                        © O. Bonaventure 2008
How to find files faster ?

        Performance                of file lookup
              O(n)
                  worst case is to follow linked list of n nodes

        How           to improve ?
              Allow nodes to know addition pointers to other
               nodes on the Chord ring to speedup lookup
                  m = number of bits in the key/node identifiers
                  Each node maintains routing table of m entries
                  The ith entry in the table at node n contains the identity
                   of the first node, s, that succeeds n by at least 2^i−1 on
                   the identifier circle, i.e., s = successor(n + 2^i−1 )
                      arithmetic modulo 2^m is used
                  A finger table entry includes both the Chord identifier
                   and the IP address (and port number) of relevant node.
CNP3/2008.2.                                                        © O. Bonaventure 2008
Scalable lookup with Chord

                                             N8+1    N13
                                             N8+2    N13
                                             N8+4    N13
           Node 57                Node 8     N8+8    N29
                                             N8+16   N29
     Node 51                                 N8+32   N46
                                   Node 13

        Node 46
                               Node 29
                     Node 37



CNP3/2008.2.                                         © O. Bonaventure 2008
Scalable lookup with Chord

      Example
                                             N8+1    N13
              m=8
                                             N8+2    N13
                                             N8+4    N13
           Node 57                Node 8     N8+8    N29
                                             N8+16   N29
     Node 51                                 N8+32   N46
                                   Node 13

        Node 46
                               Node 29
                     Node 37



CNP3/2008.2.                                         © O. Bonaventure 2008
Scalable lookup with Chord

      Example
                                               N8+1    N13
              m=8
                                               N8+2    N13
                                               N8+4    N13
           Node 57                 Node 8      N8+8    N29
                                               N8+16   N29
     Node 51                                   N8+32   N46
                                    Node 13

        Node 46
                                Node 29
                     Node 37

      How       to find key 53 from node 8 ?
CNP3/2008.2.                                           © O. Bonaventure 2008
Scalable lookup with Chord

      Example
                                               N8+1     N13
              m=8
                                               N8+2     N13
                                               N8+4     N13
           Node 57                 Node 8      N8+8     N29
                                               N8+16    N29
     Node 51                                   N8+32    N46
                                    Node 13
                                                N46+1    N51
        Node 46                                 N46+2    N51
                                Node 29         N46+4    N51
                                                N46+8    N57
                     Node 37
                                                N46+16 N57
                                                N46+32 N8
      How       to find key 53 from node 8 ?
CNP3/2008.2.                                            © O. Bonaventure 2008
Scalable lookup with Chord

      Example
                                               N8+1     N13
              m=8
                                               N8+2     N13
                                               N8+4     N13
           Node 57                 Node 8      N8+8     N29
                                               N8+16    N29
     Node 51                                   N8+32    N46
                                    Node 13
                                                N46+1    N51
        Node 46                                 N46+2    N51
                                Node 29         N46+4    N51
                                                N46+8    N57
                     Node 37
                                                N46+16 N57
                                                N46+32 N8
      How       to find key 53 from node 8 ?
CNP3/2008.2.                                            © O. Bonaventure 2008
Scalable lookup with Chord

      Example
                                               N8+1     N13
              m=8
                                               N8+2     N13
                                               N8+4     N13
           Node 57                 Node 8      N8+8     N29
                                               N8+16    N29
     Node 51                                   N8+32    N46
                                    Node 13
                                                N46+1    N51
        Node 46                                 N46+2    N51
                                Node 29         N46+4    N51
                                                N46+8    N57
                     Node 37
                                                N46+16 N57
                                                N46+32 N8
      How       to find key 53 from node 8 ?
CNP3/2008.2.                                            © O. Bonaventure 2008
Summary

       Client-server            model
       UDP           and TCP services
       Application-level             protocols
              DNS
                  relies on UDP, stateless
              SMTP, POP, FTP
                  rely on TCP, statefull
              HTTP
                  relies on TCP, stateless

       Peer-to-peer             applications

CNP3/2008.2.                                            © O. Bonaventure 2008

Contenu connexe

Tendances

Tendances (20)

Networing basics
Networing basicsNetworing basics
Networing basics
 
Video Streaming over Bluetooth: A Survey
Video Streaming over Bluetooth: A SurveyVideo Streaming over Bluetooth: A Survey
Video Streaming over Bluetooth: A Survey
 
Doc6 mpls vpn-ppt
Doc6 mpls vpn-pptDoc6 mpls vpn-ppt
Doc6 mpls vpn-ppt
 
VPLS Fundamental
VPLS FundamentalVPLS Fundamental
VPLS Fundamental
 
Networks
NetworksNetworks
Networks
 
Quality of Service at the Internet Engineering Task Force
Quality of Service at the Internet Engineering Task ForceQuality of Service at the Internet Engineering Task Force
Quality of Service at the Internet Engineering Task Force
 
Optimal Streaming Protocol for VoD Using Clients' Residual Bandwidth
Optimal Streaming Protocol for VoD Using Clients' Residual BandwidthOptimal Streaming Protocol for VoD Using Clients' Residual Bandwidth
Optimal Streaming Protocol for VoD Using Clients' Residual Bandwidth
 
Ppt multicast routing
Ppt multicast routingPpt multicast routing
Ppt multicast routing
 
MULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKSMULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKS
 
MULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKSMULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKS
 
IP NETWORKS
IP NETWORKSIP NETWORKS
IP NETWORKS
 
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP NetworksMulticasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
Multicasting Of Adaptively-Encoded MPEG4 Over Qos-Cognizant IP Networks
 
Atomf ov
Atomf ovAtomf ov
Atomf ov
 
Chp4
Chp4Chp4
Chp4
 
Transrating_Efficiency
Transrating_EfficiencyTransrating_Efficiency
Transrating_Efficiency
 
Qo s
Qo sQo s
Qo s
 
Chapter3 frame relay
Chapter3   frame relayChapter3   frame relay
Chapter3 frame relay
 
Ip multicast
Ip multicastIp multicast
Ip multicast
 
en_ETSI_302769v010101v
en_ETSI_302769v010101ven_ETSI_302769v010101v
en_ETSI_302769v010101v
 
Cisco Live! Designing Multipoint WAN QoS
Cisco Live! Designing Multipoint WAN QoSCisco Live! Designing Multipoint WAN QoS
Cisco Live! Designing Multipoint WAN QoS
 

En vedette

Comp codes (ascii...).24to25
Comp codes (ascii...).24to25Comp codes (ascii...).24to25
Comp codes (ascii...).24to25myrajendra
 
Packet Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous EnvironmentPacket Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous EnvironmentCommunication Systems & Networks
 
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...Communication Systems & Networks
 
Dns protocol design attacks and security
Dns protocol design attacks and securityDns protocol design attacks and security
Dns protocol design attacks and securityMichael Earls
 
Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCPOlivier Bonaventure
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsOlivier Bonaventure
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsOlivier Bonaventure
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name SystemChinmay Joshi
 
Domain Name System DNS
Domain Name System DNSDomain Name System DNS
Domain Name System DNSAkshay Tiwari
 
ASCII data formats
ASCII data formatsASCII data formats
ASCII data formatsikram niaz
 

En vedette (20)

Ascii codes 3145_app_f
Ascii codes 3145_app_fAscii codes 3145_app_f
Ascii codes 3145_app_f
 
ASCII Code with Webdings and Wingdings - All Characters
ASCII Code with Webdings and Wingdings - All CharactersASCII Code with Webdings and Wingdings - All Characters
ASCII Code with Webdings and Wingdings - All Characters
 
Comp codes (ascii...).24to25
Comp codes (ascii...).24to25Comp codes (ascii...).24to25
Comp codes (ascii...).24to25
 
Packet Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous EnvironmentPacket Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous Environment
 
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
 
Dns protocol design attacks and security
Dns protocol design attacks and securityDns protocol design attacks and security
Dns protocol design attacks and security
 
Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCP
 
12 ethernet-wifi
12 ethernet-wifi12 ethernet-wifi
12 ethernet-wifi
 
Ascii
AsciiAscii
Ascii
 
11 bgp-ethernet
11 bgp-ethernet11 bgp-ethernet
11 bgp-ethernet
 
Multipath TCP & practical usage
Multipath TCP & practical usageMultipath TCP & practical usage
Multipath TCP & practical usage
 
Ascii
AsciiAscii
Ascii
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
Multipath TCP
Multipath TCPMultipath TCP
Multipath TCP
 
Codes
CodesCodes
Codes
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
Introduction to DNS
Introduction to DNSIntroduction to DNS
Introduction to DNS
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name System
 
Domain Name System DNS
Domain Name System DNSDomain Name System DNS
Domain Name System DNS
 
ASCII data formats
ASCII data formatsASCII data formats
ASCII data formats
 

Similaire à 2 applications.key

IRJET- Development of Android Application for Device to Device Communication ...
IRJET- Development of Android Application for Device to Device Communication ...IRJET- Development of Android Application for Device to Device Communication ...
IRJET- Development of Android Application for Device to Device Communication ...IRJET Journal
 
Part 1 network computing
Part 1 network computingPart 1 network computing
Part 1 network computingLinh Nguyen
 
Lecture application layer
Lecture application layerLecture application layer
Lecture application layerHasam Panezai
 
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...Edielson P. Frigieri
 
Optimizing User QoE through Overlay Routing, Bandwidth ...
Optimizing User QoE through Overlay Routing, Bandwidth ...Optimizing User QoE through Overlay Routing, Bandwidth ...
Optimizing User QoE through Overlay Routing, Bandwidth ...Videoguy
 
Client server chat application
Client server chat applicationClient server chat application
Client server chat applicationSamsil Arefin
 
Providing Controlled Quality Assurance in Video Streaming ...
Providing Controlled Quality Assurance in Video Streaming ...Providing Controlled Quality Assurance in Video Streaming ...
Providing Controlled Quality Assurance in Video Streaming ...Videoguy
 

Similaire à 2 applications.key (20)

Np unit1
Np unit1Np unit1
Np unit1
 
Chapter2[one.]
Chapter2[one.]Chapter2[one.]
Chapter2[one.]
 
App layer
App layerApp layer
App layer
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
IRJET- Development of Android Application for Device to Device Communication ...
IRJET- Development of Android Application for Device to Device Communication ...IRJET- Development of Android Application for Device to Device Communication ...
IRJET- Development of Android Application for Device to Device Communication ...
 
10
1010
10
 
Session 6
Session 6Session 6
Session 6
 
Part 1 network computing
Part 1 network computingPart 1 network computing
Part 1 network computing
 
3rd edition chapter2
3rd edition chapter23rd edition chapter2
3rd edition chapter2
 
Chapter2 Application
Chapter2 ApplicationChapter2 Application
Chapter2 Application
 
Lecture application layer
Lecture application layerLecture application layer
Lecture application layer
 
Week3 applications
Week3 applicationsWeek3 applications
Week3 applications
 
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
 
Optimizing User QoE through Overlay Routing, Bandwidth ...
Optimizing User QoE through Overlay Routing, Bandwidth ...Optimizing User QoE through Overlay Routing, Bandwidth ...
Optimizing User QoE through Overlay Routing, Bandwidth ...
 
Cliser
CliserCliser
Cliser
 
Client server chat application
Client server chat applicationClient server chat application
Client server chat application
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter2 application
Chapter2 applicationChapter2 application
Chapter2 application
 
Providing Controlled Quality Assurance in Video Streaming ...
Providing Controlled Quality Assurance in Video Streaming ...Providing Controlled Quality Assurance in Video Streaming ...
Providing Controlled Quality Assurance in Video Streaming ...
 
Bt0076, tcpip
Bt0076, tcpipBt0076, tcpip
Bt0076, tcpip
 

Plus de Olivier Bonaventure

A personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchOlivier Bonaventure
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPOlivier Bonaventure
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPOlivier Bonaventure
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Olivier Bonaventure
 

Plus de Olivier Bonaventure (20)

Part3-reliable.pptx
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptx
 
Part10-router.pptx
Part10-router.pptxPart10-router.pptx
Part10-router.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part9-congestion.pptx
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part11-lan.pptx
Part11-lan.pptxPart11-lan.pptx
Part11-lan.pptx
 
Part5-tcp-improvements.pptx
Part5-tcp-improvements.pptxPart5-tcp-improvements.pptx
Part5-tcp-improvements.pptx
 
Part8-ibgp.pptx
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part7-routing.pptx
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptx
 
Part6-network-routing.pptx
Part6-network-routing.pptxPart6-network-routing.pptx
Part6-network-routing.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part3-reliable.pptx
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptx
 
A personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking research
 
Part 12 : Local Area Networks
Part 12 : Local Area Networks Part 12 : Local Area Networks
Part 12 : Local Area Networks
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGP
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6
 

2 applications.key

  • 1. Computer Networking : Principles, Protocols and Practice Part 2 : Applications Olivier Bonaventure http://inl.info.ucl.ac.be/ CNP3/2008.2. © O. Bonaventure 2008
  • 2. The Application Layer  Contents  The client-server model  Name to address resolution  email  world wide web  peer-to-peer applications CNP3/2008.2. © O. Bonaventure 2008
  • 3. The client server model Client Server Service provider (“the network”) CNP3/2008.2. © O. Bonaventure 2008
  • 4. The client server model Client Server Service provider (“the network”)  Client  interacts with server through transport layer  sends queries or commands CNP3/2008.2. © O. Bonaventure 2008
  • 5. The client server model Queries Client Server Service provider (“the network”)  Client  interacts with server through transport layer  sends queries or commands CNP3/2008.2. © O. Bonaventure 2008
  • 6. The client server model Queries Client Server Responses Service provider (“the network”)  Client  interacts with server through transport layer  sends queries or commands  Server  Answers the queries received from clients  Executes the commands from clients  Many clients can use the same server  Example : email, www, ... CNP3/2008.2. © O. Bonaventure 2008
  • 7. The client server model (2) Client Server Responses Service provider (“the network”)  Client and servers interact with service provider  Both the client and the server must speak the same language  Application-level protocol : set of syntactical and semantical rules that define the messages exchanged between the client and the server and their ordering CNP3/2008.2. © O. Bonaventure 2008
  • 8. The client server model (2) Queries Client Server Responses Service provider (“the network”)  Client and servers interact with service provider  Both the client and the server must speak the same language  Application-level protocol : set of syntactical and semantical rules that define the messages exchanged between the client and the server and their ordering CNP3/2008.2. © O. Bonaventure 2008
  • 9. Transport service on the Internet  On the Internet, applications can use two different transport services  The service provided by the User Datagram Protocol (UDP)  unreliable connectionless service with error detection  The service provided by the Transmission Control Protocol (TCP)  reliable bytestream connection-oriented service CNP3/2008.2. © O. Bonaventure 2008
  • 10. UDP service Applic. Applic. 1 2 UDP service Identification: IP address : 2001:6a8:3080:2:217:f2ff:fed6:65c0 Identification Protocol : UDP IP address : 2001:4860:a005::68 Port : 1234 Protocol : UDP Port : 53  Identification of an application  IP address + UDP + port number  Characteristics of UDP service  connectionless  unreliable  messages can be lost  transmission errors can be detected but not recovered  sequence is not preserved  Maximum size of messages : almost 64 Kbytes CNP3/2008.2. © O. Bonaventure 2008
  • 11. TCP service Applic. Applic. 1 2 Identification: IP address : 138.48.32.107 TCP service Protocol : TCP Port : 9876 Identification  Identification of an application IP address: 139.165.16.12  IP address + UDP + port number Protocol : TCP Port : 80  Characteristics of TCP service  connection-oriented  bidirectional  reliable  byte stream  connection release  abrupt if initiated by service provider  graceful or abrupt if initiated by user CNP3/2008.2. © O. Bonaventure 2008
  • 12. Internet applications  Contents  The client-server model  Name to address resolution  email  world wide web  peer-to-peer applications CNP3/2008.2. © O. Bonaventure 2008
  • 13. Names and addresses CNP3/2008.2. © O. Bonaventure 2008
  • 14. Names and addresses  Address of a server  IP Address of the host on which the server is running port number (TCP or UDP)  usually well known port number CNP3/2008.2. © O. Bonaventure 2008
  • 15. Names and addresses  Address of a server  IP Address of the host on which the server is running port number (TCP or UDP)  usually well known port number  Drawback  Difficult to remember an IP address for a human CNP3/2008.2. © O. Bonaventure 2008
  • 16. Names and addresses  Address of a server  IP Address of the host on which the server is running port number (TCP or UDP)  usually well known port number  Drawback  Difficult to remember an IP address for a human  Idea  Replace IP address by a hostname  Easier for humans  but IP address is necessary to contact server  How to translate a hostname in an IP address ? CNP3/2008.2. © O. Bonaventure 2008
  • 17. Names and addresses (2)  hosts.txt file  contains the name-address table  must be updated regularly # # Internet host table # 127.0.0.1 localhost 138.48.32.99 babbage 138.48.32.100 leibniz 138.48.32.1 routeur 138.48.32.92 corneille 138.48.32.107 backus 138.48.20.152 arzach 138.48.32.137 almin01 138.48.32.170 duke  cannot be used in a large network CNP3/2008.2. © O. Bonaventure 2008
  • 18. Hostnames  Requirement  Host names should be unique  How to achieve this in a scalable manner ?  Introduce hierarchy  Each hostname is composed of two parts  domain name (globally unique)  hostname (unique within a given domain)  How to uniquely distribute domain names ?  Introduce hierarchy  A small number of top-level domain names  Inside each top-level domain, allocate uniquely second level domain names  Inside each seconde-level domain, allocate uniquely either third-level domain names or host names,  ... CNP3/2008.2. © O. Bonaventure 2008
  • 19. Host names and domain names  Tree of all host names edu com net gov mil be fr de Sun apple fbi whitehouse ac rtbf cec inria java eng mail www fundp ulg ucl www info lihd scf Pollux backus leibniz Angora siamois spirou CNP3/2008.2. © O. Bonaventure 2008
  • 20. How to translate names into addresses ?  How to efficiently translate a host name ?  By using a centralised database  there are more than 1 billion host names today  By using a distributed database  DNS : Domain Name System  relies on the hierarchy of domain names  there is one server responsible for each domain and this server must be queried to translate host names inside this domain edu com net gov mil be fr de sun apple fbi whitehouse ac rtbf cec inria java mail www fundp ulg ucl www info lihd scf CNP3/2008.2. © O. Bonaventure 2008
  • 21. How to translate names into addresses ?  Domain Name Service (DNS)  Each DNS server is responsible for a domain and knows  The IP addresses of all host names in this domain  The IP addresses of the DNS servers responsible for subdomains  Examples edu com net gov mil be fr de sun apple fbi whitehouse ac rtbf cec inria java mail www fundp ulg ucl www info math fsa  java.sun.com  www.ucl.ac.be CNP3/2008.2. © O. Bonaventure 2008
  • 22. DNS resolver  To be able to translate name to addresses, a DNS implementation needs  to know actual list of IP addresses of root servers  to implement the DNS protocol and traverse the domain names hierarchy  Difficult to do this on all endhosts  Solution  DNS resolver  one resolver for a set of endhosts  maintains up-to-date list of IP addresses of root servers  implements DNS protocol  endhosts  only need to be able to send DNS requests to resolver  must know IP address of closest DNS resolvers CNP3/2008.2. © O. Bonaventure 2008
  • 23. DNS : optimisations  Reduce risk of failures  several root-servers  server DNS servers authoritative for each domain  each endhost can send queries to multiple resolvers  Improved performance  avoid sending several times the same query  cache memory on DNS resolvers containing  recent name-addresses translations  addresses of DNS servers recently contacted  DNS protocol  usually runs over UDP  sometimes is also used over TCP CNP3/2008.2. © O. Bonaventure 2008
  • 24. DNS : message format Each DNS request contains a number that will be returned in the response by the server to allow the client to match the request. 32 bits Question/Response Recursive question or not Identification Flags Authoritative answer or not 12 bytes Number of questions Number of answers Possible error Number of authority Number of additional Questions (variable number of resource records) Answers (variable number of resource records) Authority (variable number of resource records) Additional information (variable number of resource records) CNP3/2008.2. © O. Bonaventure 2008
  • 25. DNS : resource records  Each DNS messages is composed of resource records (RR) encoded as TLV  < Name, Value, Type, TTL>  Types de RR Lifetime of the RR in serverʼs cache  A (Address)  Name is a hostname and Value an IPv4 address  AAAA (Address)  Name is a hostname and Value an IPv6 address  NS (NameServer)  Name is a domain name and Value is the hostname of the DNS server responsible for this domain  MX (Mail Exchange)  Name is a domain name and Value is the name of the SMTP server that must be contacted to send emails to this domain  Type CNAME  Alias CNP3/2008.2. © O. Bonaventure 2008
  • 26. Internet applications  Contents  The client-server model  Name to address resolution  email  world wide web  peer-to-peer applications CNP3/2008.2. © O. Bonaventure 2008
  • 27. Email  Simplified model  Alice sends an email to Bob Aliceʼs b.net ʻs email server email server Alice@a.net Bob@b.net CNP3/2008.2. © O. Bonaventure 2008
  • 28. Email  Simplified model  Alice sends an email to Bob Aliceʼs b.net ʻs email server email server Alice@a.net Bob@b.net Alice sends her email to local mail forwarder CNP3/2008.2. © O. Bonaventure 2008
  • 29. Email  Simplified model  Alice sends an email to Bob Aliceʼs b.net ʻs email server email server Alice@a.net Bob@b.net Alice sends her email to local mail forwarder Aliceʼs server sends email to b.netʼs MX CNP3/2008.2. © O. Bonaventure 2008
  • 30. Email  Simplified model  Alice sends an email to Bob Aliceʼs b.net ʻs email server email server Alice@a.net Bob@b.net Alice sends her email Bob retrieves message to local mail forwarder from his server Aliceʼs server sends email to b.netʼs MX CNP3/2008.2. © O. Bonaventure 2008
  • 31. Email message format From: president@abc.be To: ceo@def.com Subject: Hello Header Date : 27 Sept. 1999 0901 Exp: ABC S.A. Dear Sir, Rue de Fer 10 5000 Namur Bla Bla Bla... Message DEF Corp. body Steel street 9 WA78 AX London Grande Bretagne CNP3/2008.2. © O. Bonaventure 2008
  • 32. Message format (2)  Header format  Contains only US-ASCII (7bits) characters  At least three lines that end with <CRLF>  From: sender@domain  To:recipient@domain  Date: <creation date of message>  example : 26 Aug 199 1445 EDT  Optional fields  Subject: subject of message  cc: copy@domain  Message-ID: <number@domain>  Received: information on path followed by message  In-Reply-To: <message-ID>  Header ends with empty line (<CRLF>) CNP3/2008.2. © O. Bonaventure 2008
  • 33. MIME CNP3/2008.2. © O. Bonaventure 2008
  • 34. MIME  Internet email was designed for US-ASCII  How to transmit more complex messages ? CNP3/2008.2. © O. Bonaventure 2008
  • 35. MIME  Internet email was designed for US-ASCII  How to transmit more complex messages ?  Multipurpose Internet Mail Extensions  Improved email message format  Constraints  must remain compatible with old email servers  most of them only support US-ASCII and short lines  must support non-English text  character set must be beyond 7bits US-ASCII  must support various formats in a single message  message body, attachments, ...  must allow to transmit audio, video, ...  need to identify the type of content CNP3/2008.2. © O. Bonaventure 2008
  • 36. MIME  Internet email was designed for US-ASCII  How to transmit more complex messages ?  Multipurpose Internet Mail Extensions  Improved email message format  Constraints  must remain compatible with old email servers  most of them only support US-ASCII and short lines  must support non-English text  character set must be beyond 7bits US-ASCII  must support various formats in a single message  message body, attachments, ...  must allow to transmit audio, video, ...  need to identify the type of content  Solution  add new optional fields in header  add optional fields inside message body when CNP3/2008.2. © O. Bonaventure 2008
  • 37. MIME (2)  New header fields  MIME-Version:  version of MIME used to encode message  current version : 1.0  Content-Description:  comment describing the content of the message  Content-Type:  type of information inside message  Content-Transfer-Encoding:  how the message has been encoded  Content-Id:  unique identifier for the content CNP3/2008.2. © O. Bonaventure 2008
  • 38. MIME: Content-Type  Content-Type : type/encoding  type of content  text, image, video, application  multipart  encoding of content  text/plain , text/html  image/gif, image/jpeg  audio/basic  video/mpeg, video/quicktime  application/octet-stream, application/postscript  multipart/alternative  message contains several times the same information with different encodings  multipart/mixed  message contains several information of different types  example : text of message body and attachment CNP3/2008.2. © O. Bonaventure 2008
  • 39. Character sets and content encoding  How to support rich character sets ?  Content-Type: text/plain; charset=us-ascii  ASCII 7bits, default  Content-Type: text/plain; charset=iso-8859-1  Character set suitable for Western European languages, defined by ISO, 8 bits per character  Content-Type: text/plain; charset=unicode  Universal character set, defined by ISO, 16 bits per character  How to encode non-text data ?  data must be encoded in US-ASCII 7 bits characters  Base64  uses ASCII characteres A...Z,a...z,0...9, "+" et "/"  A=0, B=1, C=2, ... +=62 et /=63  Each character is used to encode 6 bits  24 bits from initial message -> 4 ASCII characters  Special character “=” used for padding CNP3/2008.2. © O. Bonaventure 2008
  • 40. Multipart/mixed  How to place different contents and encoding in a single message ?  We need a delimiter between the different content types placed inside message body Date: Mon, 20 Sep 1999 16:33:16 +0200 From: Nathaniel Borenstein <nsb@bellcore.com> To: Ned Freed <ned@innosoft.com> Subject: Test MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="simple boundary" preamble, to be ignored --simple boundary Content-Type: text/plain; charset=us-ascii partie 1 --simple boundary Content-Type: text/plain; charset=us-ascii partie 2 --simple boundary CNP3/2008.2. © O. Bonaventure 2008
  • 41. Email transmission  SMTP : Simple Mail Transfer protocol  uses TCP service  Address of SMTP server  IP address of server + TCP + port number: 25  RR of type MX can be used to find the SMTP server responsible for a given domain SMTP Email SMTP retrieval a.netʼs b.netʼs SMTP SMTP server server Alice@a.net Bob@b.net CNP3/2008.2. © O. Bonaventure 2008
  • 42. SMTP  Client-server model  Server waits for email messages to relay/deliver  Client sends email messages through server  Application-level protocol  client opens TCP connection  Client sends commands composed of  command parameter <CRLF>  HELO  MAIL FROM:  RCPT TO:  DATA  QUIT  Server answers with one-line replies  numeric_code comment (text) <CRLF>  250 OK  221 closing CNP3/2008.2. © O. Bonaventure 2008
  • 43. SMTP (2)  Three phases of SMTP 1. Establishment of an SMTP association  TCP connection established upon request from client  Server greetings  HELO command from client 2. Message transfer  MAIL FROM: <user@domaine>  RCPT TO: <user@domaine>  DATA  transmission of entire message including headers  one line containing only the dot “.” characters marks end of message  Other subsequent messages can be transmitted after 3. Release of the SMTP association  QUIT  Closing message from server  TCP connection is closed CNP3/2008.2. © O. Bonaventure 2008
  • 44. Retrieval of email messages  In the old days 1. Destination is always connected to the Internet  email addresses are username@hostname  When an email arrives, it is stored in a file that belongs to the user, e.g. /var/mail on Unix  Today  Most networks have one or a few SMTP servers used to receive emails, but also detect spam, viruses, ...  Endusers retrieve their emails from this server  Post Office Protocol (POP)  Internet Mail Access Protocol (IMAP)  Webmail CNP3/2008.2. © O. Bonaventure 2008
  • 45. POP  Goal  Allow authenticated users to retrieve email messages from server  Operation  POP uses TCP service  Address of POP server  Host address + TCP + port number : 110  Client send commands  command : one ASCII line ending with <CRLF>  USER, PASS, STAT, RETR, DELE, QUIT  server replies with  +OK if command was successful  email messages follow some +OK replies  -ERR in case of errors CNP3/2008.2. © O. Bonaventure 2008
  • 46. POP (2)  Three phases of the protocol 1. Authorisation : checking the user credentials  USER <username>  PASS <password> 2. Transaction  retrieval and removal of messages  STAT  list headers of stored messages  RETR <n>  retrieval of the nth message  DELE <n>  the nth message is marked for deletion 3. Update  End of the retrieval phase  Messages marked for deletion are removed from server  TCP connection is closed CNP3/2008.2. © O. Bonaventure 2008
  • 47. Internet applications  Contents  The client-server model  Name to address resolution  email  world wide web  peer-to-peer applications CNP3/2008.2. © O. Bonaventure 2008
  • 48. FTP : File Transfer Protocol  Protocol from the old days  allows a client to send/retrieve files from a server  Problems solved by FTP  User authentication  username, password  Filesystem traversal  browse directories on server and locate files  file transfer  to or from the server CNP3/2008.2. © O. Bonaventure 2008
  • 49. FTP : File Transfer Protocol  Protocol from the old days  allows a client to send/retrieve files from a server  Problems solved by FTP  User authentication  username, password  Filesystem traversal  browse directories on server and locate files  file transfer  to or from the server Server Client Commands Ftp-control : port21 Responses Ftp-data : port 20 CNP3/2008.2. © O. Bonaventure 2008
  • 50. FTP : main commands  Main commands  USER <user>  username, ftp for anonymous access  PASS <pass>  allows user to send password associated to username  SYST  information about type of server  CWD <path>  directory traversal  STOR <file>  save file in the current directory on server  RETR <file>  retrieve file from current directory on server  PORT <B1,B2,B3,B4,B5,B6>  use TCP connection on port B5*256+B6 on B1.B2.B3.B4 CNP3/2008.2. © O. Bonaventure 2008
  • 51. World Wide Web  Goals  Allow browsers to browse hypertext documents stored on multiple servers Server www.machin.be Server www.truc.fr Query Information Client (browser) Server www.stuff.com CNP3/2008.2. © O. Bonaventure 2008
  • 52. World Wide Web (2)  The five key elements of www 1. An addressing scheme that allows to identify any document stored on a server  URL : Uniform Resource Locator 2. An hypertext language that allows to easily write documents with hypertext links  HTML : HyperText Markup Language 3. An efficient and lightweight application-level protocol to exchange documents  HTTP : HyperText Transfer Protocol 4. Servers 5. Clients (browsers) CNP3/2008.2. © O. Bonaventure 2008
  • 53. Uniform Resource Locator (URL)  Uniform Resource Locator (URL)  generic syntax : <protocol>://<document>  protocol used to retrieve document from server  http is the most common one but others are frequently used  document indicates the server and the location of the document  <user>:<password>@<server>:<port>/<path>  <user> : optional username  <password> : optional password  <machine> : hostname or IP address of the server that hosts the document  <port> : optional port number  <path> : document location on server  examples  http://www.info.ucl.ac.be  http://alice:secret@inl.info.ucl.ac.be:80/index.html CNP3/2008.2. © O. Bonaventure 2008
  • 54. HTML  HyperText Markup Langage  Language used to encode documents on the web  Keywords  <HTML>...</HTML>  <HEAD>...</HEAD>  <BODY>...</BODY>  <TITLE>..</TITLE>  <B>...</B>  <I>...</I>  <H1>...</H1>  <P>  <HR>  <UL>...</UL>  <OL>...</OL>  <IMG SRC="URL">  <A HREF="URL">text anchor</A> CNP3/2008.2. © O. Bonaventure 2008
  • 55. HTML (2)  Example <HTML> <HEAD> Header <TITLE>HTML test page</TITLE> </HEAD> Image on remote server <BODY> <IMG SRC="http://www.images.be/logo.gif"> <H1>Web servers from UCL UCL<P></H1> <HR> First level title <UL> <LI><A HREF="http://www.uclouvain.be">UCL</A> Body <LI><A HREF="http://www.info.ucl.ac.be">CSE Dept.</A> <LI><A HREF="http://www.math.ucl.ac.be">Math</A> </UL> </BODY> </HTML> External hypertext link CNP3/2008.2. © O. Bonaventure 2008
  • 56. Information transfer www  HTTP 1.0 - non-persistent connection  Principle  relies on TPC service (default port : 80)  Client sends request, server sends reply Client Server CNP3/2008.2. © O. Bonaventure 2008
  • 57. Information transfer www  HTTP 1.0 - non-persistent connection  Principle  relies on TPC service (default port : 80)  Client sends request, server sends reply Client Server CONNECT.request CONNECT.indication CONNECT.response CONNECT.confirm CNP3/2008.2. © O. Bonaventure 2008
  • 58. Information transfer www  HTTP 1.0 - non-persistent connection  Principle  relies on TPC service (default port : 80)  Client sends request, server sends reply Client Server CONNECT.request CONNECT.indication CONNECT.response CONNECT.confirm DATA.request(Request) DATA.ind(Request) DATA.req(Response) DATA.ind(Response) CNP3/2008.2. © O. Bonaventure 2008
  • 59. Information transfer www  HTTP 1.0 - non-persistent connection  Principle  relies on TPC service (default port : 80)  Client sends request, server sends reply Client Server CONNECT.request CONNECT.indication CONNECT.response CONNECT.confirm DATA.request(Request) DATA.ind(Request) DATA.req(Response) DATA.ind(Response) DISCONNECT.req DISCONNECT.ind DISCONNECT.ind DISCONNECT.req CNP3/2008.2. © O. Bonaventure 2008
  • 60. HTTP Server Client CNP3/2008.2. © O. Bonaventure 2008
  • 61. HTTP Method Header contains additional information GET POST about request sent by client ... Request Method Header CRLF MIME Document Server Client CNP3/2008.2. © O. Bonaventure 2008
  • 62. HTTP Method Header contains additional information GET POST about request sent by client ... Request Method Header CRLF MIME Document Server Client Response Status line Header CRLF MIME Document Success or failure Header contains information about server and optional parameters specific to response CNP3/2008.2. © O. Bonaventure 2008
  • 63. HTTP Method Header contains additional information GET POST about request sent by client ... Request Method Header CRLF MIME Document Server Client Response Status line Header CRLF MIME Document Success or failure Header contains information about server and optional parameters specific to response HTTP is a stateless protocol, server does not maintain any state from one request to another POP, FTP, SMTP are examples of stateful protocols in contrast CNP3/2008.2. © O. Bonaventure 2008
  • 64. HTTP : Example Server www.info.ucl.ac.be Client CNP3/2008.2. © O. Bonaventure 2008
  • 65. HTTP : Example Request Server GET /index.html HTTP/1.1 Host: www.info.fundp.ac.be www.info.ucl.ac.be CRLF Client CNP3/2008.2. © O. Bonaventure 2008
  • 66. HTTP : Example Request Server GET /index.html HTTP/1.1 Host: www.info.fundp.ac.be www.info.ucl.ac.be CRLF Client Response HTTP/1.1 200 OK Date: Fri, 10 Sep 1999 14:29:19 GMT Server: Apache/1.3.0 (Unix) ApacheJServ/1.0b5 Last-Modified: Thu, 02 Sep 1999 11:50:50 GMT Content-Length: 1224 Content-Type: text/html CRLF <HTML> . . . </HTML> CNP3/2008.2. © O. Bonaventure 2008
  • 67. HTTP : Methods  Methods  GET  method used to request a "document" stored on server  GET <document> HTTP/1.0  example  GET /index.html HTTP/1.0  POST  method used to send a "document" to a server  document is part of the request and encoded as a MIME document CNP3/2008.2. © O. Bonaventure 2008
  • 68. HTTP : Request headers  Request headers  Allow to add information about the client or the request  Host: <name>  Name of the server where the document is stored  Authorization  allows to perform access control  If-Modified-Since: <date>  server will only send the requested document if the document is more recent than date  Referer: <url>  Information, indicates the URL visited by the client before this request  User-Agent: <agent>  information, indicates the browser used on the client CNP3/2008.2. © O. Bonaventure 2008
  • 69. HTTP : Status line  Status liine  Format : Version_HTTP Code Comment  Success/Failure  1xx : For information (unused)  2xx : Success  Example : HTTP/1.0 200 OK  3xx : Redirection  Request could not be handled on local server and should be sent to another server  Example :  HTTP/1.0 301 Moved permanently  attached MIME document will contain URL of document  4xx : Client-side error  examples  syntax error, unreachable URL, unauthorised, ...  5xx : Server-side error  examples :  internal error, method not implemented on server, ... CNP3/2008.2. © O. Bonaventure 2008
  • 70. HTTP : Response headers  Header  Optional information about the server, the response or the document attached to the response  Date  date of the document attached to response  example : Date: Wed, 05 Sep 2001 13:27:34 GMT  Server  Name and version of http server used  example : Server: Apache/1.3.20 (Unix)ApacheJServ/1.1.2 PHP/4.0.6  Content-*  MIME header of the attached document  example : Content-Length: 5891 Content-Type: text/html CNP3/2008.2. © O. Bonaventure 2008
  • 71. HTTP 1.1 CNP3/2008.2. © O. Bonaventure 2008
  • 72. HTTP 1.1  HTTP 1.0  a single TCP connection used to transmit a single document (html file, image,...)  the establishment and release of the TCP connection induce a significant overhead, in particular for small pages CNP3/2008.2. © O. Bonaventure 2008
  • 73. HTTP 1.1  HTTP 1.0  a single TCP connection used to transmit a single document (html file, image,...)  the establishment and release of the TCP connection induce a significant overhead, in particular for small pages  HTTP 1.1  uses a single persistent TCP connection  This TPC connection can be used for several requests and the corresponding responses  the cost of establishing and releasing the TCP connection is amortised over multiple requests  Although HTTP 1.1 uses a single TCP connection for multiple requests, HTTP 1.1 remains stateless CNP3/2008.2. © O. Bonaventure 2008
  • 74. HTTP 1.1 : Persistent connection Server Client CNP3/2008.2. © O. Bonaventure 2008
  • 75. HTTP 1.1 : Persistent connection Server Client CONNECT.request CONNECT.indication CONNECT.confirm CONNECT.response CNP3/2008.2. © O. Bonaventure 2008
  • 76. HTTP 1.1 : Persistent connection Server Client CONNECT.request CONNECT.indication CONNECT.confirm CONNECT.response GET / HTTP1.1 Connection: Keep-Alive ... CNP3/2008.2. © O. Bonaventure 2008
  • 77. HTTP 1.1 : Persistent connection Server Client CONNECT.request CONNECT.indication CONNECT.confirm CONNECT.response GET / HTTP1.1 Connection: Keep-Alive ... HTTP/1.1 200 OK Keep-Alive: timeout=15, max=100 Connection: Keep-Alive ... CNP3/2008.2. © O. Bonaventure 2008
  • 78. HTTP 1.1 : Persistent connection Server Client CONNECT.request CONNECT.indication CONNECT.confirm CONNECT.response GET / HTTP1.1 Connection: Keep-Alive ... HTTP/1.1 200 OK Keep-Alive: timeout=15, max=100 Connection: Keep-Alive GET /images/logo.gif HTTP1.1 ... Connection: Keep-Alive ... CNP3/2008.2. © O. Bonaventure 2008
  • 79. HTTP 1.1 : Persistent connection Server Client CONNECT.request CONNECT.indication CONNECT.confirm CONNECT.response GET / HTTP1.1 Connection: Keep-Alive ... HTTP/1.1 200 OK Keep-Alive: timeout=15, max=100 Connection: Keep-Alive GET /images/logo.gif HTTP1.1 ... Connection: Keep-Alive ... HTTP/1.1 200 OK Keep-Alive: timeout=15, max=99 Connection: Keep-Alive ... CNP3/2008.2. © O. Bonaventure 2008
  • 80. HTTP 1.1 : Persistent connection Server Client CONNECT.request CONNECT.indication CONNECT.confirm CONNECT.response GET / HTTP1.1 Connection: Keep-Alive ... HTTP/1.1 200 OK Keep-Alive: timeout=15, max=100 Connection: Keep-Alive GET /images/logo.gif HTTP1.1 ... Connection: Keep-Alive ... HTTP/1.1 200 OK Keep-Alive: timeout=15, max=99 Connection: Keep-Alive ... DISCONNECT.req DISCONNECT.ind DISCONNECT.ind DISCONNECT.req CNP3/2008.2. © O. Bonaventure 2008
  • 81. Improving performance  Observation  Many pages are requested multiple times or from close endhosts  Solution  local cache on each client  if-modified-since header helps  one cache for multiple endhosts CNP3/2008.2. © O. Bonaventure 2008
  • 82. Improving performance  Observation  Many pages are requested multiple times or from close endhosts  Solution  local cache on each client  if-modified-since header helps  one cache for multiple endhosts ServerA Client1 ServeurB ClientN Proxy CNP3/2008.2. © O. Bonaventure 2008
  • 83. HTTP Authentication  Example Client Server CNP3/2008.2. © O. Bonaventure 2008
  • 84. HTTP Authentication  Example Client Server GET / HTTP1.1 ... HTTP/1.0 401 Authorization req WWW authenticate: machin ... Browser asks user/password to user CNP3/2008.2. © O. Bonaventure 2008
  • 85. HTTP Authentication  Example Client Server GET / HTTP1.1 ... HTTP/1.0 401 Authorization req WWW authenticate: machin ... Browser asks user/password to user GET / HTTP1.1 Authorization: User-password ... HTTP/1.1 200 OK ... GET /images/t.gif HTTP1.1 Authorization: User-password ... Browser sends user/password in each request CNP3/2008.2. © O. Bonaventure 2008
  • 86. HTTP Cookies  Example Client Server Normal response CNP3/2008.2. © O. Bonaventure 2008
  • 87. HTTP Cookies  Example Client Server GET / HTTP1.1 ... HTTP/1.0 200 OK Set-Cookie: machin ... Browser saves cookie Normal response CNP3/2008.2. © O. Bonaventure 2008
  • 88. HTTP Cookies  Example Client Server GET / HTTP1.1 ... HTTP/1.0 200 OK Set-Cookie: machin ... Browser saves cookie Normal response GET /doc HTTP1.1 Cookie: machin ... HTTP/1.1 200 OK ... Response is function GET /images/t.gif HTTP1.1 Cookie: machi of URL and cookie ... Browser sends cookie in all requests sent to server CNP3/2008.2. © O. Bonaventure 2008
  • 89. Internet applications  Contents  The client-server model  Name to address resolution  email  world wide web  peer-to-peer applications CNP3/2008.2. © O. Bonaventure 2008
  • 90. Predicted IP traffic growth Predicted IP traffic growth 30000000 22500000 TB/month 15000000 7500000 0 2005 2006 2007 2008 2009 2010 2011 Internet Non-Internet IP Total CNP3/2008.2. © O. Bonaventure 2008
  • 91. Predicted IP traffic growth Predicted IP traffic growth 20000000 15000000 TB/month 10000000 5000000 0 2005 2006 2007 2008 2009 2010 2011 Consumer Business Mobile CNP3/2008.2. © O. Bonaventure 2008
  • 92. Predicted IP traffic growth (3) Consummer IP traffic growth 8000000 6000000 TB/month 4000000 2000000 0 2005 2006 2007 2008 2009 2010 2011 Web/Mail/FTP P2P Gaming VideoComm VoIP VideotoPC VideotoTV CNP3/2008.2. © O. Bonaventure 2008
  • 93. Peer-to-peer file sharing  Evolution of file sharing on the Internet  Servers using ftp protocol  A single server that serves all files on disk  A set of mirror serves serving the same content  The innovation introduced by Napster  How to distribute many files from many nodes ?  Keep the files on their source nodes  Central Napster server stores description and URL of each shared file  Users willing to obtain a file consult central server to obtain file URL and then download file from their respective source nodes  server remains simple and can index large number of files  server does not directly participate in file transfer CNP3/2008.2. © O. Bonaventure 2008
  • 94. Peer-to-peer file sharing (2)  Limitations of the Napster approach  a single server indexes all files  if a source node fails, then the ongoing file transfers must be restarted  completely or partially depending on the file transfer protocol begin used for the transfer  performance of file transfer is function of performance of the corresponding source node  if source node is connected via ADSL, performance will be severely limited  How to improve ?  Divide the file in blocks  Each block can be served by multiple nodes  provides redundancy  Download from several nodes at the same time  one TCP connection may be slow and others faster CNP3/2008.2. © O. Bonaventure 2008
  • 95. Distributed Hash Table based P2P  How to scale file sharing to a very large number n of nodes ?  Principle of the solution  Use a hash function such as SHA-1  Each node has one identifier, id=hash(IPaddress) and a pointer to its successor on the Chord ring Node 1 Node 15 Node 5 Node 12 CNP3/2008.2. Node 7 © O. Bonaventure 2008
  • 96. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 97. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 98. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 99. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 100. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 101. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 102. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(BARFOO)=5 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 103. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(BARFOO)=5 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 104. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(BARFOO)=5 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 105. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(BARFOO)=5 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 106. How to store files ?  Principle  File FOOBAR is stored on the node whose id is the successor of hash(“FOOBAR”) on the ring  A node on the ring uses its successors to find the responsible node for a given file  Examples Node 1 Node 15 Hash(BARFOO)=5 Hash(FOOBAR)=13 Node 5 Node 12 Node 7 CNP3/2008.2. © O. Bonaventure 2008
  • 107. How to find files faster ? CNP3/2008.2. © O. Bonaventure 2008
  • 108. How to find files faster ?  Performance of file lookup  O(n)  worst case is to follow linked list of n nodes CNP3/2008.2. © O. Bonaventure 2008
  • 109. How to find files faster ?  Performance of file lookup  O(n)  worst case is to follow linked list of n nodes  How to improve ?  Allow nodes to know addition pointers to other nodes on the Chord ring to speedup lookup  m = number of bits in the key/node identifiers  Each node maintains routing table of m entries  The ith entry in the table at node n contains the identity of the first node, s, that succeeds n by at least 2^i−1 on the identifier circle, i.e., s = successor(n + 2^i−1 )  arithmetic modulo 2^m is used  A finger table entry includes both the Chord identifier and the IP address (and port number) of relevant node. CNP3/2008.2. © O. Bonaventure 2008
  • 110. Scalable lookup with Chord N8+1 N13 N8+2 N13 N8+4 N13 Node 57 Node 8 N8+8 N29 N8+16 N29 Node 51 N8+32 N46 Node 13 Node 46 Node 29 Node 37 CNP3/2008.2. © O. Bonaventure 2008
  • 111. Scalable lookup with Chord  Example N8+1 N13  m=8 N8+2 N13 N8+4 N13 Node 57 Node 8 N8+8 N29 N8+16 N29 Node 51 N8+32 N46 Node 13 Node 46 Node 29 Node 37 CNP3/2008.2. © O. Bonaventure 2008
  • 112. Scalable lookup with Chord  Example N8+1 N13  m=8 N8+2 N13 N8+4 N13 Node 57 Node 8 N8+8 N29 N8+16 N29 Node 51 N8+32 N46 Node 13 Node 46 Node 29 Node 37  How to find key 53 from node 8 ? CNP3/2008.2. © O. Bonaventure 2008
  • 113. Scalable lookup with Chord  Example N8+1 N13  m=8 N8+2 N13 N8+4 N13 Node 57 Node 8 N8+8 N29 N8+16 N29 Node 51 N8+32 N46 Node 13 N46+1 N51 Node 46 N46+2 N51 Node 29 N46+4 N51 N46+8 N57 Node 37 N46+16 N57 N46+32 N8  How to find key 53 from node 8 ? CNP3/2008.2. © O. Bonaventure 2008
  • 114. Scalable lookup with Chord  Example N8+1 N13  m=8 N8+2 N13 N8+4 N13 Node 57 Node 8 N8+8 N29 N8+16 N29 Node 51 N8+32 N46 Node 13 N46+1 N51 Node 46 N46+2 N51 Node 29 N46+4 N51 N46+8 N57 Node 37 N46+16 N57 N46+32 N8  How to find key 53 from node 8 ? CNP3/2008.2. © O. Bonaventure 2008
  • 115. Scalable lookup with Chord  Example N8+1 N13  m=8 N8+2 N13 N8+4 N13 Node 57 Node 8 N8+8 N29 N8+16 N29 Node 51 N8+32 N46 Node 13 N46+1 N51 Node 46 N46+2 N51 Node 29 N46+4 N51 N46+8 N57 Node 37 N46+16 N57 N46+32 N8  How to find key 53 from node 8 ? CNP3/2008.2. © O. Bonaventure 2008
  • 116. Summary  Client-server model  UDP and TCP services  Application-level protocols  DNS  relies on UDP, stateless  SMTP, POP, FTP  rely on TCP, statefull  HTTP  relies on TCP, stateless  Peer-to-peer applications CNP3/2008.2. © O. Bonaventure 2008

Notes de l'éditeur

  1. These slides are licensed under the creative commons attribution share-alike license 3.0. You can obtain detailed information about this license at http://creativecommons.org/licenses/by-sa/3.0/ The slides are part of an effort to develop an open-source networking textbook. See http://inl.info.ucl.ac.be/CNP3 for the current version of the textbook and more information on how to contribute.
  2. UDP is defined in J. Postel, User Datagram Protocol. RFC768, August 1980 It will be described in more details later
  3. TCP is defined in J. Postel, Transmission Control Protocol, RFC793, September 1981 It will be described in more details later
  4. Usually, a server always listens on the same port. A list of all reserved TPC ports may be found in : http://www.iana.org/assignments/port-numbers
  5. Usually, a server always listens on the same port. A list of all reserved TPC ports may be found in : http://www.iana.org/assignments/port-numbers
  6. Usually, a server always listens on the same port. A list of all reserved TPC ports may be found in : http://www.iana.org/assignments/port-numbers
  7. The Domain Name System was proposed in P. Mockapetris and K. Dunlap. Development of the domain name system. In Proc. SIGCOMM&apos;88, August, 1988. available from http://www.acm.org/sigcomm/ccr/archive/1995/jan95/ccr-9501-mockapet.html A more detailed description of the DNS protocols may be found in : P. V. Mockapetris. Domain names - concepts and facilities. Request for Comments 1034, Internet Engineering Task Force, November 1987. M. K. Stahl. Domain administrators guide. Request for Comments 1032, Internet Engineering Task Force, November 1987.
  8. There are many DNS server implementations available, the most widely used one is http://www.isc.org/products/BIND Many documents explain how to configure a DNS server, e.g. http://www.tldp.org/HOWTO/DNS-HOWTO.html
  9. For more information about root servers, see : http: //www.root-servers.org/
  10. The RR MX were proposed in C. Partridge. Mail routing and the domain system. Request for Comments 974, Internet Engineering Task Force, January 1986. A complete list of DNS RR may be found at http://www.its.uq.edu.au/tn-0011
  11. See D. Crocker. Standard for the format of ARPA internet text messages. Request for Comments 822, Internet Engineering Task Force, August 1982.
  12. Sample headers Received: from limbes.fundp.ac.be (limbes.fundp.ac.be [138.48.4.10]) by leibniz.info.fundp.ac.be (8.9.1/8.9.1) with ESMTP id QAA16962 for &lt;Olivier.Bonaventure@info.fundp.ac.be&gt;; Fri, 17 Sep 1999 16:51:20 +0200 (MET DST) Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14]) by limbes.fundp.ac.be (8.9.1/8.9.1) with ESMTP id QAA05665 for &lt;Olivier.Bonaventure@info.fundp.ac.be&gt;; Fri, 17 Sep 1999 16:51:16 +0200 (MET DST) Message-ID: &lt;37E24CEF.7E38F9E3@fokus.gmd.de&gt; Date: Fri, 17 Sep 1999 16:15:11 +0200 From: Eckhart Koerner &lt;koerner@fokus.gmd.de&gt; To: Olivier.Bonaventure@info .fundp.ac.be Subject: Re: Nouveaux coordonnes In-Reply-To: &lt; 3768C3AB.11C52680@info .fundp.ac.be&gt; Bla, bla, bla... Received: from loriot.info.fundp.ac.be (loriot.info.fundp.ac.be [138.48.32.96]) by leibniz.info.fundp.ac.be (8.9.1/8.9.1) with SMTP id QAA19679; Mon, 20 Sep 1999 16:37:25 +0200 (MET DST) Message-Id: &lt;3.0.5.32.19990920163316.00866340@info.fundp.ac.be&gt; Date: Mon, 20 Sep 1999 16:33:16 +0200 To: pers-aca@info.fundp.ac;be From: Gysele HENRARD &lt;ghe@info.fundp.ac.be&gt; Subject: listes Bonjour,
  13. MIME was defined in N. Freed and N. Borenstein. Multipurpose internet mail extensions (MIME) part one: Format of internet message bodies. Request for Comments 2045, Internet Engineering Task Force, November 1996. N. Freed and N. Borenstein. Multipurpose internet mail extensions (MIME) part two: Media types. Request for Comments 2046, Internet Engineering Task Force, November 1996.
  14. MIME was defined in N. Freed and N. Borenstein. Multipurpose internet mail extensions (MIME) part one: Format of internet message bodies. Request for Comments 2045, Internet Engineering Task Force, November 1996. N. Freed and N. Borenstein. Multipurpose internet mail extensions (MIME) part two: Media types. Request for Comments 2046, Internet Engineering Task Force, November 1996.
  15. MIME was defined in N. Freed and N. Borenstein. Multipurpose internet mail extensions (MIME) part one: Format of internet message bodies. Request for Comments 2045, Internet Engineering Task Force, November 1996. N. Freed and N. Borenstein. Multipurpose internet mail extensions (MIME) part two: Media types. Request for Comments 2046, Internet Engineering Task Force, November 1996.
  16. Exemple de message MIME Received: from loriot.info.fundp.ac.be (loriot.info.fundp.ac.be [138.48.32.96]) by leibniz.info.fundp.ac.be (8.9.1/8.9.1) with SMTP id QAA19679; Mon, 20 Sep 1999 16:37:25 +0200 (MET DST) Message-Id: &lt;3.0.5.32.19990920163316.00866340@info.fundp.ac.be&gt; Date: Mon, 20 Sep 1999 16:33:16 +0200 To: pers-aca, pers-sci From: Gysele HENRARD &lt;ghe@info.fundp.ac.be&gt; Subject: listes Mime-Version: 1.0 Content-Type: multipart/mixed; boundary= &quot; =====================_937830796==_ &quot; -- =====================_937830796==_ Content-Type: text/plain; charset=&quot;iso-8859-1&quot; Content-Transfer-Encoding: quoted-printable Bonjour, Voici des listes de 1M-1L, 2M-2L et ERASMUS mises =E0 jour ce lundi 20 septembre. Gyselle -- =====================_937830796==_ Content-Type: application/octet-stream; name=&quot;1M_99_00.xls&quot;; x-mac-type=&quot;584C5334&quot;; x-mac-creator=&quot;5843454C&quot; ...
  17. Le protocole SMTP a &amp;#xE9;t&amp;#xE9; d&amp;#xE9;fini dans le document suivant : J. Postel. Simple mail transfer protocol. Request for Comments 821, Internet Engineering Task Force, August 1982. De nombreux logiciels clients permettant d&apos;envoyer et de recevoir des emails existent. Plusieurs serveurs SMTP existent &amp;#xE9;galement. Parmi les plus courants, on peut citer Sendmail : http://www.sendmail.org Postfix : http://www.postfix.org
  18. Le protocole POP est d&amp;#xE9;fini dans : J. Myers and M. Rose. Post office protocol - version 3. Request for Comments 1725, Internet Engineering Task Force, November 1994 Le Protocol IMAP est d&amp;#xE9;fini dans : M. Crispin. Internet message access protocol - version 4rev1. Request for Comments 2060, Internet Engineering Task Force, December 1996.
  19. FTP is defined in J. Postel and J. K. Reynolds. File transfer protocol. Request for Comments 959, Internet Engineering Task Force, October 1985. There are many ftp clients and servers WU-ftpd http://www.wu-ftpd.org/
  20. The most detailed textbook on HTTP and related protocols B. Krishnamurthy and J. Rexford. Web protocols and practice : HTTP/1.1, networking protocols, caching and traffic measurement. Addison Wesley, 2001. The web technologies and protocols are standardised by the W3C : http://www.w3c.org
  21. URLs are defined in T. Berners-Lee, L. Masinter, M. McCahill, Uniform Resource Locators (URL) , December 1994 , RFC 1738 Voir &amp;#xE9;galement : http://www.w3.org/Addressing Pour plus d&apos;informations sur HTML et son &amp;#xE9;volution, consultez : http://www.w3.org/MarkUp De nombreux navigateurs existent. Parmi les serveurs http, un des plus courants est : apache : http://www.apache.org
  22. HTTP 1.0 is defined in : T. Berners-Lee, R. Fielding, and H. Frystyk. Hypertext transfer protocol -- HTTP/1.0. Request for Comments 1945, Internet Engineering Task Force, May 1996.
  23. HTTP 1.0 is defined in : T. Berners-Lee, R. Fielding, and H. Frystyk. Hypertext transfer protocol -- HTTP/1.0. Request for Comments 1945, Internet Engineering Task Force, May 1996.
  24. HTTP 1.0 is defined in : T. Berners-Lee, R. Fielding, and H. Frystyk. Hypertext transfer protocol -- HTTP/1.0. Request for Comments 1945, Internet Engineering Task Force, May 1996.
  25. HTTP 1.1 is defined in : R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, and T. Berners-Lee. Hypertext transfer protocol -- HTTP/1.1. Request for Comments 2616, Internet Engineering Task Force, June 1999.
  26. HTTP 1.1 is defined in : R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, and T. Berners-Lee. Hypertext transfer protocol -- HTTP/1.1. Request for Comments 2616, Internet Engineering Task Force, June 1999.
  27. Source for this data Global IP traffic forecast and methodology, 2006-2011, Cisco 2007 white paper, [online version] http://www.cisco.com/en/US/solutions/collateral/ns341/ns525/ns537/net_implementation_white_paper0900aecd806a81aa.pdf
  28. Today, Napster does not work anymore as explained due to copyright violations reasons. One of the most efficient file transfer protocol used today is Bittorrent. Bittorrent also divides files in blocks and allows files to be downloaded from several nodes at the same time. This provides good redundancy in case of node/link failures, but also allows an efficient utilisation of the available link bandwidth by using uncongested paths (the node with the highest bandwidth will automatically serve blocks faster than a congested node). A Bittorrent node will not necessarily receive blocks in sequence. Furthermore, to ensure that all Bittorrent users contribute to the system, Bittorrent implementations apply the tit-for-tat principle which implies that once a node has received a block, it must serve this block to other nodes before being allowed to download new blocks. Additional information about the Bittorrent protocol may be found in
  29. Several Distributed Hash Tables have been proposed in the literature. One of the first and most influential ones is Chord Ion Stoica, Rober t Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan , &amp;#x201C; Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications&amp;#x201D; ACM SIGCOMM 2001