Download presentation
Presentation is loading. Please wait.
1
Lecture 2 Dr. Richard Spillman Fall 2009
NETWORKS Lecture 2 Dr. Richard Spillman Fall 2009
2
OUTLINE Network Structures Application Layer
3
Network Structures
4
The Internet For this all to work everyone must be on the same page
Local ISP Server Router millions of connected computing devices: hosts, end-systems running network apps communication links routers: forward packets (chunks) of data thru network protocols: control sending, receiving of messages TCP, IP, HTTP, FTP, PPP Home systems Regional ISP Company Network For this all to work everyone must be on the same page
5
The Enormity of the Problem
Home systems Local ISP Server Router Regional ISP Company Network SUN IBM What we have going is a vast network consisting of different hardware and varied software and they all have to transparently communicate with each other Lucent MAC Cisco Cisco Cisco Gateway Cisco Nortel Nortel Dell Dell Silicon Graphics HP
6
Protocols To make this all work, everything must follow a common protocol Define the format Order of messages sent and received Actions taken on message transmission or receipt Request connection Request response
7
The Network Core Home systems Local ISP Server Router Regional ISP Company Network The first question is: How is the data transmitted through the network? This is the function of the network core, the set of routers There are two modes of operation Circuit Switching: set up a dedicated path Packet Switching: data sent through the net in “discrete” packages
8
Circuit Switching Set a fixed path through the routers:
Home systems Local ISP Server Router Regional ISP Company Network Source Set a fixed path through the routers: Destination
9
Packet Switching Each data stream is divided into packets
Home systems Local ISP Server Router Regional ISP Company Network Each data stream is divided into packets Packets travel in a store and forward mode Packets hop from one router to another Wait their turn at each router before making a hop
10
Where did this come from?
Protocol Layers Home systems Local ISP Server Router Regional ISP Company Network Where did this come from? Where does It go? What does It need? Networks are extremely complex and there is little hope that their structure could be organized so it is not feasible to just pass data between hosts Want a communication link These questions can only be answered by the packet itself
11
Why Layers? Application Transport Network Link Physical
All the answers are added to the data to form the required packet as it is sent out onto the internet The way in which the information is added is modeled by a layer process The Internet Layer Model has 5 segments Application Transport Network Link Physical The model makes it easier to discuss the different actions and makes it easier to modify one layer without affecting the others
12
Layer Tasks application: supporting network applications
ftp, smtp, http transport: host-host data transfer tcp, udp (reliable delivery, rate regulation) network: routing of datagrams from source to destination ip, routing protocols link: data transfer between neighboring network elements ppp, ethernet, wireless, multiple access protocols physical: bits “on the wire”
13
Logical Communication
Each node interacts with components of the layers D Physical Link Network Transport Application Physical Link Network T D Physical Link Network Transport Application For example consider the transport layer Ack Accept data from the application layer Add addressing & reliability check information Send a “datagram” to its peer Wait for ack
14
Physical Communication
What is really happening: Physical Link Network Transport Application D T D Physical Link Network T D N T D N T D L N T D N T D L N T D L N T D D Physical Link Network Transport Application T D N T D L N T D
15
Layer Structures Each layer has a specific application and carries specific information to communicate with a peer layer on another system As a result of this configuration model, it is possible to discuss each layer separately New features can be added to a layer without affecting other layers The operation of a layer can be understood without involving the other layers Application Transport Network Link Physical
16
Application Layer
17
Application Layer Application Layer Standards
allow two application programs to work together, even if they come from different vendors For example, browser on user PC and webserver application program on webserver Common Application Layer programs Hypertext Transfer Protocol (HTTP) File Transfer Protocol (FTP) Name service (DNS) Telnet Rlogin Network File System (NFS) Simple Mail Transfer Protocol (SMTP) Post Office Protocol 3 (POP3) News
18
Internet Applications
Common Internet applications have defined protocols: Application remote terminal access Web file transfer streaming multimedia remote file server layer protocol smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g. RealNetworks) NSF Underlying transport protocol TCP TCP or UDP
19
http Application Protocol
20
www: the http protocol client/server model
PC running Explorer Server running NCSA Web server Mac running Navigator http request http response client/server model client: browser that requests, receives, “displays” WWW objects server: WWW server sends objects in response to requests http request http response
21
What really happens . . . client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client http messages (application-layer protocol messages) exchanged between browser (http client) and WWW server (http server) TCP connection closed
22
www.someSchool.edu server
Example Suppose the user enters the URL server Sends http request message TCP connection request on Port 80 TCP connection accepted Response message including requested object Server closes TCP port
23
http Message Format two types of http messages: request, response
http request message: ASCII (human-readable format) request line (GET, POST, HEAD commands) GET /somedir/page.html HTTP/1.1 Connection: close User-agent: Mozilla/4.0 Accept: text/html, image/gif,image/jpeg Accept-language:fr (extra carriage return, line feed) header lines Carriage return, line feed indicates end of message
24
http Request Header The application layer adds the http request header:
25
http Reply Format status line (protocol status code status phrase)
HTTP/ OK Connection: close Date: Thu, 06 Aug :00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data ... header lines data, e.g., requested html file
26
http Reply Codes In the first line of the server to client reply
A few sample codes: 200 OK request succeeded, requested object later in this message 301 Moved Permanently requested object moved, new location specified later in this message (Location:) 400 Bad Request request message not understood by server 404 Not Found requested document not found on this server 505 HTTP Version Not Supported
27
Try it for yourself . . . 1. Telnet to your favorite WWW server:
telnet 80 Opens TCP connection to port 80 (default http server port) at 2. Type in a GET http request: By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to http server GET /~spillmrj HTTP/1.1 3. Look at response message sent by http server!
28
http Cookies server sends “cookie” to client in response Set-cookie: #
client present cookie in later requests cookie: # server matches presented-cookie with server-stored cookies authentication remembering user preferences, previous choices
29
http Conditional Interaction
Goal: don’t send object if client has up-to-date stored (cached) version client: specify date of cached copy in http request If-modified-since: <date> server: response contains no object if cached copy up-to-date: HTTP/ Not Modified
30
Web Cache client Proxy server http request http response origin Goal: Satisfy client request without involving the original server user sets browser: WWW accesses via web cache client sends all http requests to web cache if object at web cache, web cache immediately returns object in http response else requests object from origin server, then returns http response to client
31
Why Web Caching? origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link cache Assume: cache is “close” to client (e.g., in same network) smaller response time: cache “closer” to client decrease traffic to distant servers link out of institutional/local ISP network often bottleneck
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.