internet introduction and http and dns examples
TRANSCRIPT
Computer Networks: Internet Introduction 1
Internet IntroductionInternet Introductionandand
HTTP and DNS ExamplesHTTP and DNS Examples
Computer Networks: Internet Introduction 2
Layering and AbstractionLayering and Abstraction
•• Abstractions can be used to hide Abstractions can be used to hide complexity.complexity.
•• Abstraction naturally leads to layering.Abstraction naturally leads to layering.•• Layering provides an abstraction for Layering provides an abstraction for
functional locality.functional locality.•• Layering simplifies the design process Layering simplifies the design process
and adds flexibility when modifying and and adds flexibility when modifying and developing the network.developing the network.
Computer Networks: Internet Introduction 3
Layering and AbstractionLayering and Abstraction•• Layering accommodates incremental changes.Layering accommodates incremental changes.•• It is possible to have alternative abstractions at It is possible to have alternative abstractions at
each layer.each layer.
Hardware
Host-to-host connectivity
Request/replychannel
Message streamchannel
Application programs
P&D slide
Computer Networks: Internet Introduction 4
Applications and Layered Applications and Layered Architectures Architectures [LG&W pp.43[LG&W pp.43--49]49]
In the 1970In the 1970’’s vendor companies (IBM and DEC) s vendor companies (IBM and DEC) developed developed proprietary networksproprietary networks with the with the common feature of grouping communication common feature of grouping communication functions into related and manageable sets functions into related and manageable sets called called layerslayers..
network architecture :: network architecture :: a set of a set of protocolsprotocols that that specify how every layer is to function and specify how every layer is to function and wellwell--defined defined interfacesinterfaces between the layers.between the layers.
Computer Networks: Internet Introduction 5
The Internet and an internetThe Internet and an internet[LG&W pp.26[LG&W pp.26--28]28]
An internet :: An internet :: involves the involves the interconnectioninterconnection of of multiple networks into a single large networks.multiple networks into a single large networks.
The The ““InternetInternet”” :: :: refers to the successor to refers to the successor to ARPANET.ARPANET.
IP (the Internet Protocol) :: IP (the Internet Protocol) :: provides provides connectionlessconnectionless transfer of packets across an transfer of packets across an internet.internet.
Computer Networks: Internet Introduction 6
G
G
G
GG
net 1
net 2
net 3
net 4
net 5
G = gateway
G
An internet
Copyright ©2000 The McGraw Hill Companies
Leon-Garcia & Widjaja: Communication Networks
Figure 1.18
Computer Networks: Internet Introduction 7
IPIP•• Currently provides Currently provides bestbest--effort serviceeffort service
–– packets may be lost (i.e., IP is unreliable).packets may be lost (i.e., IP is unreliable).•• General design philosophyGeneral design philosophy
–– Keep internal operations simple by relegating Keep internal operations simple by relegating complex functions to the edge of the subnet.complex functions to the edge of the subnet.
–– IP can operate over IP can operate over any any network.network.–– allow IP to scale!!!allow IP to scale!!!–– The endThe end--toto--end mechanisms are responsible for end mechanisms are responsible for
recovery of packet losses and congestion recovery of packet losses and congestion control.control.
Computer Networks: Internet Introduction 8
IPv4IPv4
Network ID Host ID
4 bytes
•• Uses Uses hierarchical address spacehierarchical address space with location with location information embedded in the structure.information embedded in the structure.
•• IP address is usually expressed in IP address is usually expressed in dotteddotted--decimal notation decimal notation (e.g., 128.100.11.56).(e.g., 128.100.11.56).
Computer Networks: Internet Introduction 9
The InternetThe Internet
•• Provides a Provides a name spacename space to refer to machines to refer to machines connected to the Internet connected to the Internet (e.g. (e.g. chablis.cs.wpi.educhablis.cs.wpi.edu).).
•• The name space is hierarchical, but it is only The name space is hierarchical, but it is only administrative. The name space is not used in administrative. The name space is not used in network routing operations.network routing operations.
•• DNS (Domain Name Service) provides automatic DNS (Domain Name Service) provides automatic translation of names to IP addresses.translation of names to IP addresses.
Computer Networks: Internet Introduction 10
Internet ArchitectureInternet Architecture•• Defined by the Internet Engineering Task Force Defined by the Internet Engineering Task Force
(IETF).(IETF).•• Referred to as an Referred to as an ““HourglassHourglass”” design.design.•• Application Application vsvs Application Protocol (FTP, HTTP)Application Protocol (FTP, HTTP)
■ ■ ■
FTP
TCP UDP
IP
NET 1 NET 2 NET n
HTTP NV TFTP
P&D slide
Computer Networks: Internet Introduction 11
TCP/IP Architecture ModelTCP/IP Architecture Model
DCC 6DCC 6th th Ed., W. Stallings Figure 1.9Ed., W. Stallings Figure 1.9
Computer Networks: Internet Introduction 12
HTTP SMTP RTP
TCP UDP
IP
Network
Interface 1
Network
Interface 3
Network
Interface 2
DNS
Leon-Garcia & Widjaja: Communication Networks Figure 2.12Copyright ©2000 The McGraw Hill Companies
Computer Networks: Internet Introduction 13
InterfacesInterfaces
Host 1 Host 2
Serviceinterface
Peer-to-peerinterface
High-levelobject
High-levelobject
Protocol Protocol
P&D slide
14
Protocol MachineryProtocol Machinery•• Protocol GraphProtocol Graph
–– most peermost peer--toto--peer communication is indirectpeer communication is indirect–– peerpeer--toto--peer is direct only at hardware levelpeer is direct only at hardware level
Host 1 Host 2
Fileapplication
Digitallibrary
applicationVideo
applicationFile
applicationDigitallibrary
applicationVideo
application
P&D slideComputer Networks: Internet Introduction
Computer Networks: Internet Introduction 15
ISO ArchitectureISO Architecture
One or more nodeswithin the network
End host
Application
Presentation
Session
Transport
Network
Data link
Physical
Network
Data link
Physical
Network
Data link
Physical
End host
Application
Presentation
Session
Transport
Network
Data link
Physical
P&D slide
Computer Networks: Internet Introduction 16
Layering ExampleLayering Example
Client/server relationship Client/server relationship –– Server process waits for incoming requests by Server process waits for incoming requests by
listening to a listening to a portport..–– Client process makes Client process makes requests requests as required.as required.–– Server process provides Server process provides responsesresponses to these to these
requests.requests.–– The server process usually runs in the The server process usually runs in the
background as a background as a daemondaemon (e.g. (e.g. httpdhttpd is the is the server daemon for HTTP)server daemon for HTTP)..
Computer Networks: Internet Introduction 17
HTTP ExampleHTTP Example•• HTTP (HTTP (HyperTextHyperText Transfer Protocol) Transfer Protocol)
specifies rules by which the client and specifies rules by which the client and the server interact so as to retrieve a the server interact so as to retrieve a document.document.
•• The protocol assumes the client and the The protocol assumes the client and the server can exchange messages directlyserver can exchange messages directly
•• The client software needs to set up a The client software needs to set up a twotwo--way connection prior to the HTTP way connection prior to the HTTP request.request.
Computer Networks: Internet Introduction 18
HTTP client/server interaction
HTTPserver
HTTPclient
Request
Response
Leon-Garcia & Widjaja: Communication Networks Figure 2.1Copyright ©2000 The McGraw Hill Companies
Computer Networks: Internet Introduction 19
HTTPserver
HTTPclient
TCP TCP
GET 80, #
#, 80 STATUS
Ephemeral
Port #
Port 80
Figure 2.2Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies
The user clicks on a link to indicate which document is to be retrieved.
1.
The browser must determine the address that contains the document. It does this by sending a query to its local name server.
2.
Once the address is known the browser establishes a connection to the specified machine, usually a TCP connection. In order for the connection to be successful, the specified machine must be ready to accept TCP connections.
3.
4.The browser runs a client version of HTTP, which issues a request specifying both the name of the document and the possible document formats it can handle.
The machine that contains the requested document runs a server version of HTTP. It reacts to the HTTP request by sending an HTTP response which contains the desired document in the appropriate format.
5.
6.The TCP connection is then closed and the user may view the document.
Retrieving a Web Page Copyright ©2000 The McGraw Hill Companies
Leon-Garcia & Widjaja: Communication Networks Figure 1.4
Computer Networks: Internet Introduction 21
Retrieving a document from the WebRetrieving a document from the Web1.1. User selects documentUser selects document2.2. Network software of client Network software of client
locates the server host locates the server host and establishes a twoand establishes a two--way connection.way connection.
3.3. HTTP client sends HTTP client sends message requesting message requesting document.document.
4.4. HTTP daemon listening HTTP daemon listening on TCP port 80 interprets on TCP port 80 interprets a message.a message.
5.5. HTTP daemon send a HTTP daemon send a result code and a result code and a description of the description of the information that the client information that the client will receivewill receive
GET /GET /infocom/index.htmlinfocom/index.html HTTP 1.0HTTP 1.0
HTTP/1.1 200 OKHTTP/1.1 200 OKServer: Apache/1.3.23 (Unix)Server: Apache/1.3.23 (Unix)ContentContent--Length: 414Length: 414ContentContent--Type: textType: text--htmlhtml
Computer Networks: Internet Introduction 22
Retrieving a document from the WebRetrieving a document from the Web6.6. HTTP daemon reads the HTTP daemon reads the
file and sends the file and sends the requested file through the requested file through the TCP port.TCP port.
7. Text is displayed by client 7. Text is displayed by client browser, which interprets browser, which interprets the HTML format.the HTML format.
8. HTTP daemon 8. HTTP daemon disconnects the disconnects the connection after the connection after the connection is idle for connection is idle for some timeout period.some timeout period.
<html><html><head><head><title><title>InfocomInfocom ’’99</title>99</title><font face =<font face =““ArialArial””>The Future Now >The Future Now
…… </font> </font>
Computer Networks: Internet Introduction 23
DNS query and responseDNS query and response1. Application requests name to 1. Application requests name to
address translation.address translation.2. 2. ResolverResolver composes query composes query
message.message.
3. 3. ResolverResolver send UDP datagram send UDP datagram encapsulating the query encapsulating the query message.message.
4. DNS server looks up address and 4. DNS server looks up address and prepares response.prepares response.
5. DNS sends UDP datagram 5. DNS sends UDP datagram encapsulating the response encapsulating the response message. message.
Header: OPCODE=SQUERYHeader: OPCODE=SQUERYQuestion:Question:QNAME= QNAME= tesla.comm.toronto.edutesla.comm.toronto.edu.,.,
QCLASS=IN, QTYPE=AQCLASS=IN, QTYPE=A
HEADER: OPCODE=SQUERY, HEADER: OPCODE=SQUERY, RESPONSE AARESPONSE AA
Question: QNAME=Question: QNAME=Tesla.comm.toronto.eduTesla.comm.toronto.edu.,.,
QCLASS=IN, QTYPE=AQCLASS=IN, QTYPE=AAnswer: Answer: telsa.cmm.toronto.edutelsa.cmm.toronto.edu..86400 IN A 128.100.11.5686400 IN A 128.100.11.56