1 / 62

Understanding Session Layer Functionalities in OSI Model

Explore the purpose, characteristics, and processes of the session layer in the OSI model for network communication. Learn about session establishment, data transfer, and termination phases, synchronization, dialog management, activities, tokens, and application services.

ahintz
Download Presentation

Understanding Session Layer Functionalities in OSI Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PART 02 프로토콜 컴퓨터 네트워크 PART 02 프로토콜 (chapter 04 응용계층) 임효택 E-mail : htlim@dongseo.ac.kr Home page : http://kowon.dongseo.ac.kr/~htlim

  2. PART 02 프로토콜 chapter 04 응용계층 • OSI 참조 모델 응용 4.1.1 세션, 표현 계층 • 세션 계층의 개관 • OSI 참조 모델 5계층에 해당 • 전송 제어 기능을 상위 계층에 제공 • 서비스 측면의 기능들을 제공하는 데 목적이 있다. • 제공 서비스 • 기본적으로 연결형 서비스를 제공한다. • 전송되는 데이터의 순서는 중요한 의미를 가진다. • 지원되는 서비스의 종류가 많다. • 기능단위와 사용자가 필요한 기능단위를 선택하여 사용할 수 있다.

  3. PART 02 프로토콜 chapter 04 응용계층 • 연결형 서비스 과정 • 연결 설정 단계, 데이터 전송 단계, 연결 해제 단계로 나눈다. • 세션 연결의 특성 • (a) 트랜스포트와 세션 연결이 일대 일로 대응한다. (가장 일반적) • (b) 다시 새로운 세션 연결을 시작할 때 트랜스포트 연결을 그대로 사용 할수 있다. • (c) 하나의 세션 연결에 대하여 트랜스포트 연결이 중간에 해제되었다가 다시 연결되어 사용된다.

  4. PART 02 프로토콜 chapter 04 응용계층 • 대화 관리(Dialogue management) [그림 4.2] 세션 계층의 데이터 전송 방식

  5. PART 02 프로토콜 chapter 04 응용계층 • 동기(Synchronization) • 두 세션 사용자 간의 데이터를 교환하다가 문제가 발생하였을때 미리 정해 놓은 동기점으로 되돌아가 다시 시작하도록 하는 것. • 대동기점 ,소동기점 [그림 4.3] 세션 계층에서의 동기점 [그림 4.4] 대동기점과 소동기점

  6. PART 02 프로토콜 chapter 04 응용계층 • 액티비티(Activity) • 세션 사용자 간에 어떤 일의 논리적인 단위를 표시하기 위한 것. • 독립적인 특성을 가지며 영향을 받지 않는다. [그림 4.5] 세션 계층 액티비티와 동기점

  7. PART 02 프로토콜 chapter 04 응용계층 • 토큰 (Token) • 어떠한 서비스를 수행할 수 있는 권리를 나타내는 것 • 데이터토큰, 해제 토큰, 소동기 토큰, 대동기/액티비티 토큰 • 서비스 프리미티브와 SPDU • 서비스 프리미티브는 ISO 8326 또는 X.215에 정의됨. • SPDU는 ISO8327, X.255에 정의 됨. • 에러검출 및 복구의 기능이 없다. [그림 4.6]세션 계층에서 SPDU의 교환 예(연결 설정)

  8. PART 02 프로토콜 chapter 04 응용계층 4.1.2 응용계층 • 응용 서비스 요소 • 응용 프로그램이 필요로 하는 최소의 단위를 응용 서비스 요소라 한다. • 엔티티 : 특정한 하나의 응용 프로그램에 필요한 통신 서비스 요소들의 결합형태 [그림 4.8] 응용 엔티티 구조

  9. PART 02 프로토콜 chapter 04 응용계층 • SASE • FTAM (file access & management) • VT (virtual terminal) • MOTIS (message oriented text interchange system) • JTM (job transfer & manipulation) • RDA (remote database access) • 트랜젝션 처리 • OSI 관리 • CASE • ACSE (association control service element) • CCR (commitment concurrency & recovery) • ROS (remote operation service)

  10. PART 02 프로토콜 chapter 04 응용계층 • 메시지 처리 시스템(MHS) 서비스 • 대표적인 예 : 전자우편 • 파일 전송, 접근과 관리(FTAM) • 디렉토리 서비스 • 각 자원의 위치에 관계하는 명칭을 알고 필요한 어드레스를 요구하는 기능 • 가상 터미널 서비스 • 가상 터미널이 응용 프로그램 또는 터미널 이용자에게 제공하는 서비스 • OSI 관리 • 기타

  11. Data loss some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” PART 02 프로토콜 Application이 필요한 트랜스포트 서비스는? Bandwidth • some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective” • other apps (“elastic apps”) make use of whatever bandwidth they get

  12. PART 02 프로토콜 Transport service requirements of common apps Time Sensitive no no no yes, 100’s msec yes, few secs yes, 100’s msec yes and no Application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games financial apps Data loss no loss no loss loss-tolerant loss-tolerant loss-tolerant loss-tolerant no loss Bandwidth elastic elastic elastic audio: 5Kb-1Mb video:10Kb-5Mb same as above few Kbps up elastic

  13. PART 02 프로토콜 Internet 응용 프로토콜과 트랜스포트 프로토콜 Application layer protocol smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g. RealNetworks) NSF proprietary (e.g., Vocaltec) Underlying transport protocol TCP TCP TCP TCP TCP or UDP TCP or UDP typically UDP Application e-mail remote terminal access Web file transfer streaming multimedia remote file server Internet telephony

  14. Web page: consists of “objects” addressed by a URL Web 페이지의 구성: base HTML page, and several referenced objects. URL 의 두가지 구성요소 : host name and path name: User agent for Web is called a browser: MS Internet Explorer Netscape Communicator Server for Web is called Web server: Apache (public domain) MS Internet Information Server PART 02 프로토콜 Web 상식 www.someSchool.edu/someDept/pic.gif

  15. http: hypertext transfer protocol Web’s application layer protocol client/server model client: browser that requests, receives, “displays” Web objects server: Web server sends objects in response to requests http1.0: RFC 1945 http1.1: RFC 2068 PART 02 프로토콜 The Web: the http protocol http request PC running Explorer http response http request Server running NCSA Web server http response Mac running Navigator

  16. http: TCP transport service: 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 Web server (http server) TCP connection closed http is “stateless” server maintains no information about past client requests PART 02 프로토콜 The http protocol: more aside Protocols that maintain “state” are complex! • past history (state) must be maintained • if server/client crashes, their views of “state” may be inconsistent, must be reconciled

  17. Suppose user enters URL www.someSchool.edu/someDepartment/home.index 1a. http client initiates TCP connection to http server (process) at www.someSchool.edu. Port 80 is default for http server. PART 02 프로토콜 http example (contains text, references to 10 jpeg images) 1b.http server at host www.someSchool.edu waiting for TCP connection at port 80. “accepts” connection, notifying client 2.http client sends http request message (containing URL) into TCP connection socket 3.http server receives request message, forms response message containing requested object (someDepartment/home.index), sends message into socket time

  18. 5. http client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects PART 02 프로토콜 http example (cont.) 4.http server closes TCP connection. 6.Steps 1-5 repeated for each of 10 jpeg objects time

  19. Non-persistent HTTP/1.0 server parses request, responds, and closes TCP connection 2 RTTs to fetch each object Each object transfer suffers from slow start Persistent default for HTTP/1.1 on same TCP connection: server, parses request, responds, parses new request,.. Client sends requests for all referenced objects as soon as it receives base HTML. Fewer RTTs and less slow start. PART 02 프로토콜 Non-persistent and persistent connections But most 1.0 browsers use parallel TCP connections.

  20. PART 02 프로토콜 initiate TCP connection RTT request file time to transmit file RTT file received time time Non-Persistent HTTP: Response time Definition of RTT: time to send a small packet to travel from client to server and back. Response time: • one RTT to initiate TCP connection • one RTT for HTTP request and first few bytes of HTTP response to return • file transmission time total = 2RTT+transmit time

  21. Nonpersistent HTTP issues: requires 2 RTTs per object OS overhead for each TCP connection browsers often open parallel TCP connections to fetch referenced objects Persistent HTTP server leaves connection open after sending response subsequent HTTP messages between same client/server sent over open connection Persistent without pipelining: client issues new request only when previous response has been received one RTT for each referenced object Persistent with pipelining: default in HTTP/1.1 client sends requests as soon as it encounters a referenced object as little as one RTT for all the referenced objects PART 02 프로토콜 Persistent HTTP

  22. PART 02 프로토콜 http message format: request • 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.0 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

  23. PART 02 프로토콜 http request message: general format

  24. PART 02 프로토콜 http message format: respone status line (protocol status code status phrase) HTTP/1.0 200 OK Date: Thu, 06 Aug 1998 12: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

  25. 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 PART 02 프로토콜 http response status codes In first line in server->client response message. A few sample codes:

  26. 1. Telnet to your favorite Web server: PART 02 프로토콜 Trying out http (client side) for yourself Opens TCP connection to port 80 (default http server port) at www.eurecom.fr. Anything typed in sent to port 80 at www.eurecom.fr telnet www.eurecom.fr 80 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 /~ross/index.html HTTP/1.0 3. Look at response message sent by http server!

  27. user sets browser: Web 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 PART 02 프로토콜 Web Caches (proxy server) Goal: satisfy client request without involving origin server origin server Proxy server http request http request client http response http response http request http request http response http response client origin server

  28. 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 PART 02 프로토콜 Why Web Caching? origin servers public Internet 1.5 Mbps access link institutional network 10 Mbps LAN institutional cache

  29. user sets browser: Web accesses via cache browser sends all HTTP requests to cache object in cache: cache returns object else cache requests object from origin server, then returns object to client PART 02 프로토콜 Web caches (proxy server) Goal: satisfy client request without involving origin server origin server Proxy server HTTP request HTTP request client HTTP response HTTP response HTTP request HTTP response client origin server

  30. Cache acts as both client and server Typically cache is installed by ISP (university, company, residential ISP) Why Web caching? Reduce response time for client request. Reduce traffic on an institution’s access link. Internet dense with caches: enables “poor” content providers to effectively deliver content (but so does P2P file sharing) PART 02 프로토콜 More about Web caching

  31. Assumptions average object size = 100,000 bits avg. request rate from institution’s browsers to origin servers = 15/sec delay from institutional router to any origin server and back to router = 2 sec Consequences utilization on LAN = 15% utilization on access link = 100% total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + milliseconds PART 02 프로토콜 Caching example origin servers public Internet 1.5 Mbps access link institutional network 10 Mbps LAN institutional cache

  32. Possible solution increase bandwidth of access link to, say, 10 Mbps Consequences utilization on LAN = 15% utilization on access link = 15% Total delay = Internet delay + access delay + LAN delay = 2 sec + msecs + msecs often a costly upgrade PART 02 프로토콜 Caching example (cont) origin servers public Internet 10 Mbps access link institutional network 10 Mbps LAN institutional cache

  33. Install cache suppose hit rate is .4 Consequence 40% requests will be satisfied almost immediately 60% requests satisfied by origin server utilization of access link reduced to 60%, resulting in negligible delays (say 10 msec) total avg delay = Internet delay + access delay + LAN delay = .6*(2.01) secs + .4*milliseconds < 1.4 secs PART 02 프로토콜 Caching example (cont) origin servers public Internet 1.5 Mbps access link institutional network 10 Mbps LAN institutional cache

  34. transfer file to/from remote host client/server model client: side that initiates transfer (either to/from remote) server: remote host ftp: RFC 959 ftp server: port 21 PART 02 프로토콜 FTP user interface FTP client FTP server local file system ftp: the file transfer protocol file transfer user at host remote file system

  35. ftp client contacts ftp server at port 21, specifying TCP as transport protocol two parallel TCP connections opened: control: exchange commands, responses between client, server. “out of band control” data: file data to/from server ftp server maintains “state”: current directory, earlier authentication PART 02 프로토콜 TCP control connection port 21 TCP data connection port 20 FTP client FTP server ftp: separate control, data connections

  36. Sample commands: sent as ASCII text over control channel USER username PASS password LISTreturn list of file in current directory RETR filenameretrieves (gets) file STOR filenamestores (puts) file onto remote host Sample return codes status code and phrase (as in http) 331 Username OK, password required 125 data connection already open; transfer starting 425 Can’t open data connection 452 Error writing file PART 02 프로토콜 ftp commands, responses

  37. TCP Connection Establishment PART 02 프로토콜

  38. Control Connection PART 02 프로토콜 Control functions (commands) and reply codes are transferred over the control connection. Example:- CommandsReply Codes USER 331 PASS 230 CWD 250 PWD 257 TYPE I 200 PASV 227 STOR 125 226 -For more commands and Reply codes -Check on RFC 959 http://www.faqs.org/rfcs/rfc959.html

  39. PART 02 프로토콜 Ethereal Captured Screen For FTP

  40. The Flow of the Captured Packets-Control connection PART 02 프로토콜 • Works Done here • Send username seongyee • Response with 331 (PasswordRequired) • Send password password • Response with 230 (Successful Login) • Change Directory with CWD • Response with 250 (CWD command successed) • List Current Directory with PWD • Response with 257 (List Current Directory) • Set the data type to I • Response with 200 (Type Set to I) • Set to Passive Mode • Response with 277(Entering Passive Mode) • Download Chap2.ppt by sending STOR Command • Response with 125(Data Connection Opened) • Response with 226(Transfer complete) Data Connection Explain Next Slide

  41. Packet Capture For Data Connection PART 02 프로토콜 Another TCP connection where 192.168.112.94:3287 to 203.241.187.71:1163 Established For data connection

  42. PART 02 프로토콜 chapter 04 응용계층 E-mail(전자메일) • 컴퓨터 사용자가 동일한 컴퓨터 또는 네트워크에 연결된 다른 컴퓨터 사용자와 보통의 메일 서비스를 전산망 상에서 온라인으로 사용할 수 있는 서비스. • TCP/IP는 전자메일을 주고받기 위한 SMTP를 정의한다. • [그림 4.13]은 TCP/IP를 사용한 전자메일의 전체적인 구성도를 보여준다. [그림 4.13] 인터넷 전자메일의 구성

  43. Three major components: user agents mail servers simple mail transfer protocol: smtp User Agent a.k.a. “mail reader” composing, editing, reading mail messages e.g., Eudora, Outlook, elm, Netscape Messenger outgoing, incoming messages stored on server PART 02 프로토콜 user agent user agent user agent user agent user agent user agent SMTP SMTP SMTP mail server mail server mail server outgoing message queue user mailbox Electronic Mail

  44. Mail Servers mailbox contains incoming messages (yet to be read) for user message queue of outgoing (to be sent) mail messages smtp protocol between mail servers to send email messages client: sending mail server “server”: receiving mail server PART 02 프로토콜 user agent user agent user agent user agent user agent user agent SMTP SMTP SMTP mail server mail server mail server Electronic Mail: mail servers

  45. PART 02 프로토콜 chapter 04 응용계층 • SMTP 동작 • SMTP 동작의 세 가지 단계 • SMTP 클라이언트와 서버 간의 연결이 확립된다. • 전자메일이 연결을 따라 전송된다. • 연결이 해제된다. • SMTP Command , Reply

  46. Command From Client To Server PART 02 프로토콜

  47. Reply From Server to Client PART 02 프로토콜 -Quite similar with FTP -For more command and reply , refer to RFC 2821 http://rfc.net/rfc2821.html

  48. uses tcp to reliably transfer email msg from client to server, port 25 direct transfer: sending server to receiving server three phases of transfer handshaking (greeting) transfer of messages closure command/response interaction commands: ASCII text response: status code and phrase messages must be in 7-bit ASCII PART 02 프로토콜 Electronic Mail: smtp [RFC 821]

  49. PART 02 프로토콜 Sample smtp interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection

  50. PART 02 프로토콜 try smtp interaction for yourself: • telnet servername 25 • see 220 reply from server • enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send email without using email client (reader)

More Related