ccnet lec 15 dns http

Post on 08-Apr-2018

226 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    1/29

    Lecture

    15Data Communication & Networks

    Application Layer

    (DNS, HTTP)

    Muhammad Yousaf

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    2/29

    myousaf@ymail.com 2

    Where we are in Protocol Stack:

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    3/29

    myousaf@ymail.com 3

    Application Layer:

    Top most layer of protocol stackIn contrast to lower layer protocols, applicationlayer protocols are not implemented as kernelmodules of operating system

    Rather they are implemented as OS utilities/Server

    Either user itself or user-applications can interactwith these application layer protocols

    Hence application layer provides the interfacebetween user/applications & network protocol stack

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    4/29

    myousaf@ymail.com 4

    Application Layer Protocols:

    Most famous application layer protocols are:DNS (Domain Name System)

    SNMP (Simple Network Management Protocol)

    HTTP (Hyper Text Transfer Protocol)

    FTP (File Transfer Protocol)

    SMTP (Simple Mail Transfer Protocol)

    MIME (Multipurpose Internet Mail Exchange)

    When to use which protocol obviously dependsupon user requirements

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    5/29

    myousaf@ymail.com 5

    Domain Name System

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    6/29

    myousaf@ymail.com 6

    Domain Name System:

    You might be unaware of DNSBut whenever you use Internet, you use DNS

    Machines (computers, routers, etc) use numbers toidentify each other

    e.g: IP= 172.16.0.153, MAC= 00-16-D3-03-0A-D4But humans are comfortable to use names toidentify others

    I can remember your names instead of your roll-numbers

    Humans like to remember names of computer/servers on Internet

    e.g: www.mail.yahoo.com

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    7/29

    myousaf@ymail.com 7

    Domain Names:

    FQDN is used for fully identifying a host on InternetFully Qualified Domain Names (FQDN)

    It provides absolute path to access web pagesresiding on the target host

    http://www.mail.yahoo.com/index.htmlhttp://www.groups.yahoo.com/index.html

    Domain names must be registered with somedomain name registrar (Authority)

    IANA delegated its responsibility to manage thedomain names to ICANN

    Internet Corporation for Assigned Names & Numbers(ICANN)

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    8/29

    myousaf@ymail.com 8

    Domain Names: cont

    http://www.mail.yahoo.com/index.html

    Top Level Domain

    Second Level: Company Name

    Third Level: Division/Server Name

    Accessible through Web Server

    Protocol used to transfer data

    File Name

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    9/29

    myousaf@ymail.com 9

    Top Level Domains:

    Right most part of FQDN represents the top level domain(TLD)

    TLDs are very few in number

    Domain names reside under these TLDs

    Some of them are:.com (for commercial business sites)

    .net (for networking & telecomm sites)

    .org (for non-profit organizations)

    .edu (for educational institutes)

    .gov (for government organizations)

    .mil (for military sites only)

    Besides these, there are country codes also

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    10/29

    myousaf@ymail.com 10

    Country Codes:

    Special top level domains to identify geographicalregions i.e. countries

    Represented as two letter codes

    .au (Australia)

    .ca (Canada)

    .cn (China)

    .in (India)

    .jp (Japan)

    .pk (Pakistan)

    .uk (United Kingdom)

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    11/29

    myousaf@ymail.com 11

    Naming Hierarchy:

    Hosts are arranged in hierarchical mannerRight-most part of FQDN represent Top LevelDomain & so on

    org com edunet govmil pk fr

    ietf ibmyahoo

    mituiuc

    eduinria

    wwwcs

    eecase

    cupidonresearch

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    12/29

    myousaf@ymail.com 12

    DNS: cont

    We need a mechanism that can translate namesinto IP addresses

    DNS performs this translation

    There should be some DNS server (also known as

    Name Server) on the network

    There is a hierarchy of Name Servers

    DNS server runs on port-53

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    13/29

    myousaf@ymail.com 13

    Name Resolution:

    User computers are DNS clientsClients query local DNS server with some domainname and asks for the IP address

    Local DNS server checks its cache for

    corresponding translation entry

    If found then return the IP address

    Else forward the query to top level DNS server

    Upper level name server traces the lower levelname server

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    14/29

    myousaf@ymail.com 14

    Name Resolution: (example)

    clientlocalname

    server

    .edu rootname

    server

    MITname

    server

    ECEname

    server

    www.ece.mit.edu

    www.ece.mit.edu

    mit.edu; 131.126.10.23

    www.ece.mit.edu

    ece.mit.edu; 131.126.150.1

    www.ece.mit.edu

    www.ece.mit.edu; 131.126.150.25

    131.126.150.25

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    15/29

    myousaf@ymail.com 15

    Displaying DNS Cache:

    C:\RIU>ipconfig/displaydns

    Windows IP Configuration1.0.0.127.in-addr.arpa

    ----------------------------------------

    Record Name . . . . . : 1.0.0.127.in-addr.arpa.

    Record Type . . . . . : 12

    Time To Live . . . . : 603476

    Data Length . . . . . : 4Section . . . . . . . . . : Answer

    PTR Record . . . . . : localhost

    localhost

    ----------------------------------------

    Record Name . . . . . : localhostRecord Type . . . . . : 1

    Time To Live . . . . : 603476

    Data Length . . . . . : 4

    Section . . . . . . . : Answer

    A (Host) Record . . . : 127.0.0.1

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    16/29

    myousaf@ymail.com 16

    Hyper Text Transfer Protocol

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    17/29

    myousaf@ymail.com 17

    Hyper Text Transfer Protocol:

    World wide web is most successful application ofthe Internet

    Consists of a large set of clients & servers; allspeaking the same language (HTTP)

    HTTP clients = web browser (Internet Explorer etc.)

    HTTP servers = web server

    HTTP web server runs on port-80

    It is the protocol that defines how web browserdownload information from web servers

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    18/29

    myousaf@ymail.com 18

    Evolution of HTTP:

    First developed in 1990Later standardized in 1996 as RFC-1945

    Current version is HTTP/1.1 (RFC-2616)

    Dont confuse HTTP with HTML

    HTML is the language for creating web pages

    HTTP is the protocol that carry the HTML data fromone computer to other computer

    HTTP can also carry text files, images, audio files,video files, pdf files, etc

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    19/29

    myousaf@ymail.com 19

    Working of HTTP:

    HTTP is a stateless request/response protocolClients make requests to the server

    Server then responds to the clients

    Stateless means that each request/responsesession is independent from previous session

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    20/29

    myousaf@ymail.com 20

    HTTP request message:

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    21/29

    myousaf@ymail.com 21

    HTTP request line:

    HTTP request message specifies the:operation to be performed

    web page on which the operation should be performed

    the HTTP version

    e.g: GET http://www.case.edu.pk HTTP/1.1

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    22/29

    myousaf@ymail.com 22

    HTTP response message:

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    23/29

    myousaf@ymail.com 23

    HTTP response status line:

    Response message begins with the status linespecifying the:

    Version of HTTP

    3-digit code indicating success or not

    Text string giving the reasone.g: HTTP/1.1 202 Accepted

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    24/29

    myousaf@ymail.com 24

    HTTP example:

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    25/29

    myousaf@ymail.com 25

    Server Name resolution:

    You can access web server using following type ofURLs (Universal Resource Locator)

    http://207.200.83.29:80/index.html

    http://www.netscape.com:80/index.html

    http://www.netscape.com/index.html

    Port-80 is default for web servers

    Given the host name, IP address can be

    determined using DNSNow having Port-number & IP address of server,client can easily establish the TCP connection withthe server

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    26/29

    myousaf@ymail.com 26

    Putting All Together:

    See what web browser (client) is doing:Extracts server's hostname from the URL

    Converts server's hostname into server's IP addressusing DNS

    Extracts port number (if any) from the URLEstablishes a TCP connection with web server

    Sends an HTTP request message to the server

    Receives an HTTP response from the server

    Connection is closed

    Browser displays received web page

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    27/29

    myousaf@ymail.com 27

    Getting HTML page via HTTP:

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    28/29

    myousaf@ymail.com 28

    Last words:

    This is not the END

    This is not even the BEGINING OF END

    This is just the END OF THE BEGINNING

  • 8/6/2019 Ccnet Lec 15 DNS HTTP

    29/29

    myousaf@ymail com 29

    Thanks

top related