/ (application layer protocols) http ftp smtp pop dns 2

Similar documents
0. 들어가기 전

chapter4

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

Remote UI Guide

1217 WebTrafMon II

SMB_ICMP_UDP(huichang).PDF

Network seminar.key

<4D F736F F F696E74202D E20C0CEC5CDB3DD20C0C0BFEB20B9D720BCADBAF1BDBA20B1E2BCFA E >

TCP.IP.ppt

6강.hwp

FMX M JPG 15MB 320x240 30fps, 160Kbps 11MB View operation,, seek seek Random Access Average Read Sequential Read 12 FMX () 2

Subnet Address Internet Network G Network Network class B networ

hd1300_k_v1r2_Final_.PDF

untitled



Analyst Briefing

슬라이드 제목 없음

Microsoft PowerPoint - ch02_인터넷 이해와 활용.ppt

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C

Secure Programming Lecture1 : Introduction

PowerPoint 프레젠테이션

Voice Portal using Oracle 9i AS Wireless

Assign an IP Address and Access the Video Stream - Installation Guide

°í¼®ÁÖ Ãâ·Â

Sena Device Server Serial/IP TM Version

10X56_NWG_KOR.indd

자바-11장N'1-502

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (

Microsoft PowerPoint - 13_appl.ppt

○ 제2조 정의에서 기간통신역무의 정의와 EU의 전자커뮤니케이션서비스 정의의 차이점은

ARMBOOT 1

thesis-shk

0125_ 워크샵 발표자료_완성.key


VZ94-한글매뉴얼

Cache_cny.ppt [읽기 전용]

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

SRC PLUS 제어기 MANUAL

6주차.key

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate

PowerPoint 프레젠테이션

Chap7.PDF

Solaris Express Developer Edition

소개 TeraStation 을 구입해 주셔서 감사합니다! 이 사용 설명서는 TeraStation 구성 정보를 제공합니다. 제품은 계속 업데이트되므로, 이 설명서의 이미지 및 텍스트는 사용자가 보유 중인 TeraStation 에 표시 된 이미지 및 텍스트와 약간 다를 수


Web Application Hosting in the AWS Cloud Contents 개요 가용성과 확장성이 높은 웹 호스팅은 복잡하고 비용이 많이 드는 사업이 될 수 있습니다. 전통적인 웹 확장 아키텍처는 높은 수준의 안정성을 보장하기 위해 복잡한 솔루션으로 구현

Microsoft PowerPoint - net2.

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

TTA Verified : HomeGateway :, : (NEtwork Testing Team)

무선인터넷 멀티 미디어 메세징 시스템

SLA QoS

UDP Flooding Attack 공격과 방어

슬라이드 1

Backup Exec

Portal_9iAS.ppt [읽기 전용]

Page 2 of 6 Here are the rules for conjugating Whether (or not) and If when using a Descriptive Verb. The only difference here from Action Verbs is wh

歯규격(안).PDF

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

cam_IG.book


Microsoft PowerPoint - ch03ysk2012.ppt [호환 모드]

PowerPoint 프레젠테이션

歯I-3_무선통신기반차세대망-조동호.PDF

CD-RW_Advanced.PDF

歯이시홍).PDF

제20회_해킹방지워크샵_(이재석)

Mstage.PDF

SS Term #3.doc

Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

Microsoft Word doc

untitled

bn2019_2

(SW3704) Gingerbread Source Build & Working Guide

LXR 설치 및 사용법.doc

FileMaker 15 WebDirect 설명서

3ÆÄÆ®-14


휠세미나3 ver0.4

본문서는 초급자들을 대상으로 최대한 쉽게 작성하였습니다. 본문서에서는 설치방법만 기술했으며 자세한 설정방법은 검색을 통하시기 바랍니다. 1. 설치개요 워드프레스는 블로그 형태의 홈페이지를 빠르게 만들수 있게 해 주는 프로그램입니다. 다양한 기능을 하는 플러그인과 디자인

Microsoft PowerPoint - CoolMessenger_제안서_라이트_200508

Microsoft PowerPoint - XP Style

DocsPin_Korean.pages

슬라이드 1


APOGEE Insight_KR_Base_3P11


본교재는수업용으로제작된게시물입니다. 영리목적으로사용할경우저작권법제 30 조항에의거법적처벌을받을수있습니다. [ 실습 ] 스위치장비초기화 1. NVRAM 에저장되어있는 'startup-config' 파일이있다면, 삭제를실시한다. SWx>enable SWx#erase sta

시스코 무선랜 설치운영 매뉴얼(AP1200s_v1.1)

Intra_DW_Ch4.PDF

PCServerMgmt7

untitled

Chap06(Interprocess Communication).PDF

PowerPoint 프레젠테이션

< B3E2C1A632C8B8BFF6B5E531B1DE42C7FC2E687770>

thesis

歯홍원기.PDF

wp1_ hwp

3rd Edition: Chapter 2

Output file

Transcription:

Chapter 2: Application Layer 1

/ (application layer protocols) http ftp smtp pop dns 2

),, (TCP,UDP) application transport network data link physical application transport network data link physical application transport network data link physical 3

( process): Interprocess communication : : : () () E-: : 4

- : : : ) application transport network data link physical application transport network data link physical 5

API: application programming interface - (socket): API Q:? IP address port number lots more on this later. 6

? (reliability) /, E- (Bandwidth) (elastic) (Delay) 7

file transfer e-mail Web documents real-time audio/video stored audio/video interactive games financial apps no loss no loss loss-tolerant loss-tolerant loss-tolerant loss-tolerant no loss elastic elastic elastic audio: 5Kb-1Mb video:10kb-5mb same as above few Kbps up elastic no no no yes, 100 s msec yes, few secs yes, 100 s msec yes and no 8

TCP : (connectionoriented) (reliable transport) (flow control) (congestion control) :, UDP: Q: UDP? ( ) 9

: e-mail remote terminal access Web file transfer streaming multimedia remote file server Internet telephony smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g. RealNetworks) NSF proprietary (e.g., Vocaltec) TCP TCP TCP TCP TCP or UDP TCP or UDP typically UDP 10

(Web page): HTML + URL (object) URL: / ( ): MS Internet Explorer Netscape Communicator : MS Internet Information Server www.someschool.edu/somedept/pic.gif 11

: http http: hypertext transfer protocol client/server model http1.0: RFC 1945 http1.1: RFC 2068 PC running Explorer http request http response http request http response Server running NCSA Web server Mac running Navigator 12

http http: TCP TCP (80 ) ( ) http TCP http stateless Cf. (cookies) 13

time http 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. 2. http client sends http request message (containing URL) into TCP connection socket (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 3. http server receives request message, forms response message containing requested object (somedepartment/home.index), sends message into socket 14

http () time 5. http client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects 4. http server closes TCP connection. 15

HTTP/1.0 HTTP/1.1 HTTP/1.0 server parses request, responds, and closes TCP connection 2 RTT slow start O/H HTTP/1.1 TCP HTML (pipelining). RTT slow start O/H ( ) But most 1.0 browsers use parallel TCP connections. 16

http : request two types of http messages: request, response http request message: ASCII request line (GET, POST, HEAD commands) header lines GET /somedir/page.html HTTP/1.0 User-agent: Mozilla/4.0 Accept: text/html, image/gif,image/jpeg Accept-language:fr Carriage return, line feed indicates end of message (extra carriage return, line feed) 17

http request : general format 18

http message format: respone status line (protocol status code status phrase) data, e.g., requested html file header lines 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... 19

http response status codes In first line in server->client response message. 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 20

Trying out http (client side) for yourself 1. Telnet to your favorite Web server: telnet www.eurecom.fr 80 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 2. Type in a GET http request: GET /~ross/index.html HTTP/1.0 By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to http server 3. Look at response message sent by http server! 21

-: (authentication) client server stateless: request ( ) usual http request msg 401: authorization req. WWW authenticate: authorization: name, password authorization: header line in request authorization, WWW authenticate:. usual http request msg + Authorization:line usual http response msg usual http request msg + Authorization:line usual http response msg time 22

-: (cookies) Set-cookie: 1678453 request cookie: 1678453, client usual http request msg usual http response + Set-cookie: # usual http request msg cookie: # usual http response msg usual http request msg cookie: # usual http response msg server 23

-: conditional GET : If-modified-since: <date> : : HTTP/1.0 304 Not Modified http request msg If-modified-since: <date> http response HTTP/1.0 304 Not Modified http request msg If-modified-since: <date> http response HTTP/1.1 200 OK <data> 24

( ) : all http request Hit Miss http request http response http request http request http response http response http request http response 25

? : 1.5 Mbps 10 Mbps LAN 26

ftp: FTP FTP FTP / ftp: RFC 959 ftp server: port 21 27

ftp:, TCP 21 TCP : : out of band control FTP TCP port 21 TCP port 20 FTP : ftp state :, 28

ftp ( ): ASCII USER username PASS password LIST return list of file in current directory RETR filename retrieves (gets) file STOR filename stores (puts) file onto remote host ( ) 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 29

E- : user agent user agents mail servers mail server user agent simple mail transfer protocol: smtp SMTP SMTP mail server user agent,,, ) Eudora, Outlook, elm, Netscape Messenger mail server user agent SMTP user agent user agent 30

Electronic Mail: mail servers 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 mail server SMTP mail server user agent user agent SMTP SMTP user agent mail server user agent user agent user agent 31

Electronic Mail: smtp [RFC 821] 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 32

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 33

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) 34

smtp: final words smtp uses persistent connections smtp requires that message (header & body) be in 7-bit ascii certain character strings are not permitted in message (e.g., CRLF.CRLF). Thus message has to be encoded (usually into either base-64 or quoted printable) smtp server uses CRLF.CRLF to determine end of message Comparison with http http: pull email: push both have ASCII command/response interaction, status codes http: each object is encapsulated in its own response message smtp: multiple objects message sent in a multipart message 35

Mail message format smtp: protocol for exchanging email msgs RFC 822: standard for text message format: header lines, e.g., To: From: Subject: different from smtp commands! body the message, ASCII characters only header body blank line 36

Message format: multimedia extensions MIME: multimedia mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type MIME version method used to encode data multimedia data type, subtype, parameter declaration encoded data From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data.........base64 encoded data 37

MIME types Content-Type: type/subtype; parameters Text example subtypes: plain, html Video example subtypes: mpeg, quicktime Image example subtypes: jpeg, gif Audio exampe subtypes: basic (8-bit mu-law encoded), 32kadpcm (32 kbps coding) Application other data that must be processed by reader before viewable example subtypes: msword, octet-stream 38

Multipart Type From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=98766789 --98766789 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Dear Bob, Please find a picture of a crepe. --98766789 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data.........base64 encoded data --98766789-- 39

Mail access protocols user agent SMTP SMTP POP3 or IMAP user agent sender s mail server receiver s mail server SMTP: delivery/storage to receiver s server Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939] authorization (agent <-->server) and download IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: Hotmail, Yahoo! Mail, etc. 40

POP3 protocol authorization phase client commands: user: declare username pass: password server responses +OK -ERR transaction phase, client: list: list message numbers retr: retrieve message by number dele: delete quit S: +OK POP3 server ready C: user alice S: +OK C: pass hungry S: +OK user successfully logged on C: list S: 1 498 S: 2 912 S:. C: retr 1 S: <message 1 contents> S:. C: dele 1 C: retr 2 S: <message 1 contents> S:. C: dele 2 C: quit S: +OK POP3 server signing off 41