Presentation is loading. Please wait.

Presentation is loading. Please wait.

제 7 장 인터넷 프로토콜 : IP 7.1 데이터그램 7.2 단편화 7.3 옵션 7.4 검사합 7.5 IP 설계 7.6 요약.

Similar presentations


Presentation on theme: "제 7 장 인터넷 프로토콜 : IP 7.1 데이터그램 7.2 단편화 7.3 옵션 7.4 검사합 7.5 IP 설계 7.6 요약."— Presentation transcript:

1 제 7 장 인터넷 프로토콜 : IP 7.1 데이터그램 7.2 단편화 7.3 옵션 7.4 검사합 7.5 IP 설계 7.6 요약

2 인터넷 프로토콜(IP) TCP/IP에서 사용하는 전송 메커니즘 신뢰성 없는 비연결형 데이터그램 프로토콜
최선노력(best effort) 전달 서비스 오류 검사 및 추적 기능을 수행하지 않음 각 데이터그램은 독립적으로 처리 각 데이터그램은 서로 다른 경로로 전달될 수 있음 각 데이터그램은 순서가 바뀌어 전달될 수 있음

3 7.1 데이터그램(datagram) IP 계층의 패킷

4 IP 데이터그램 가변 길이 패킷 헤더와 데이터 부분으로 구성 헤더 : 20 ~ 60 바이트 길이, 라우팅과 전달에 필요한 정보
헤더 내의 필드 버전(Ver) - IP 프로토콜 버전(4비트) 헤더길이(HLEN) - 헤더의 전체 길이를 4 바이트 단위로 표시(4 비트)

5 IP 데이터그램(계속) 서비스 유형(Service type) - (8 비트) 라우터에 의해 처리하는 방법
3 bit는 우선 순위, 4 bit는 서비스 유형

6 IP 데이터그램(계속) 우선 순위(precedence) 3 bit(000 ~ 111) 버전 4에서는 사용하지 않음
혼잡과 같은 문제가 발생하였을 경우 데이터그램의 우선 순위 정의

7 IP 데이터그램(계속) TOS Bits Description 0000 Normal (default)
TOS(type of service) 비트 서비스 유형 TOS Bits Description Normal (default) Minimize cost Maximize reliability Maximize throughput Minimize delay

8 IP 데이터그램(계속) 응용 프로그램들의 기본 서비스 유형 값 Protocol TOS Bits Description
ICMP Normal BOOTP Normal NNTP Minimize cost IGP Maximize reliability SNMP Maximize reliability TELNET Minimize delay FTP (data) Maximize throughput FTP (control) Minimize delay TFTP Minimize delay SMTP (command) Minimize delay SMTP (data) Maximize throughput DNS (UDP query) Minimize delay DNS (TCP query) Normal DNS (zone) Maximize throughput

9 IP 데이터그램(계속) 전체 길이(total length) 16 bit 필드(65,535 까지 표현)
데이터 길이 = 전체 길이 – 헤더 길이 이더넷 프레임에서 작은 데이터그램의 캡슐화

10 IP 데이터그램(계속) 식별(Identification) – 단편화에 사용 플래그(flag) – 단편화에 사용
단편 옵셋(fragmentation offset) – 단편화에 사용 수명(time to live) – 데이터그램의 수명

11 IP 데이터그램(계속) 프로토콜(protocol) – IP 계층의 서비스를 사용하는 상위 계층 프로토콜
검사합(checksum) – 오류 확인 발신지 주소 (source address) 목적지 주소 (destination address) OSPF 89 IPv6 41 UDP 17 EGP 8 TCP 6 IGMP 2 ICMP 1 protocol address

12 7.2 단편화 네트워크가 사용하는 프로토콜에 따라 프레임 형식과 크기가 서로 다르다
각 네트워크에서 전달되는 최대 전송 길이를 MTU (Maximum Transfer Unit) 라고 함 MTU 길이에 따라 나누어 보내는 것을 단편화 (fragmentation) 라고 함

13 단편화(계속) MTU(Maximum Transfer Unit)

14 단편화(계속) 서로 다른 네트워크의 MTU Protocol MTU Hyperchannel 65,535
Token Ring (16 Mbps) 17,914 Token Ring (4 Mbps) 4,464 FDD ,352 Ethernet ,500 X PPP

15 단편화(계속) 단편화와 관련된 필드 식별자(identification) – 단편들은 같은 식별자 값을 가짐
플래그(flag) – 3 비트 필드

16 단편화(계속) 단편화 옵셋(Fragmentation offset) : 13 비트 필드
전체 데이터그램에서 단편의 상대적인 위치(8 바이트 단위) 단편화 예

17 단편화(계속) 상세한 단편화 예

18 7.3 옵션 IP 데이터그램 헤더 내의 가변 부분(최대 40바이트) 옵션 형식

19 옵션(계속) 코드 필드(8 비트) : 고정 길이 길이 필드(8 비트) : 고정길이 데이터 필드 : 가변 길이 복사(copy)
단편화에 옵션을 포함시킨 것인지 제어 클래스(class) 옵션의 목적을 나타냄 번호(number) 옵션 유형 길이 필드(8 비트) : 고정길이 옵션의 전체 길이 데이터 필드 : 가변 길이

20 옵션(계속) 옵션 유형

21 옵션(계속) 무연산(No Operation) 옵션 사이의 여백을 채워줌(1byte option)

22 옵션(계속) 종료 옵션(End of Option) 옵션 필드의 패딩 목적으로 사용 (1byte option)

23 옵션(계속) 경로 기록(Record Route) 옵션 데이터그램을 처리한 인터넷 라우터들 기록

24 옵션(계속) 데이터그램이 라우터를 경유하여 이동하는 과정

25 옵션(계속) 엄격한 발신지 경로(Strict Source Route) 옵션
데이터그램이 거쳐야할 경로를 미리 지정하기 위해 사용 데이터그램은 옵션에 정의된 모든 라우터 방문

26 옵션(계속) 엄격한 발신지 경로 개념

27 옵션(계속) 느슨한 발신지 경로(Loose Source Route) 옵션
엄격한 발신지 경로와 비슷하지만 리스트에 없는 라우터도 방문 가능

28 옵션(계속) 타임스탬프(Timestamp) 옵션 라우터가 데이터그램을 처리하는 시간 기록
세계 표준시 이용 millisecond 단위 표시

29 옵션(계속) 타임스탬프에서 플래그 사용

30 옵션(계속) 타임스탬프 개념

31 7.4 검사합 TCP/IP 프로토콜에 의해 사용되는 오류 검출 방법

32 검사합(계속) 1의 보수를 이용한 검사합

33 검사합(계속) IP 패킷의 검사합 예

34 7.5 IP 설계 IP 구성 요소 헤더 추가 모듈 처리 모듈 큐 라우팅 테이블 라우팅 모듈 MTU 테이블 단편화 모듈
재조립 모듈

35 IP 설계(계속) IP 구성 요소

36 IP 설계(계속) 헤더 추가 모듈(Header-Adding Module) 알고리즘
Receive: data, destination address 1. Encapsulate the data in an IP datagram. 2. Calculate the checksum and insert it in the checksum field. 3. Send the data to the corresponding input queue. 4. Return.

37 IP 설계(계속) 처리 모듈(Processing Module) 알고리즘 Processing Module
1. Remove one datagram from one of the input queues. 2. If (destination address is 127.X.Y.Z or matches one of the local addresses) 1. Send the datagram to the reassembly module. 2. Return. 3. If (machine is a router) 1. Decrement TTL. 4. If (TTL less than or equal to zero) 1. Discard the datagram. 2. Send an ICMP error message. 3. Return. 5. Send the datagram to the routing module. 6. Return.

38 IP 설계(계속) 큐(Queue) – 입/출 큐 라우팅 테이블 : 패킷의 다음 홉 주소 결정하기 위해 라우팅 모듈이 사용
라우팅 모듈 : 6장 참조 MTU 테이블 : 단편화 모듈이 특정 인터페이스의 MTU를 찾기 위해 사용

39 IP 설계(계속) 단편화 모듈(Fragmentation Module)
Receive: an IP packet from routing module 1. Extract the size of the datagram. 2. If (size > MTU of the corresponding network) 1. If (D (do not fragment) bit is set) 1. Discard the datagram. 2. Send an ICMP error message 3. Return. 2. Else 1. Calculate the maximum size. 2. Divide the datagram into fragments. 3. Add header to each fragment. 4. Add required options to each fragment. 5. Send the datagrams. 6. Return. 3. Else 1. Send the datagram. 4. Return.

40 IP 설계(계속) 재조립 테이블(Reassembly table) 재조립 모듈에 의해 사용 재조립 테이블

41 IP 설계(계속) 재조립 테이블 필드 상태(state) : FREE 또는 IN-USE IP 주소 : 발신지 주소
데이터그램 ID : 단편을 구분하는 번호 타임 아웃 : 단편이 도착해야 하는 시간 단편 : 연결 리스트의 포인터

42 IP 설계(계속) 재조립 모듈(Reassembly Module)
Receive: an IP datagram from the processing module 1. If (offset value is zero and the M bit is 0) 1. Send the datagram to the appropriate queue. 2. Return. 2. Search the reassembly table for the corresponding entry. 3. If (not found) 1. Create a new entry.

43 IP 설계(계속) 재조립 모듈(Reassembly Module) (계속)
4. Insert the fragment at the appropriate place in the link list. 1. If(all fragments have arrived) 1. Reassemble the fragments. 2. Deliver the datagram to the corresponding upper layer protocol. 3. Return. 2. Else 1. Check the time-out. 2. If(time-out expired) 1. Discard all fragments. 2. Send an ICMP error message(see chapter 9). 5. return

44 7.6 요약


Download ppt "제 7 장 인터넷 프로토콜 : IP 7.1 데이터그램 7.2 단편화 7.3 옵션 7.4 검사합 7.5 IP 설계 7.6 요약."

Similar presentations


Ads by Google