51
PART 02 프프프프 1 프프프 프프프프 chapter 07 프프프프 프프프

컴퓨터 네트워크 chapter 07 응용계층 임효택

  • Upload
    rumer

  • View
    87

  • Download
    6

Embed Size (px)

DESCRIPTION

컴퓨터 네트워크 chapter 07 응용계층 임효택. OSI 참조 모델 응용. 7.1.1 세션 계층 세션 계층의 개관 OSI 참조 모델 5 계층에 해당 전송 제어 기능을 상위 계층에 제공 서비스 측면의 기능들을 제공하는 데 목적이 있다 . 제공 서비스 기본적으로 연결형 서비스를 제공한다 . 전송되는 데이터의 순서는 중요한 의미를 가진다 . 지원되는 서비스의 종류가 많다 . 기능단위와 사용자가 필요한 기능단위를 선택하여 사용할 수 있다. 세션 계층. 연결형 서비스 과정 - PowerPoint PPT Presentation

Citation preview

Page 1: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

1

컴퓨터 네트워크

chapter 07 응용계층

임효택

Page 2: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

2

OSI 참조 모델 응용

7.1.1 세션 계층

세션 계층의 개관

OSI 참조 모델 5 계층에 해당 전송 제어 기능을 상위 계층에 제공 서비스 측면의 기능들을 제공하는 데 목적이 있다 .

제공 서비스

기본적으로 연결형 서비스를 제공한다 . 전송되는 데이터의 순서는 중요한 의미를 가진다 . 지원되는 서비스의 종류가 많다 . 기능단위와 사용자가 필요한 기능단위를 선택하여 사용할 수 있다 .

Page 3: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

3

세션 계층

연결형 서비스 과정– 연결 설정 단계 , 데이터 전송 단계 , 연결 해제 단계로 나눈다 .

세션 연결의 특성

– (a) 트랜스포트와 세션 연결이 일대 일로 대응한다 . ( 가장 일반적 )

– (b) 다시 새로운 세션 연결을 시작할 때 트랜스포트 연결을 그대로 사용 할수 있다 .

– (c) 하나의 세션 연결에 대하여 트랜스포트 연결이 중간에 해제되었다가 다시 연결되어 사용된다 .

Page 4: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

4

대화 관리 (Dialogue management)

[ 그림 7.2] 세션 계층의 데이터 전송 방식

세션 계층

Page 5: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

5

동기 (Synchronization)

– 두 세션 사용자 간의 데이터를 교환하다가 문제가 발생하였을때 미리 정해 놓은 동기점으로 되돌아가 다시 시작하도록 하는 것 .

– 대동기점 , 소동기점

[ 그림 7.3] 세션 계층에서의 동기점

[ 그림 7.4] 대동기점과 소동기점

세션 계층

Page 6: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

6

액티비티 (Activity)

– 세션 사용자 간에 어떤 일의 논리적인 단위를 표시하기 위한 것 .– 독립적인 특성을 가지며 영향을 받지 않는다 .

[ 그림 7.5] 세션 계층 액티비티와 동기점

세션 계층

Page 7: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

7

토큰 (Token)

– 어떠한 서비스를 수행할 수 있는 권리를 나타내는 것» 데이터토큰 , 해제 토큰 , 소동기 토큰 , 대동기 /액티비티

토큰

서비스 프리미티브와 SPDU

서비스 프리미티브는 ISO 8326 또는 X.215 에 정의됨 . SPDU 는 ISO8327, X.255 에 정의 됨 . 에러검출 및 복구의 기능이 없다 .

[ 그림 7.6] 세션 계층에서 SPDU 의 교환 예 ( 연결 설정 )

세션 계층

Page 8: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

8

7.1.2 OSI 응용계층

응용 서비스 요소

응용 프로그램이 필요로 하는 최소의 단위를 응용 서비스 요소라 한다 .

엔티티 : 특정한 하나의 응용 프로그램에 필요한 통신 서비스 요소들의 결합형태

[ 그림 7.8] 응용 엔티티 구조

Page 9: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

9

OSI 응용계층

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)

Page 10: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

10

chapter 04 응용계층

메시지 처리 시스템 (MHS) 서비스

대표적인 예 : 전자우편

파일 전송 , 접근과 관리 (FTAM)

디렉토리 서비스

각 자원의 위치에 관계하는 명칭을 알고 필요한 어드레스를 요구하는 기능

가상 터미널 서비스

가상 터미널이 응용 프로그램 또는 터미널 이용자에게 제공하는 서비스

OSI 관리

기타

Page 11: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

11

Transport service requirements of common apps

Application

file transfere-mail

Web documentsreal-time audio/video

stored audio/videointeractive games

financial apps

Data loss

no lossno lossloss-tolerantloss-tolerant

loss-tolerantloss-tolerantno loss

Bandwidth

elasticelasticelasticaudio: 5Kb-1Mbvideo:10Kb-5Mbsame as above few Kbps upelastic

Time Sensitive

nononoyes, 100’s msec

yes, few secsyes, 100’s msecyes and no

Page 12: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

12

Internet 응용 프로토콜과 트랜스포트 프로토콜

Application

e-mailremote terminal access

Web file transfer

streaming multimedia

remote file serverInternet telephony

Applicationlayer protocol

smtp [RFC 821]telnet [RFC 854]http [RFC 2068]ftp [RFC 959]proprietary(e.g. RealNetworks)NSFproprietary(e.g., Vocaltec)

하부의 transport protocol

TCPTCPTCPTCPTCP or UDP

TCP or UDPtypically UDP

Page 13: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

13

7.2 TCP/IP 응용

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

www.someSchool.edu/someDept/pic.gif

- Web

Page 14: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

14

HTTP

HTTP: HyperText Transfer Protocol

Web 의 응용계층 프로토콜 client/server model

client: 웹 객체를 요구하고 , 받고 , 디스플에이하는 브라우져

server: 요구에 대한 응답으로 객체를 보내는 웹 서버

http1.0: RFC 1945 http1.1: RFC 2068

Web client

Web Server

Web client

http request

http re

quest

http response

http re

sponse

Page 15: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

15

HTTP

http: TCP transport service: 클라이언트는 포트번호 80 을 가진

서버로 TCP 연결을 시도 서버는 클라이언트의 TCP 연결을

받음 http 메시지가 (application-layer

protocol messages) browser (http client) 와 Web server (http server) 사이에 교환

TCP 연결이 해제

http is “stateless” 서버는 과거의 클라이언트

요청에 관한 정보를 유지하지 않음

“state” 를 유지하는 프로토콜은 복잡하다 !

과거 기록이나 상태가 유지되어야 함

Server 또는 client 가 고장이 나면 , “state” 정보가 일관적이지 못할수도 있으며 다시 협의가 이루어져야 함

참고

Page 16: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

16

Nonpersistent Connection

사용자가 URL www.someSchool.edu/someDepartment/home.index 을 친다고 가정

1a. HTTP 클라이언트는 HTTP 의 기본 포트 번호인 번호 80 을 통해 www. someSchool.edu 서버로 TCP 연결을 시도

2. HTTP 클라이언트는 1 단계에서 설정된 TCP 연결의 소켓을 통해 서버에게 HTTP 요청 메시지를 보냄

1b. http server 는 port 80 번을 통해 요청을 “ accepts” 하고 클라이언트에게 응답

3. HTTP 서버는 1 단계에서 설정된 연결의 소켓을 통하여 요청 메시지를 받음 . 저장 장치로부터 /someDepartment/home.index 객체를 추출 . HTTP 응답 메시지에 그 객체를 캡슐화 . 응답 메시지를 소켓을 통해 클라이언트에게 보냄

time

(home.index 는 text 와 10 개의 jpeg image 에 대한 링크를 가짐 )

Page 17: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

17

5. HTTP 클라이언트는 응답 메시지를 받음 . 클라이언트는 응답 메시지로부터 파일을 추출 . HTML 파일을 파싱하고 , 10 개의 JPEG 객체에 대한 링크를 찾음

6. 그 이후에 참조되는 각 JPEG 객체에 대하여 위의 다섯 단계를 반복

4. TTP 서버는 TCP 에게 TCP 연결을 해제

time

Nonpersistent Connection

Page 18: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

18

Non-Persistent HTTP: 응답시간

RTT 정의 : 클라이언트가 패킷을 보내어 서버에서 다시 되돌아오는데 걸리는 시간

응답시간 : TCP 연결을 위해 1 RTT HTTP 요청에 대한 결과를 받기

위해 1 화일 전송시간 (transmission

time)total = 2RTT+transmit time

time to transmit file

initiate TCPconnection

RTT

requestfile

RTT

filereceived

time time

Page 19: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

19

Persistent HTTP

Nonpersistent HTTP : 객체당 2 RTT 가 필요 각 TCP 연결에 대한 OS 에 대한

부하 클라이언트는 링크된 객체를

가져오기 위해 자주 여러 개의 TCP 연결을 맺음

Persistent HTTP 서버는 HTTP 응답을 보낸 후 TCP

연결을 그대로 유지 이후의 HTTP 메시지는 이전의 TCP

연결을 통해 주고 받음

Persistent without pipelining: 클라이언트는 이전의 요청에 대한

응답을 받은 후에 새로운 요청을 하게 됨

각 객체에 대하여 1 RTT 필요Persistent with pipelining: HTTP/1.1 에서 기본으로 사용 클라이언트는 링크된 객체를

인식하게 되면 여러 개의 요청을 동시에 보냄

모든 링크된 객체에 대하여 약 1 RTT 필요

Page 20: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

20

http 메시지 형식 : request(요청 )

http message 의 두가지 타입 : request, response http request message:

ASCII (human-readable format)

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)

request line(GET, POST,

HEAD commands)

header lines

Carriage return, line feed

( 메시지의 끝을 나타냄 )

Page 21: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

21

http request message 의 일반적인 형식

Page 22: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

22

http 메시지 형식 : response( 응답 )

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 ...

status line( 프로토콜 상태라인 )

header lines

data, e.g., requestedhtml file

Page 23: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

23

http response 상태코드

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

응답 메시지 첫번째 라인의 상태코드

Page 24: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

24

HTTP 실행해 보기

1. 어느 웹서버로 Telnet 명령어 실행 :

80 번 포트로 TCP connection 을 설정( 입력되는 데이터는 해당 서버의 80 번 포트로 전송됨

telnet kowon.dongseo.ac.kr 80

2. GET http request 입력 :

GET /~htlim/ HTTP/1.1Host: kowon.dongseo.ac.kr

왼쪽 내용을 입력하고 Enter 키 두번 치게 되면 , GET 요청 메시지가 http 서버에 전송

3. 클라이언트는 http 서버가 보낸 응답 메시지를 보게됨

Page 25: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

25

HTTP 실행해 보기

1. Telnet으로 해보기

2. Wireshark Protocol Anayzer 로 분석하기

Page 26: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

26

Web Caches (proxy server)

client

Proxyserver

client

http request

http re

quest

http response

http re

sponse

http re

quest

http re

sponse

http requesthttp response

origin server

origin server

웹 캐슁은 왜 하나 ? 클라이언트 요청에 대한 응답시간 절감

기관 (institution) access link 의 트래픽을 절감

사용자는 브라우저에 웹 캐슁 기능을 설정

브라우저는 모든 HTTP 요청이 캐쉬로 전달됨

원하는 객체는 캐쉬에 있으면 캐쉬는 그 객체를 리턴

그렇지 않으면 캐쉬는 원래의 서버에게 객체에 대한 요청을 보내고 , 객체를 받으면 클라이언트에게 보냄

웹 캐슁 개요

Page 27: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

27

가정 : 캐쉬는 클라이언트 와 같은 네트워크 에 위치

원하는 객체가 캐쉬에 있으면 응답시간이 작아짐

원격 서버로의 트래픽이 절감

originservers

public Internet

학과 네트워크

10 Mbps LAN

1.5 Mbps access link

학과 캐쉬

Web Caches (proxy server)

Page 28: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

28

웹 캐슁의 분석가정 평균 객체 크기 = 100,000 bits 학과 브라우저에서 원격서버로의 평균

요청률 = 15/sec 학과 라우터에서 원격 서버간의 왕복

지연시간 = 2 sec결과 LAN utilization( 이용률 ) = 15% access link utilization = 100% 총 지연시간 = Internet delay + access

link delay + LAN delay = 2 sec + minutes + milliseconds

originservers

public Internet

10 Mbps LAN

1.5 Mbps access link

학과 네트워크

Page 29: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

29

해결방안 1 access link 의 대역폭을 증가 ( 예 : 10

Mbps)결과 LAN utilization( 이용률 ) = 15% access link utilization = 15% 총 지연시간 = Internet delay + access

link delay + LAN delay = 2 sec + msecs + msecs

문제점 access link 의 대역폭을 증가로 인한

비용 증가

originservers

public Internet

10 Mbps LAN

10 Mbps access link

웹 캐슁의 분석

학과 네트워크

Page 30: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

30

해결방안 2

웹 캐쉬 설치 가정 : hit rate is .4

결과 40% 객체 요청이 캐쉬에서 바로 해결 60% 객체 요청은 원격의 서버에서 해결 access link utilization 은 60% 로 감

소 , 결과적으로 무시할만한 지연시간 (가령 10 msec)

총 평균 지연시간 = Internet delay + access link delay + LAN delay = .6*(2.01) secs + .4*milliseconds < 1.4 secs

originservers

public Internet

10 Mbps LAN

1.5 Mbps access link

웹 캐슁의 분석

학과 네트워크

학과 캐쉬

Page 31: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

31

FTP(File Transfer Protocol)

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

file transfer FTPserver

FTPuser

interface

FTPclient

local filesystem

remote filesystem

사용자

Page 32: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

32

FTP: Control, Data TCP connection

ftp client 는 ftp server 의 TCP port 번호 21 에 연결시도

두개의 TCP connection 설정 : Control Connection:

클라이언트와 서버간의 명령어와 응답 메시지 교환

“out of band control” Data Connection: 클라이언트와

서버간의 파일 데이터 교환

FTPclient

FTPserver

TCP control connection

port 21

TCP data connectionport 20

Page 33: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

33

ftp commands, responses

명령어 (command) 예 : control connection 상에서 ASCII

text 형태로 클라이언트에서 서버로 전송

USER username PASS password LIST : 현재 디렉토리내의

화일목록 표시 RETR filename : 파일 가져오기 STOR filename : 파일 보내기

응답 코드 예 상태코드와 설명 (HTTP 와 유사 )

331 Username OK, password required

125 data connection already open; transfer starting

425 Can’t open data connection

452 Error writing file

Page 34: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

34

TCP Connection Establishment

Page 35: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

35

Ethereal Captured Screen For FTP

Page 36: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

36

The Flow of the Captured Packets-Control connection

Works Done here

1. Send username seongyee2. Response with 331 (PasswordRequired)

3. Send password password4. Response with 230 (Successful Login)

5. Change Directory with CWD 6. Response with 250 (CWD command successed)

7. List Current Directory with PWD8. Response with 257 (List Current Directory)

9. Set the data type to I10. Response with 200 (Type Set to I)

11. Set to Passive Mode12. Response with 277(Entering Passive Mode)

13. Download Chap2.ppt by sending STOR Command

14. Response with 125(Data Connection Opened)15. Response with 226(Transfer complete)Data

ConnectionExplain Next Slide

Page 37: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

37

Packet Capture For Data Connection

Another TCP connection where 192.168.112.94:3287 to 203.241.187.71:1163 Established For data connection

Page 38: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

38

chapter 04 응용계층

E-mail( 전자메일 )

컴퓨터 사용자가 동일한 컴퓨터 또는 네트워크에 연결된 다른 컴퓨터 사용자와 보통의 메일 서비스를 전산망 상에서 온라인으로 사용할 수 있는 서비스 .

TCP/IP 는 전자메일을 주고받기 위한 SMTP 를 정의한다 .

[ 그림 7.14] 은 TCP/IP 를 사용한 전자메일의 전체적인 구성도를 보여준다 .

[ 그림 7.14] 인터넷 전자메일의 구성

Page 39: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

39

전자 메일

세가지 주요 구성요소 : 사용자 에이젼트 (user agent ) 메일 서버 (mail server ) SMTP(simple mail transfer

protocol)

User Agent “mail reader” 메일 메시지를 작성 , 편집 , 읽는

기능포함 예 : Eudora, Outlook, elm,

Netscape Messenger 송신 /수신되는 메시지는 서버에 저장

user mailbox

outgoing message queue

mailserver

useragent

useragent

useragent

mailserver

useragent

useragent

mailserver

useragent

SMTP

SMTP

SMTP

Page 40: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

40

Electronic Mail: mail servers

Mail Servers Mailbox: 수신 메시지를 포함 ( 아직 읽혀지지 않은 메일 )

message queue: 송신하게 될 mail message 포함

smtp protocol : 서버간의 메일 전송 프로토콜 client: 송신측 mail server server: 수신측 mail server

mailserver

useragent

useragent

useragent

mailserver

useragent

useragent

mailserver

useragent

SMTP

SMTP

SMTP

Page 41: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

41

SMTP

SMTP 동작

SMTP 동작의 세 가지 단계

1. SMTP 클라이언트와 서버 간의 연결이 확립된다 .2. 전자메일이 연결을 따라 전송된다 .3. 연결이 해제된다 .

SMTP Command , Reply

Page 42: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

42

SMTP 동작예

S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <[email protected]> S: 250 [email protected]... Sender ok C: RCPT TO: <[email protected]> S: 250 [email protected] ... 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

Page 43: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

43

SMTP 동작 이해하기

telnet servername 25 서버로부터 220 reply 을 받음 HELO, MAIL FROM, RCPT TO, DATA, QUIT 명령어 입력

- 위 절차로 email agent 사용하지 않고 email 을 전송할 수 있다

Page 44: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

44

SMTP 의 Ethereal 스크린 캡쳐

Page 45: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

45

SMTP 동작 흐름

Steps 1. Open TCP connection to port 25 of the server2. Server Response with code 220 (Service Ready)3. Client send command EHLO (Client authentication)4. Server Response with code 250 (OK)5. Client send command AUTH PLAIN 6. Server Response with code 235 (Authentication successes)7. Sender send command MAIL ( Enter sender name) 8. Server Response with code 250 (OK)9. Sender send command RCPT TO ( Enter recipient name)10.Server Response with code 250 (OK)11.Sender send command DATA (Beginning Transmission)12.Server Response with code 354 (Start Email Input)13.Sender send command Message Body (The body of the msg)14.Server Response with code 250 (OK)15.TCP Connection Closed

Page 46: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

46

Mail access protocols

Mail access protocol: 메일 서버로부터 이메일 가져오는 프로토콜 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.

useragent

sender’s mail server

useragent

SMTP SMTP POP3 orIMAP

receiver’s mail server

Page 47: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

47

POP3 protocol

인증단계 client commands:

user: declare username pass: password

server responses +OK -ERR

처리단계 , client: list: list message numbers retr: retrieve message by

number dele: delete quit

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

S: +OK POP3 server ready C: user alice S: +OK C: pass hungry S: +OK user successfully logged on

Page 48: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

48

7.2.4 DNS

DNS (Domain Name System) 많은 도메인 네임 서버가 계층적으로 구성된 분산 데이터베이스

IP 주소는 사람이 기억하기에 어려워 기억하기 쉽게 바꾸어 놓은 것이 도메인 이름이다 .

Domain Name 을 IP 주소로 또는 그 반대로 바꿔 주는 것을 DNS(Domain Name System) 이라 한다 .

도메인 네임

– 도메인 네임의 구조 : 호스트 이름 . 소속단체 . 단체성격 . 소속국가

Page 49: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

49

Root DNS Servers

com DNS servers org DNS servers edu DNS servers

poly.eduDNS servers

umass.eduDNS servers

yahoo.comDNS servers

amazon.comDNS servers

pbs.orgDNS servers

분산 , 계층화된 데이타베이스

클라이언트가 www.amazon.com 에 대한 IP 주소를 알고자 할때 ; 클라이언트는 com DNS 서버를 알기위해 루트서버에게 질의 클라이언트는 amazon.com DNS 서버를 알기위해 com DNS

서버에게 질의 클라이언트는 www.amazon.com 의 IP 주소를 알기위해

amazon.com DNS 서버에게 질의

Page 50: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 01 개념50

한국의 도메인 네임 계층구조

Page 51: 컴퓨터 네트워크  chapter 07  응용계층 임효택

PART 02 프로토콜

51

requesting hostcs.dongseo.ac.kr

gaia.cs.umass.edu

root DNS server

local DNS serverKowon.dongseo.ac.kr

1

23

4

5

6

authoritative DNS serverdns.cs.umass.edu

78

TLD DNS server

DNS 예제

cs.dongseo.ac.kr 가 gaia.cs.umass.edu 의 IP 주소를 원할때

DNS Caching 지연시간을 줄이기 위해 사용