Chapter 18 - William Stallings, Data and Computer Communications, 8/e

Similar documents
Microsoft PowerPoint - 06-IPAddress [호환 모드]

슬라이드 제목 없음

슬라이드 제목 없음

TCP.IP.ppt

[ 네트워크 1] 3 주차 1 차시. IPv4 주소클래스 3 주차 1 차시 IPv4 주소클래스 학습목표 1. IP 헤더필드의구성을파악하고요약하여설명할수있다. 2. Subnet ID 및 Subnet Mask 를설명할수있고, 각클래스의사용가능한호스트수와사설 IP 주소및네트

bn2019_2

Microsoft Word doc

Subnet Address Internet Network G Network Network class B networ

Microsoft PowerPoint - tem_5

슬라이드 1

SMB_ICMP_UDP(huichang).PDF

UDP Flooding Attack 공격과 방어

IP 심화 라우팅프로토콜적용시 라우팅테이블에서 이니셜이있는네트워크를설정하는것 : onnected 직접연결된네트워크를의미한다. 그러므로라우팅은 나는이런네트워크와연결되어있다. 를직접연결된라우터들에게알려주는것 1>en 1#conf t 1(config)#router rip 1

Network seminar.key

Chapter11OSPF

<3130C0E5>

슬라이드 1

슬라이드 1

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 (

SRC PLUS 제어기 MANUAL

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

2009 학년도 2 학기통신프로토콜 Quiz 모음 ( 인터넷정보과 1 학년 C/G 반 ) 담당교수 : 권춘우 [Quiz #1] 통신기초와관련한다음물음에답하라. 1. 통신이라함은정보원 ( 송신자 / 수신자 ) 간정보를전송매체를통해전달하는것을의미한다. 그래서정보원 (sou

2. 인터네트워킹 서로떨어져있는각각의수많은네트워크들을연결하여하나의네트워크처럼연결하여사용할수있도록해주는것 3. 인터네트워킹에필요한장비 1 리피터 (Repeater) - 데이터가전송되는동안케이블에서신호의손실인감쇄 (Attenuation) 현상이발생하는데, 리피터는감쇄되는신

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

BGP AS AS BGP AS BGP AS 65250

OSI 참조 모델과 TCP/IP

untitled

°í¼®ÁÖ Ãâ·Â

개요 IPv6 개요 IPv6 주소 IPv4와공존 IPv6 전환기술 (Transition Technologies)

GRE(Generic Routing Encapsulation) GRE는 Cisco에서개발한터널링프로토콜으로써특정네트워크망에서새로운 IP 헤더를인캡슐레이션하여패켓을전송하는 VPN 기능을제공한다. GRE 터널링을이용하여패켓을전송하면, 데이터를암호화하지않기때문에보안적으로는취

Microsoft PowerPoint _TCP_IP

Microsoft PowerPoint - o8.pptx

歯김병철.PDF

Schedule

Microsoft PowerPoint - 02 IPv6 Operation.ppt [호환 모드]

PowerPoint 프레젠테이션

2009년 상반기 사업계획

이도경, 최덕재 Dokyeong Lee, Deokjai Choi 1. 서론

IPv6Q 현배경 > 인터넷의급속한성장 -> IP 주소의고갈 개인휴대통신장치의보급 network TV, VOD 단말기등의인터넷연결 가정용품제어장치의인터넷연결 > 새로운 IP 로의이행문제 IPv4 호스트와의호환성문제를고려하여야합 ~ IPv4 의취약점보완 QoS 지원 인증

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

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

IKC43_06.hwp

<32382DC3BBB0A2C0E5BED6C0DA2E687770>

Something that can be seen, touched or otherwise sensed

슬라이드 1

歯최덕재.PDF

<B3EDB9AEC1FD5F3235C1FD2E687770>

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

歯A1.1함진호.ppt

歯규격(안).PDF

Switching

step 1-1

Microsoft PowerPoint - MobileIPv6_김재철.ppt

Microsoft PowerPoint - CHAP-03 [호환 모드]


#Ȳ¿ë¼®

일반적인 네트워크의 구성은 다음과 같다

1217 WebTrafMon II

DBPIA-NURIMEDIA

휠세미나3 ver0.4

Journal of Educational Innovation Research 2019, Vol. 29, No. 1, pp DOI: * Suggestions of Ways

Orcad Capture 9.x

Microsoft PowerPoint - IPv6-세미나.ppt

chapter4

Microsoft PowerPoint - IPv6-세미나.ppt

Microsoft Word - NAT_1_.doc

IP 주소란? 네트워크상에존재하는컴퓨터들을구분하고, 서로를인식하기위해사용하는특수한번호. 32-bit 체계의 IPv4 와, 128-bit 체계의 IPv6 가있다. About IPv4 32-bit 의길이로이루어지는 IPv4 는 1 byte (= 8-bit) 씩 4 개로나누

Page 2 of 5 아니다 means to not be, and is therefore the opposite of 이다. While English simply turns words like to be or to exist negative by adding not,


MAX+plus II Getting Started - 무작정따라하기

PowerPoint 프레젠테이션

4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ζ ω n (rad/sec) 2 ( ζ < 1), 1 (ζ = 1), ( ) 1

슬라이드 1

SLA QoS

Microsoft PowerPoint - 13_appl.ppt

7. TCP

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

강의10

untitled

02이용배(239~253)ok

IITA hwp

< BFCFB7E15FC7D1B1B9C1A4BAB8B9FDC7D0C8B85F31352D31BCF6C1A4C8AEC0CE2E687770>

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서

ARMBOOT 1



Microsoft PowerPoint - 2.Catalyst Switch Intrastructure Protection_이충용_V1 0.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

¹Ìµå¹Ì3Â÷Àμâ

0. 들어가기 전


Microsoft PowerPoint - ch13.ppt

Microsoft PowerPoint - 제4장

Network Security - Wired Sniffing 실습 ICNS Lab. Kyung Hee University

hd1300_k_v1r2_Final_.PDF

Microsoft Word - release note-VRRP_Korean.doc

歯T1-4김병철2.PDF

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

untitled

Transcription:

Internet Protocol (IP) v4 IP version 4 Defined in RFC 791 Two parts Specification of interface with a higher layer (TCP) Specification of actual protocol format and mechanisms Will (eventually) be replaced by IPv6

IPv4 라우팅기능수행 데이터그램 (Datagram) 방식 각데이터그램은독립적으로처리 각데이터그램은서로다른경로로전달될수있음 각데이터그램은순서가바뀌어전달될수있음 상위계층의세그먼트를네트워크가요구하는크기의패킷으로분할하여전송 신뢰성없는비연결형데이터그램프로토콜 Best effort service 오류검사및추적기능을수행하지않음 패킷폐기시 ICMP 메시지 를최초발신호스트에게전송

IP Services Primitives Functions to be performed Form of primitive implementation dependent e.g. subroutine call Parameters Used to pass data and control info

IP Parameters Source & destination addresses Protocol Recipient e.g. TCP Type of service Specify treatment of data unit during transmission Identification Source, destination address and user protocol Uniquely identifies PDU Needed for re-assembly and error reporting Don t fragment indicator Can IP fragment data If not, may not be possible to deliver Time to live Data length Option data User data

Type of Service Precedence 8 levels Reliability Normal or high Delay Normal or low Throughput Normal or high

IP Options Security 데이터그램에보안 tag 부착 Source routing 경유할라우터들의주소목록을지정 Strictly or loosely Route recording 경유라우터주소와시간을기록 Stream identification 예약자원들의이름지정 Timestamping 경유라우터의통과시간을기록

IPv4 Header

Header Fields (1) Header Fields (1) Version Currently 4 IP v6 - see later Internet header length In 32 bit words (including options) DS/ECN (was type of service) Differential Service/Explicit Congestion Notification Total length Of datagram, in octets Identification Sequence number Identify datagram uniquely with addresses/protocol Flags More bit Don t fragment Fragmentation offset

Header Fields (2) Time to live Protocol Next higher layer to receive data field at destination Header checksum Reverified and recomputed at each router 16 bit 1 s complement sum of all 16 bit words in header Set to zero during calculation Source address/destination address Options Padding To fill to multiple of 32 bits long Data Carries user data from next layer up Integer multiple of 8 bits long (octet) Max length of datagram (header plus data) is 65,535 octets

Example Q: offset = 100, HLEN = 5, total length field = 100 일경우, 첫바이트와마지막바이트의번호는? A: 처음바이트의번호는 100 8 = 800 total length = 100 header length = 20 80 bytes in this datagram 마지막바이트의번호는 879

Example Q: IP 패킷이 45000028000100000102... (16) 일경우, 몇개의홉을지나갈수있는가? 또한상위계층프로토콜은? A: time-to-live field = 01 ( 하나의홉 ) protocol field = 02 (IGMP)

IP Address Internet address IP 계층에서사용되는식별자 32 bit 2 진주소 The address space of IPv4 is 2 32 or 4,294,967,296. netid 와 hostid 로구분 인터넷에서호스트와라우터를유일하게구분

IPv4 Address Formats

Addresses Per Class

Dotted Decimal Notation 보다편리하고읽기쉽게하기위해사용

Example : Class C Address

Internet Example 220.3.6.0( 클래스 C) 는토큰링 200.78.6.0 은교환망 134.18.0.0( 클래스 B) 는이더넷 207.42.56.0( 클래스 C) 는점 - 대 - 점 WAN 124.0.0.0( 클래스 A) 는이더넷

Special Addresses

Direct Broadcast Address Hostid 필드가모두 1 인주소 라우터가특정네트워크의모든호스트에패킷을보낼때사용 목적지주소로만사용

Limited Broadcast Address 현재네트워크레벨의브로드캐스트주소 호스트가현재네트워크내의모든호스트에게메시지전달 다른네트워크로가는것을라우터가제한함 클래스 E 주소

This Network Netid 필드가모두 0 인주소 같은네트워크에있는다른호스트에게메시지보낼때사용 ( 라우터에서차단 )

Loopback Address 첫번째바이트가 127 인 IP 주소 소프트웨어시험용 클라이언트프로세스가동일한시스템상에있는서버프로세스에게메시지전송시사용 목적지주소로만사용

Classless Addressing Variable-length length blocks are assigned that belong to no class. In this architecture, the entire address space (2 32 addresses) is divided into blocks of different sizes. Classless Interdomain Routing (CIDR) Classful addressing is a special case of classless addressing. n = 8 (class A), 16 (class B), or 24 (class C)

Prefix Length Prefix : netid Suffix : hostid

Example Q: Find the block if one of the addresses is 190.87.140.202/29. A: 202 = 11001010. The first address is 190.87.140.200/29. The number of addresses is 2 32 29 or 8. The last address is 190.87.140.207/29. The first address needs to be used as the network address and the last address is kept as a special address (limited broadcast address).

Subnetting Allows arbitrary complexity of internetworked LANs within organization Each LAN assigned subnet number Site looks to rest of internet like single network Local routers route within subnetted network

2-Layer Hierarchical Structure Classful addressing : netid + hostid 먼저 netid 를사용하여네트워크에도달한후에 hostid 를사용하여호스트에도달 A, B, C 클래스는 2 단계계층구조

3-Layer Layer Hierarchical Structure 3 단계이상의계층구조를위하여서브넷팅활용

3-Layer Hierarchical Structure

Masking IP 주소중에서네트워크주소를추출하기위해마스크이용 Subnet mask indicates which bits are subnet number and which are host number 마스크 : 1- netid, 0 - hostid

Default Masks The network address is the beginning address of each block. It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero.

Subnet and Mask

Subnet Mask Calculation Binary Representation Dotted Decimal IP address 11000000.11100100.00010001.00111001 192.228.17.57 Subnet mask 11111111.11111111.11111111.11100000 255.255.255.224 Bitwise AND of address and mask (resultant network/subnet number) 11000000.11100100.00010001.00100000 192.228.17.32 Subnet number 11000000.11100100.00010001.001 1 Host number 00000000.00000000.00000000.00011001 25

Routing Using Subnets

Example B 클래스주소를가진기관이 12 개의서브넷이필요할때 12 개지만 14 개필요 (subnetid 필드가모두 1 인것과 0 인것 ) 서브넷할당을위한최소비트수 : 4 개 나머지 12 개비트는 hostid (2 12 = 4,096) 지정, 실제는 4,094 개 Mask = 255.255.240.0 (240 = 11110000) 서브넷 X.Y.0000hhhh.hhhhhhhh (X.Y.0.0) ~ X.Y.1111hhhh.hhhhhhhh (X.Y.240.0)

Example A company has three offices: Central, East, and West. The Central office is connected to the East and West offices via private, point-to-point WAN lines. The company is granted a block of 64 addresses with the beginning address 70.12.100.128/26. The management has decided to allocate 32 addresses for the Central office and divides the rest of addresses between the two offices. R West R R Central R R East 64 addresses 70.12.100.128/26

The company will have three subnets, one at Central, one at East, and one at West. a. The Central office uses the network address 70.12.100.128/27 (70.12.100.10000000/27). The addresses in this subnet are 70.12.100.128/27 to 70.12.100.159/27. (32 addresses) Note that three of these addresses are used for the routers and the company has reserved the last address in the subblock. Note that the interface of the router that connects the Central subnet to the WAN needs no address because it is a point-to-point connection.

b. The West office uses the network address 70.12.100.160/28 (70.12.100.10100000/28). The addresses in this subnet are 70.12.100.160/28 to 70.12.100.175/28. (16 addresses) Note that one of these addresses is used for the router and the company has reserved the last address in the sub-block. c. The East office uses the network address 70.12.100.176/28. (70.12.100.10110000/28) The addresses in this subnet are 70.12.100.176/28 to 70.12.100.191/28. (16 addresses) Note that one of these addresses is used for the router and the company has reserved the last address in the sub-block.

Example An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to three groups of customers as follows: a. The first group has 64 customers; each needs 256 addresses. b. The second group has 128 customers; each needs 128 addresses c. The third group has 128 customers; each needs 64 addresses. Design the subblocks and find out how many addresses are still available after these allocations.

Group 1: 64 개의서브넷, 서브넷당 256 개의주소필요 (8 비트의 suffix 와 24 비트의 prefix) 01 : 190.100.0.0/24 ~ 190.100.0.255/24 02 : 190.100.1.0/24 ~ 190.100.1.255/24.. 64 : 190.100.63.0/24 ~ 190.100.63.255/24 Total = 64 256 = 16,384 Group 2: 128 개의서브넷, 서브넷당 128 개의주소필요 (7 비트의 suffix 와 25 비트의 prefix) 001 : 190.100.64.0/25 ~ 190.100.64.127/25 002 : 190.100.64.128/25 ~ 190.100.64.255/25.. 128 : 190.100.127.128/25 ~ 190.100.127.255/25 Total = 128 128 = 16,384

Group 3: 128 개의서브넷, 서브넷당 64 개의주소필요 (6 비트의 suffix, 26 비트의 prefix) 001 : 190.100.128.0/26 ~ 190.100.128.63/26 002 : 190.100.128.64/26 ~ 190.100.128.127/26 128 : 190.100.159.192/26 ~ 190.100.159.255/26 Total = 128 64 = 8,192 Number of granted addresses: 65,536 Number of allocated addresses: 40,960 Number of available addresses: 24,576

Checksum 1. 패킷을 N 비트짜리섹션으로분할 2. 모든섹션을 1의보수연산으로더한다 3. 결과의보수를취하여체크섬으로함 보통 n=16

Record Route Option 데이터그램을처리한라우터의주소기록 최대 9 개의 IP 주소기록가능 ( 출구 IP 주소기록 ) 포인터 : 첫번째빈공간을가르킴

Record Route Option

Strict Source Route Option 데이터그램이거쳐야할경로를미리지정하기위해사용 데이터그램은옵션에정의된모든라우터방문

Strict Source Route Option

Loose Source Route Option Strict source route 옵션과비슷하지만리스트에없는라우터도방문가능

Timestamp Option 라우터가데이터그램을처리하는시간기록 (ms 단위 ) Overflow: 필드가없어서시간을기록하지못한라우터의수 Flag: 방문한라우터의의무표시

Timestamp Option

Timestamp Example Code=68, 길이 =28 바이트, 포인터 =5, Flag=1

Router Architecture

Input /Output Port

IP Structure

IP Structure 헤더추가모듈 : encapsulation PDU 처리모듈 큐 : 입출력큐 라우팅테이블 : 패킷의다음홉주소결정하기위해사용 라우팅모듈 MTU 테이블 : 단편화모듈이특정인터페이스의 MTU 를찾기위해사용 단편화모듈 재조립모듈

Routing Module IP 패킷수신 라우팅테이블을참조하여최적경로를찾는다 다음홉주소와함께단편화모듈로보내진다

Forwarding in Classful Addressing

Forwarding in Classless Addressing

Routing Table Mask DA Next Hop I/F 255.255.0.0 134.18.0.0 -- m0 255.255.0.0 129.8.0.0 222.13.16.40 m1 255.255.255.0 220.3.6.0 222.13.16.40 m1 0.0.0.0 0.0.0.0 134.18.5.2 m0

Example Show the routing tables for router R1.

Example Router R1 receives a packet with destination address 192.16.7.14. Show how the packet is forwarded. Solution The destination network is class C. The network address is extracted by masking off the leftmost 24 bits of the destination address; the result is 192.16.7.0. The table for Class C is searched. The next-hop address 111.15.17.32. and the interface m0 are passed to ARP.

Example Make a routing table for router R1

Example Can we find the configuration of a router, if we know only its routing table? Solution three interfaces: m0, m1, and m2. three networks (110.70.0.0, 180.14.0.0, 190.17.0.0) directly connected to router R1. two networks (140.6.12.64/26, 130.4.8.0/24) indirectly connected to R1.

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.

Processing Module 1. Remove one datagram from one of 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 =< 0) 1. Discard the datagram. 2. Send an ICMP error message. 3. Return. 5. Send the datagram to the routing module. 6. Return.

IP Fragmentation

IP Fragmentation Uses fields in header Data unit identifier (ID) Identifies end system originated datagram 동일한세그먼트에서분할된단편들은같은식별자값을가짐 Data length Length of user data in octets Offset Position of fragment of user data in original datagram In multiples of 64 bits (8 octets) More flag Indicates that this is not the last fragment

Fragmentation Example

Fragmentation Example

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

Reassembly 같은 ID 를가진단편들이도착하면, 버퍼의적절한위치에삽입한다. 재조립은오프셋 0 인단편부터 More 플래그값이 0 인단편까지모두모여야완성된다. Reassembly table 상태 (state) : FREE 또는 IN- USE IP 주소 : 발신지주소 데이터그램 ID : 단편을구분하는번호 타임아웃 : 단편이도착해야하는시간 단편 : 연결리스트의포인터

Reassembly Failure Re-assembly may fail if some fragments get lost Re-assembly time out Assigned to first fragment to arrive If timeout expires before all fragments arrive, discard partial data Use packet lifetime (time to live in IP) If time to live runs out, kill partial data

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