© Oxford University Press 2011 Computer NetworksComputer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad
© Oxford University Press 2011 Chapter 9 Computer Networks The Application Layer
© Oxford University Press 2011 The application layer • A layer interacting with the user • Applications run at application layer • Use TCP or UDP to get their job done • SOCKET API is used for interaction • Varieties of applications to deal with • Users expect similar behavior for Internet based applications like browsers
© Oxford University Press 2011 The DNS
© Oxford University Press 2011 Domain namespace requirements • Efficient • Continue working despite break downs • Should not introduce additional overheads • Information available from the nearby servers • Contain a few additional information • A single server can manage multiple networks. • It should be secure enough (not provided)
© Oxford University Press 2011 Labels and domains
© Oxford University Press 2011
© Oxford University Press 2011 Domains and hierarchy: lower level domains are part of higher level domains
© Oxford University Press 2011 Domains and hierarchy: lower level domains are part of higher level
© Oxford University Press 2011 Domain names • Partially and fully qualified names • Resolver • Resolution process
© Oxford University Press 2011 Advantages of hierarchy • Space constraint • Processing time constraint • Congestion near the server • Organized form of information • Efficient resolution of domain names
© Oxford University Press 2011 Advantages of hierarchy • A comparatively static database is better to be organized this way • Clear cut controlling infrastructure • Delegation of authority is clearly defined • Autonomous control
© Oxford University Press 2011 Distributed database • Most of the queries in DNS are resolved within the local server’s scope • It reduces the network traffic • No single point of failure • Easy maintenance • Can be easily managed
© Oxford University Press 2011 Distributed databases Database for ‘in’ ac Address of ac mil Address of mil edu Address of edu … … Database for ‘ac’ A Address of ABC … … Database for ‘ABC’ ict Address of ict ibm Address of ibm ica Address of ica Table 9.4 Database for ‘ict’ Lara Resource records for Lara Ponting Resource records for Ponting Vishwanath Resource records for Vishwanath
© Oxford University Press 2011 Iterative Name Resolution
© Oxford University Press 2011 Recursiv e name resolutio n
© Oxford University Press 2011 Zones
© Oxford University Press 2011 The registration process
© Oxford University Press 2011 Domain Name servers, root, TLD and Local servers
© Oxford University Press 2011 Type Meaning Value A IPv4 address 32-bit value AAAA IPv6 address 128-bit value CNAME Canonical Name Alias name for host PTR Pointer IP address (IPv4 or IPv6) NS Name Server Name server(s) SOA Start of Authority Zone name etc MX Mail Exchanger mail server/exchanger HINFO Host Info Optional information SPF Sender Policy Framework Identify mail servers TXT Text Text information DNSKEY DNS Key Public key of domain RRSIG R R Signature Resource Record Signature
© Oxford University Press 2011 Domain Time-to- live Class Type Value 207.118.1 30.194 / 24 172800 IN PTR abcict.org. ftp.abcict.org . 172800 IN CNAM E Vishwanath.abcic t.org. abcict.org. 172800 IN NS ns2.webmastersin dia.com. abcict.org. 172800 IN NS ns1.webmastersin dia.com. abcict.org. 172800 IN A 207.118.130.194
© Oxford University Press 2011 abcict.org. 172800 IN MX (10) mail.abcict.org. 172800 IN MX (20) Vishwanath.abcic t.org 172800 IN MX (30) Ponting.abcict.org mail.abcict. org. 172800 IN A 207.118.130.194 www.abcict .org. 172800 IN CNAME Ponting.abcict.org www.abcict .org. 172800 IN CNAME abcict.org.
© Oxford University Press 2011 Ponting.a bcict.org. 172800 IN A 208.118.130.194 Ponting.ab cict.org. 172800 IN HINFO HP laptop with RHEL 9 Vishwanat h.abcict.or g. 172800 IN A 209.118.130.194 172800 IN HINFO HP I3 laser.abcic t.org 172800 IN A 210.118.130.194 172800 IN HINFO The laser printer
© Oxford University Press 2011 Different types of resource records DNS records for a big website with multiple servers Domain Time to live Class Type Value www.TheBigWeb site.com 172800 IN A 1.2.3.4 www.TheBigWeb site.com 172800 IN A 2.3.4.5 www.TheBigWeb site.com 172800 IN A 3.4.5.6 www.TheBigWeb site.com 172800 IN A 4.5.6.7 www.TheBigWeb site.com 172800 IN A 5.6.7.8
© Oxford University Press 2011 Name servers abcict.org. 172800 IN NS ns2.webmastersindia.com. abcict.org. 172800 IN NS ns1.webmastersindia.com.
© Oxford University Press 2011 Load balancing in name servers Domain Time to live Class Type Value oracle.com. 172800 IN NS u-ns2.oracle.com. oracle.com. 172800 IN NS u-ns3.oracle.com. oracle.com. 172800 IN NS u-ns4.oracle.com oracle.com. 172800 IN NS u-ns5.oracle.com oracle.com. 172800 IN NS u-ns6.oracle.com. oracle.com. 172800 IN NS ns1.oracle.com. oracle.com. 172800 IN NS ns4.oracle.com. oracle.com. 172800 IN NS Ns1.oracle.com.
© Oxford University Press 2011 CNAME to help • www.gogol.com. 172800 IN CNAMEwww.google.com • www.goggle.com. 172800 IN CNAMEwww.google.com • abcict.org. 172800 IN CNAMEwww.abcict.org • www.abcict.org. 172800 IN CNAMEabcict.org
© Oxford University Press 2011 Partially qualified domain names www 172800 IN CNAME Ponting ;canonical name is Ponting.abcict.org ftp 172800 IN CNAME Vishwanath ;canonical name is Vishwanath.abcict.org ftp.a bcict 172800 IN CNAME Vishwanath.abcict.org ;exactly as above Resource records with blank names abcict.org. 172800 IN MX (10) mail.abcict.org. 172800 IN MX (20) Vishwanath.abcict.org
© Oxford University Press 2011 DNS query and resource record in response
© Oxford University Press 2011 Dynamic DNS
© Oxford University Press 2011 DNS Sec • The DNS records are kept encrypted using the private key of the DNS. It can only be decrypted using the public key of the DNS itself. • DNS resource records also contain a digital signature • Name servers contain public keys for the zones they are responsible for
© Oxford University Press 2011 Browser and server interacting
© Oxford University Press 2011 The HTTP request example GET http://www.oup.co.in/category.php?cat_id=43 HTTP/1.1 Host: www.oup.co.in User-Agent: Mozilla/5.0; Accept: text/html,application/xhtml+xml, application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Cookie: PHPSESSID=c3a1082780a2c6621126fa3bd8ad 11f1
© Oxford University Press 2011 HTTP Response HTTP/1.0 200 OK Date: Mon, 19 Apr 2010 10:50:00 GMT Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_ssl/2.8.12 OpenSSL/0.9.7g X-Powered-By: PHP/4.2.3 Expires: Thu, 19 Nov 2010 08:52:00 GMT Cache-Control: no-store, no-cache, must- revalidate, post-check=0, pre-check=0 Content-Type: text/html Connection: close
© Oxford University Press 2011 HTTP request and response
© Oxford University Press 2011 The structure of request and response
© Oxford University Press 2011 Components of request and response
© Oxford University Press 2011 Complete request structure
© Oxford University Press 2011 Complete response structure
© Oxford University Press 2011 Method Function GET Retrieve a page from the server. A few simple inputs can be provided. Body is always empty. POST Provide information to the server. Nonempty body part contains the information. HEADER Same as GET except the body of the page is not retrieved. PUT Place the data at the user- specified URL. DELETE Remove an object from the web server. CONNECT Helps converting an HTTP request into HTTPS.
© Oxford University Press 2011 The persistent connection • Often , multiple requests are sent and responses are sought from a single connection • When the connection does not need to be established afresh, the response time improves • Pipelining also helps
© Oxford University Press 2011 Persistent connection
© Oxford University Press 2011 Cookies
© Oxford University Press 2011 Session variables • if (username == “ ”), • //no username provided • Jump to login page • else if (user name != administrator) • Display “this page is restricted” message •
© Oxford University Press 2011 Conditional download: request GET http://www.glsict.org/mcaregular.htm HTTP/1.1 Host: www.glsict.org If-modified-since: Thu, 29 Mar 2010 4:35:10 GMT
© Oxford University Press 2011 Conditional download: Two responses Response-1 HTTP/1.1 304 Not Modified Response-2 HTTP/1.1 200 OK Date: Mon, 19 Apr 2010 10:50:00 GMT Server: Apache Last-Modified: 15 Apr 2010 3:34:05 GMT
© Oxford University Press 2011 Conditional Download-1
© Oxford University Press 2011 Conditional download-2
© Oxford University Press 2011 Conditional download-3
© Oxford University Press 2011 Proxies as intermediaries • Reduce load on web servers • Reduced response time • Traffic monitoring • Extending Internet access to others • Max-forwards header
© Oxford University Press 2011 How Proxy works
© Oxford University Press 2011 Dynamic Web, client and server side
© Oxford University Press 2011 The email sending process
© Oxford University Press 2011 The email receiving process
© Oxford University Press 2011 Components of the email system • The first component is known as the user agent. • It is what the users interact with to send and receive mails. • The second component is known as the message transfer agent which navigates the mails to their intended recipients. • The third component is the mail itself.
© Oxford University Press 2011 The complete mailing process
© Oxford University Press 2011 Mail transfer using SMTP client and server
© Oxford University Press 2011 Alias expansion while sending
© Oxford University Press 2011 Alias expansion while recceiving
© Oxford University Press 2011 Alias expansion in web mail
© Oxford University Press 2011 conventional mail Example with the Email format From: Lara Brian ABC ICT Ahmedabad To: Gayle Chris OBS Content description Example of content Name of content Sender’s and Receiver’s mail address Lara@abcict.org Gayle@OBS.com Envelope From: Lara Brian To: Gayle Chris Sender’s and Receiver’s name Prof. Lara Brian Gayle Chris Header The message Dear Gayle, Here is second book Regards Lara The content of the message Dear Gayle, Here is second book Regards Lara Body
© Oxford University Press 2011 SMTP
© Oxford University Press 2011 Client Server Communication SMTP S: 220 OBS.com SMTP server ready C: HELO abcict.orgS: 250 Hello OBS.com, I am glad to meet you C: MAIL FROM:Lara@abcict.org S: 250 OkC: RCPT TO:Gayle@OBS.com S: 250 OkC: RCPT TO:Ramnaresh@OBS.com S: 250 Ok C: RCPT TO:Chandarpol@OBS.com
© Oxford University Press 2011 Continue… S: 550 No such user hereC: DATA S: 354 End data with <CR><LF>.<CR><LF> C: From: "LARA Brian" < LARA@abcict.org > C: To: “Gayle Chris” Gayle@oup.com C: Cc: Ramnaresh@OBS.com C: Subject: The Second Book C:
© Oxford University Press 2011 Continue… C: Hello Gayle. C: I will soon send you the second Book. C: regards C: Lara C: . S: 250 Ok: C: QUIT S: 221 Bye {The server closes the connection}
© Oxford University Press 2011 Internet Media Types From: Lara@abcict.org To: Gayle@OBS.com Date: Thu, 29 APR 2010 16:02:43 -0500 MIME-Version: 1.0 Content-Type: image/jpeg Content-Transfer-Encoding: base64 < a blank line> ………..binary data for the image in text form………
© Oxford University Press 2011 Type and meaning Content Type Meaning text Text information, i.e. a notepad file. image A photograph or graphics audio Recorded sound. video Recorded video. application A binary file like a Word doc. multipart Message divided in multiple parts, each with different type of data message A forwarded email or a reference link X–…. Non-standard header.
© Oxford University Press 2011 SMTP and HTTP comparison • Both of them connects and transfer files • Considering HTTP 1.1, they use persistent connection. • use headers and values in their messages • HTTP does not convert non-text data into text, SMTP converts non-text data into 7- bit ASCII. • HTTP needs separate fetch for each object. SMTP converts the non-text portion into text and send together
© Oxford University Press 2011 SMTP and HTTP comparison • In HTTP, the client fetches the data, while in SMTP, the client sends the data. • As SMTP needs to covert other types of data into 7-bit ASCII, it needs MIME. • HTTP does not require such service, as it transfers every object individually.
© Oxford University Press 2011 Base 64 encoding 6-bit sequence 010100 010010 101010 101000 011100 Converted character U S w o c ASCII value 85 83 119 111 99 Value in binary 0101010 1 0101001 1 011101 11 011011 11 011000 11
© Oxford University Press 2011 Quoted printable encoding 0000 0010 0000 0111 1100 1011 0100 1001 0101 0011 2 7 Non- ASCII I S 0000 0010 0000 0111 00111 101 01000 011 (ASCI I of C) 10000 10 (ASCI I of B) 0100 1001 0101 0011 2 7 = 1100, i.e. C (Hex) 1011, i.e. B (Hex) I S
© Oxford University Press 2011 Intermediaries in mailing
© Oxford University Press 2011 Intermediary in web mail
© Oxford University Press 2011 POP3 and IMAP • Delete mail is default in POP3 • IMAP can have multiple mailboxes • IMAP allows partial mail download • IMAP allows access by features and content • IMAP allows message status to be informed • IMAP is more complicated • Webmails provide everything IMAP
© Oxford University Press 2011 Filters and SPAM • Differentiating incoming mails – subject line – sender’s name – some specific words in the body • Yahoo! And Gmail also provides filters • SPAM is one popular type of filter
© Oxford University Press 2011 FTP Features • Authentication is provided • Separates its control messages from the actual data • interactive and providing format specification • it is stateful
© Oxford University Press 2011 FTP process
© Oxford University Press 2011 Conventiona l FTP connection
© Oxford University Press 2011 Control connection open
© Oxford University Press 2011 Data connection open
© Oxford University Press 2011 The Passive FTP connection
© Oxford University Press 2011 Data connection open in Passive FTP
© Oxford University Press 2011 Transfer between heterogeneous computers: control characters Command Decimal value Action NUL 0 No operation BEL 7 bell-like sound. BS 8 Move left by one and delete CR 13 Move to left margin
© Oxford University Press 2011 The GUI version of FTP
© Oxford University Press 2011 Secure FTP, SSL-FTP • FTP sends and receives everything in plaintext • SFTP is FTP over Secure TCP or SSH • Secure FTP is from IETF. This also uses SSH • FTP based on SSL or FTPS is also popular • For simpler copy operations SCP also is possible to be used
© Oxford University Press 2011 Bluetooth Piconets and scatternet
© Oxford University Press 2011 Bluetooth • Architecture • Pairing • Applications • Profiles • Protocol stack
© Oxford University Press 2011 Applications/ Profiles Applicat ion layer Audio Other RFComm . Tele phon y Serviced discovery C o n t r o l Middlew are layer LLC Data link layer Logical link control adaptation protocol Link Manager Baseband Physical layerPhysical Radio
© Oxford University Press 2011
© Oxford University Press 2011 Most common frame format
© Oxford University Press 2011 Header which is repeated three times

Application layer chapter-9

  • 1.
    © Oxford UniversityPress 2011 Computer NetworksComputer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad
  • 2.
    © Oxford UniversityPress 2011 Chapter 9 Computer Networks The Application Layer
  • 3.
    © Oxford UniversityPress 2011 The application layer • A layer interacting with the user • Applications run at application layer • Use TCP or UDP to get their job done • SOCKET API is used for interaction • Varieties of applications to deal with • Users expect similar behavior for Internet based applications like browsers
  • 4.
    © Oxford UniversityPress 2011 The DNS
  • 5.
    © Oxford UniversityPress 2011 Domain namespace requirements • Efficient • Continue working despite break downs • Should not introduce additional overheads • Information available from the nearby servers • Contain a few additional information • A single server can manage multiple networks. • It should be secure enough (not provided)
  • 6.
    © Oxford UniversityPress 2011 Labels and domains
  • 7.
  • 8.
    © Oxford UniversityPress 2011 Domains and hierarchy: lower level domains are part of higher level domains
  • 9.
    © Oxford UniversityPress 2011 Domains and hierarchy: lower level domains are part of higher level
  • 10.
    © Oxford UniversityPress 2011 Domain names • Partially and fully qualified names • Resolver • Resolution process
  • 11.
    © Oxford UniversityPress 2011 Advantages of hierarchy • Space constraint • Processing time constraint • Congestion near the server • Organized form of information • Efficient resolution of domain names
  • 12.
    © Oxford UniversityPress 2011 Advantages of hierarchy • A comparatively static database is better to be organized this way • Clear cut controlling infrastructure • Delegation of authority is clearly defined • Autonomous control
  • 13.
    © Oxford UniversityPress 2011 Distributed database • Most of the queries in DNS are resolved within the local server’s scope • It reduces the network traffic • No single point of failure • Easy maintenance • Can be easily managed
  • 14.
    © Oxford UniversityPress 2011 Distributed databases Database for ‘in’ ac Address of ac mil Address of mil edu Address of edu … … Database for ‘ac’ A Address of ABC … … Database for ‘ABC’ ict Address of ict ibm Address of ibm ica Address of ica Table 9.4 Database for ‘ict’ Lara Resource records for Lara Ponting Resource records for Ponting Vishwanath Resource records for Vishwanath
  • 15.
    © Oxford UniversityPress 2011 Iterative Name Resolution
  • 16.
    © Oxford UniversityPress 2011 Recursiv e name resolutio n
  • 17.
    © Oxford UniversityPress 2011 Zones
  • 18.
    © Oxford UniversityPress 2011 The registration process
  • 19.
    © Oxford UniversityPress 2011 Domain Name servers, root, TLD and Local servers
  • 20.
    © Oxford UniversityPress 2011 Type Meaning Value A IPv4 address 32-bit value AAAA IPv6 address 128-bit value CNAME Canonical Name Alias name for host PTR Pointer IP address (IPv4 or IPv6) NS Name Server Name server(s) SOA Start of Authority Zone name etc MX Mail Exchanger mail server/exchanger HINFO Host Info Optional information SPF Sender Policy Framework Identify mail servers TXT Text Text information DNSKEY DNS Key Public key of domain RRSIG R R Signature Resource Record Signature
  • 21.
    © Oxford UniversityPress 2011 Domain Time-to- live Class Type Value 207.118.1 30.194 / 24 172800 IN PTR abcict.org. ftp.abcict.org . 172800 IN CNAM E Vishwanath.abcic t.org. abcict.org. 172800 IN NS ns2.webmastersin dia.com. abcict.org. 172800 IN NS ns1.webmastersin dia.com. abcict.org. 172800 IN A 207.118.130.194
  • 22.
    © Oxford UniversityPress 2011 abcict.org. 172800 IN MX (10) mail.abcict.org. 172800 IN MX (20) Vishwanath.abcic t.org 172800 IN MX (30) Ponting.abcict.org mail.abcict. org. 172800 IN A 207.118.130.194 www.abcict .org. 172800 IN CNAME Ponting.abcict.org www.abcict .org. 172800 IN CNAME abcict.org.
  • 23.
    © Oxford UniversityPress 2011 Ponting.a bcict.org. 172800 IN A 208.118.130.194 Ponting.ab cict.org. 172800 IN HINFO HP laptop with RHEL 9 Vishwanat h.abcict.or g. 172800 IN A 209.118.130.194 172800 IN HINFO HP I3 laser.abcic t.org 172800 IN A 210.118.130.194 172800 IN HINFO The laser printer
  • 24.
    © Oxford UniversityPress 2011 Different types of resource records DNS records for a big website with multiple servers Domain Time to live Class Type Value www.TheBigWeb site.com 172800 IN A 1.2.3.4 www.TheBigWeb site.com 172800 IN A 2.3.4.5 www.TheBigWeb site.com 172800 IN A 3.4.5.6 www.TheBigWeb site.com 172800 IN A 4.5.6.7 www.TheBigWeb site.com 172800 IN A 5.6.7.8
  • 25.
    © Oxford UniversityPress 2011 Name servers abcict.org. 172800 IN NS ns2.webmastersindia.com. abcict.org. 172800 IN NS ns1.webmastersindia.com.
  • 26.
    © Oxford UniversityPress 2011 Load balancing in name servers Domain Time to live Class Type Value oracle.com. 172800 IN NS u-ns2.oracle.com. oracle.com. 172800 IN NS u-ns3.oracle.com. oracle.com. 172800 IN NS u-ns4.oracle.com oracle.com. 172800 IN NS u-ns5.oracle.com oracle.com. 172800 IN NS u-ns6.oracle.com. oracle.com. 172800 IN NS ns1.oracle.com. oracle.com. 172800 IN NS ns4.oracle.com. oracle.com. 172800 IN NS Ns1.oracle.com.
  • 27.
    © Oxford UniversityPress 2011 CNAME to help • www.gogol.com. 172800 IN CNAMEwww.google.com • www.goggle.com. 172800 IN CNAMEwww.google.com • abcict.org. 172800 IN CNAMEwww.abcict.org • www.abcict.org. 172800 IN CNAMEabcict.org
  • 28.
    © Oxford UniversityPress 2011 Partially qualified domain names www 172800 IN CNAME Ponting ;canonical name is Ponting.abcict.org ftp 172800 IN CNAME Vishwanath ;canonical name is Vishwanath.abcict.org ftp.a bcict 172800 IN CNAME Vishwanath.abcict.org ;exactly as above Resource records with blank names abcict.org. 172800 IN MX (10) mail.abcict.org. 172800 IN MX (20) Vishwanath.abcict.org
  • 29.
    © Oxford UniversityPress 2011 DNS query and resource record in response
  • 30.
    © Oxford UniversityPress 2011 Dynamic DNS
  • 31.
    © Oxford UniversityPress 2011 DNS Sec • The DNS records are kept encrypted using the private key of the DNS. It can only be decrypted using the public key of the DNS itself. • DNS resource records also contain a digital signature • Name servers contain public keys for the zones they are responsible for
  • 32.
    © Oxford UniversityPress 2011 Browser and server interacting
  • 33.
    © Oxford UniversityPress 2011 The HTTP request example GET http://www.oup.co.in/category.php?cat_id=43 HTTP/1.1 Host: www.oup.co.in User-Agent: Mozilla/5.0; Accept: text/html,application/xhtml+xml, application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Cookie: PHPSESSID=c3a1082780a2c6621126fa3bd8ad 11f1
  • 34.
    © Oxford UniversityPress 2011 HTTP Response HTTP/1.0 200 OK Date: Mon, 19 Apr 2010 10:50:00 GMT Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_ssl/2.8.12 OpenSSL/0.9.7g X-Powered-By: PHP/4.2.3 Expires: Thu, 19 Nov 2010 08:52:00 GMT Cache-Control: no-store, no-cache, must- revalidate, post-check=0, pre-check=0 Content-Type: text/html Connection: close
  • 35.
    © Oxford UniversityPress 2011 HTTP request and response
  • 36.
    © Oxford UniversityPress 2011 The structure of request and response
  • 37.
    © Oxford UniversityPress 2011 Components of request and response
  • 38.
    © Oxford UniversityPress 2011 Complete request structure
  • 39.
    © Oxford UniversityPress 2011 Complete response structure
  • 40.
    © Oxford UniversityPress 2011 Method Function GET Retrieve a page from the server. A few simple inputs can be provided. Body is always empty. POST Provide information to the server. Nonempty body part contains the information. HEADER Same as GET except the body of the page is not retrieved. PUT Place the data at the user- specified URL. DELETE Remove an object from the web server. CONNECT Helps converting an HTTP request into HTTPS.
  • 41.
    © Oxford UniversityPress 2011 The persistent connection • Often , multiple requests are sent and responses are sought from a single connection • When the connection does not need to be established afresh, the response time improves • Pipelining also helps
  • 42.
    © Oxford UniversityPress 2011 Persistent connection
  • 43.
    © Oxford UniversityPress 2011 Cookies
  • 44.
    © Oxford UniversityPress 2011 Session variables • if (username == “ ”), • //no username provided • Jump to login page • else if (user name != administrator) • Display “this page is restricted” message •
  • 45.
    © Oxford UniversityPress 2011 Conditional download: request GET http://www.glsict.org/mcaregular.htm HTTP/1.1 Host: www.glsict.org If-modified-since: Thu, 29 Mar 2010 4:35:10 GMT
  • 46.
    © Oxford UniversityPress 2011 Conditional download: Two responses Response-1 HTTP/1.1 304 Not Modified Response-2 HTTP/1.1 200 OK Date: Mon, 19 Apr 2010 10:50:00 GMT Server: Apache Last-Modified: 15 Apr 2010 3:34:05 GMT
  • 47.
    © Oxford UniversityPress 2011 Conditional Download-1
  • 48.
    © Oxford UniversityPress 2011 Conditional download-2
  • 49.
    © Oxford UniversityPress 2011 Conditional download-3
  • 50.
    © Oxford UniversityPress 2011 Proxies as intermediaries • Reduce load on web servers • Reduced response time • Traffic monitoring • Extending Internet access to others • Max-forwards header
  • 51.
    © Oxford UniversityPress 2011 How Proxy works
  • 52.
    © Oxford UniversityPress 2011 Dynamic Web, client and server side
  • 53.
    © Oxford UniversityPress 2011 The email sending process
  • 54.
    © Oxford UniversityPress 2011 The email receiving process
  • 55.
    © Oxford UniversityPress 2011 Components of the email system • The first component is known as the user agent. • It is what the users interact with to send and receive mails. • The second component is known as the message transfer agent which navigates the mails to their intended recipients. • The third component is the mail itself.
  • 56.
    © Oxford UniversityPress 2011 The complete mailing process
  • 57.
    © Oxford UniversityPress 2011 Mail transfer using SMTP client and server
  • 58.
    © Oxford UniversityPress 2011 Alias expansion while sending
  • 59.
    © Oxford UniversityPress 2011 Alias expansion while recceiving
  • 60.
    © Oxford UniversityPress 2011 Alias expansion in web mail
  • 61.
    © Oxford UniversityPress 2011 conventional mail Example with the Email format From: Lara Brian ABC ICT Ahmedabad To: Gayle Chris OBS Content description Example of content Name of content Sender’s and Receiver’s mail address Lara@abcict.org Gayle@OBS.com Envelope From: Lara Brian To: Gayle Chris Sender’s and Receiver’s name Prof. Lara Brian Gayle Chris Header The message Dear Gayle, Here is second book Regards Lara The content of the message Dear Gayle, Here is second book Regards Lara Body
  • 62.
    © Oxford UniversityPress 2011 SMTP
  • 63.
    © Oxford UniversityPress 2011 Client Server Communication SMTP S: 220 OBS.com SMTP server ready C: HELO abcict.orgS: 250 Hello OBS.com, I am glad to meet you C: MAIL FROM:Lara@abcict.org S: 250 OkC: RCPT TO:Gayle@OBS.com S: 250 OkC: RCPT TO:Ramnaresh@OBS.com S: 250 Ok C: RCPT TO:Chandarpol@OBS.com
  • 64.
    © Oxford UniversityPress 2011 Continue… S: 550 No such user hereC: DATA S: 354 End data with <CR><LF>.<CR><LF> C: From: "LARA Brian" < LARA@abcict.org > C: To: “Gayle Chris” Gayle@oup.com C: Cc: Ramnaresh@OBS.com C: Subject: The Second Book C:
  • 65.
    © Oxford UniversityPress 2011 Continue… C: Hello Gayle. C: I will soon send you the second Book. C: regards C: Lara C: . S: 250 Ok: C: QUIT S: 221 Bye {The server closes the connection}
  • 66.
    © Oxford UniversityPress 2011 Internet Media Types From: Lara@abcict.org To: Gayle@OBS.com Date: Thu, 29 APR 2010 16:02:43 -0500 MIME-Version: 1.0 Content-Type: image/jpeg Content-Transfer-Encoding: base64 < a blank line> ………..binary data for the image in text form………
  • 67.
    © Oxford UniversityPress 2011 Type and meaning Content Type Meaning text Text information, i.e. a notepad file. image A photograph or graphics audio Recorded sound. video Recorded video. application A binary file like a Word doc. multipart Message divided in multiple parts, each with different type of data message A forwarded email or a reference link X–…. Non-standard header.
  • 68.
    © Oxford UniversityPress 2011 SMTP and HTTP comparison • Both of them connects and transfer files • Considering HTTP 1.1, they use persistent connection. • use headers and values in their messages • HTTP does not convert non-text data into text, SMTP converts non-text data into 7- bit ASCII. • HTTP needs separate fetch for each object. SMTP converts the non-text portion into text and send together
  • 69.
    © Oxford UniversityPress 2011 SMTP and HTTP comparison • In HTTP, the client fetches the data, while in SMTP, the client sends the data. • As SMTP needs to covert other types of data into 7-bit ASCII, it needs MIME. • HTTP does not require such service, as it transfers every object individually.
  • 70.
    © Oxford UniversityPress 2011 Base 64 encoding 6-bit sequence 010100 010010 101010 101000 011100 Converted character U S w o c ASCII value 85 83 119 111 99 Value in binary 0101010 1 0101001 1 011101 11 011011 11 011000 11
  • 71.
    © Oxford UniversityPress 2011 Quoted printable encoding 0000 0010 0000 0111 1100 1011 0100 1001 0101 0011 2 7 Non- ASCII I S 0000 0010 0000 0111 00111 101 01000 011 (ASCI I of C) 10000 10 (ASCI I of B) 0100 1001 0101 0011 2 7 = 1100, i.e. C (Hex) 1011, i.e. B (Hex) I S
  • 72.
    © Oxford UniversityPress 2011 Intermediaries in mailing
  • 73.
    © Oxford UniversityPress 2011 Intermediary in web mail
  • 74.
    © Oxford UniversityPress 2011 POP3 and IMAP • Delete mail is default in POP3 • IMAP can have multiple mailboxes • IMAP allows partial mail download • IMAP allows access by features and content • IMAP allows message status to be informed • IMAP is more complicated • Webmails provide everything IMAP
  • 75.
    © Oxford UniversityPress 2011 Filters and SPAM • Differentiating incoming mails – subject line – sender’s name – some specific words in the body • Yahoo! And Gmail also provides filters • SPAM is one popular type of filter
  • 76.
    © Oxford UniversityPress 2011 FTP Features • Authentication is provided • Separates its control messages from the actual data • interactive and providing format specification • it is stateful
  • 77.
    © Oxford UniversityPress 2011 FTP process
  • 78.
    © Oxford UniversityPress 2011 Conventiona l FTP connection
  • 79.
    © Oxford UniversityPress 2011 Control connection open
  • 80.
    © Oxford UniversityPress 2011 Data connection open
  • 81.
    © Oxford UniversityPress 2011 The Passive FTP connection
  • 82.
    © Oxford UniversityPress 2011 Data connection open in Passive FTP
  • 83.
    © Oxford UniversityPress 2011 Transfer between heterogeneous computers: control characters Command Decimal value Action NUL 0 No operation BEL 7 bell-like sound. BS 8 Move left by one and delete CR 13 Move to left margin
  • 84.
    © Oxford UniversityPress 2011 The GUI version of FTP
  • 85.
    © Oxford UniversityPress 2011 Secure FTP, SSL-FTP • FTP sends and receives everything in plaintext • SFTP is FTP over Secure TCP or SSH • Secure FTP is from IETF. This also uses SSH • FTP based on SSL or FTPS is also popular • For simpler copy operations SCP also is possible to be used
  • 86.
    © Oxford UniversityPress 2011 Bluetooth Piconets and scatternet
  • 87.
    © Oxford UniversityPress 2011 Bluetooth • Architecture • Pairing • Applications • Profiles • Protocol stack
  • 88.
    © Oxford UniversityPress 2011 Applications/ Profiles Applicat ion layer Audio Other RFComm . Tele phon y Serviced discovery C o n t r o l Middlew are layer LLC Data link layer Logical link control adaptation protocol Link Manager Baseband Physical layerPhysical Radio
  • 89.
  • 90.
    © Oxford UniversityPress 2011 Most common frame format
  • 91.
    © Oxford UniversityPress 2011 Header which is repeated three times