chapter 4

70
1 HANNAM UNIVERSITY Http://netwk.hannam.ac.kr Chapter 4 IP Addresses: Classful Addressing

Upload: irisa

Post on 06-Jan-2016

37 views

Category:

Documents


0 download

DESCRIPTION

Chapter 4. IP Addresses: Classful Addressing. CONTENTS. INTRODUCTION CLASSFUL ADDRESSING OTHER ISSUES A SAMPLE INTERNET. 4.1. INTRODUCTION. 4.1 개요. An IP address is a 32-bit address. 4.1 개요. The IP addresses are unique. 4.1 개요. Address Space. …………. …………. addr1. addr15. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 4

1HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

Chapter 4

IP Addresses:Classful Addressing

Page 2: Chapter 4

2HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

CONTENTSCONTENTS• INTRODUCTION• CLASSFUL ADDRESSING• OTHER ISSUES• A SAMPLE INTERNET

Page 3: Chapter 4

3HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

INTRODUCTION

4.14.1

Page 4: Chapter 4

4HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

An IP address is a An IP address is a 32-bit 32-bit

address.address.

Page 5: Chapter 4

5HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

The IP addresses The IP addresses are are

unique.unique.

Page 6: Chapter 4

6HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

Address Space

addr15addr1

addr2

addr41addr31

addr226

…………..…………..

…………..…………..

…………..

…………..…………..

Page 7: Chapter 4

7HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요RULE:RULE:

addr31…………..…………..

If a protocol uses N bits to define an address, the address space is 2N because each bit can have two different values (0 and 1) and N bits can have 2N values.

The address space of IPv4 is The address space of IPv4 is

223232 or or

4,294,967,296.4,294,967,296.

Page 8: Chapter 4

8HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

표기법2 진 표기법 (Binary Notation)

10 진 표기법 (Dotted-decimal notation)

01110101 10010101 00011101 11101010

Page 9: Chapter 4

9HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

The binary, decimal, and The binary, decimal, and hexadecimal number hexadecimal number

systems are reviewed in systems are reviewed in Appendix B.Appendix B.

Page 10: Chapter 4

10HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

Example 1Example 1

Change the following IP address from binary notation to dotted-decimal notation.

10000001 00001011 00001011 11101111

SolutionSolution

129.11.11.239129.11.11.239

Page 11: Chapter 4

11HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

Example 2Example 2

Change the following IP address from dotted-decimal notation to binary notation.

111.56.45.78

SolutionSolution

01101111 00111000 00101101 0100111001101111 00111000 00101101 01001110

Page 12: Chapter 4

12HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

Example 3Example 3

Find the error, if any, in the following IP address:

111.56.045.78

SolutionSolution

There are no leading zeroes in dotted-decimal notation (045).

Page 13: Chapter 4

13HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

Example 3 (continued)Example 3 (continued)

Find the error, if any, in the following IP address:

75.45.301.14

SolutionSolution

In dotted-decimal notation, each number is less than or equal to 255; 301 is outside this range.

Page 14: Chapter 4

14HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.1 4.1 개요개요

Example 4Example 4

Change the following IP addresses from binary notation to hexadecimal notation.

10000001 00001011 00001011 11101111

SolutionSolution

0X810B0BEF or 810B0BEF

Page 15: Chapter 4

15HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

CLASSFUL ADDRESSING

4.24.2

Page 16: Chapter 4

16HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

주소 공간 할당

클래스 주소 갯수Class Number of Address Percentage

A 231=2,147,483,648 50%

B 230=1,073,741,824 25%

C 229=536,870,912 12.5%

D 228=268,435,456 6.25%

E 228=268,435,456 6.25%

Page 17: Chapter 4

17HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

In classful addressing, In classful addressing, the address space is the address space is

divided into five classes: divided into five classes: AA, , BB, , CC, , DD, and , and EE..

Page 18: Chapter 4

18HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

이진 표기법으로 클래스 찾기

Page 19: Chapter 4

19HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

클래스 주소 찾기

Page 20: Chapter 4

20HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Example 5Example 5

How can we prove that we have 2,147,483,648 addresses in class A?

SolutionSolution

In class A, only 1 bit defines the class. The remaining 31 bits are available for the address. With 31 bits, we can have 231 or 2,147,483,648 addresses.

Page 21: Chapter 4

21HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Example 6Example 6

Find the class of the address:

00000001 00001011 00001011 11101111

SolutionSolution

The first bit is 0. This is a class A address.

Page 22: Chapter 4

22HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Example 6 (Continued)Example 6 (Continued)

Find the class of the address:

11000001 10000011 00011011 11111111

SolutionSolution

The first 2 bits are 1; the third bit is 0. This is a class C address.

Page 23: Chapter 4

23HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

10 진 표기법으로 클래스 찾기

Page 24: Chapter 4

24HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Example 7Example 7

Find the class of the address:

227.12.14.87

SolutionSolution

The first byte is 227 (between 224 and 239); the class is D.

Page 25: Chapter 4

25HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Example 7 (Continued)Example 7 (Continued)

Find the class of the address:

193.14.56.22

SolutionSolution

The first byte is 193 (between 192 and 223);the class is C.

Page 26: Chapter 4

26HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Example 8Example 8

In Example 4 we showed that class A has 231 (2,147,483,648) addresses. How can we prove this same fact using dotted-decimal notation?

SolutionSolution

The addresses in class A range from 0.0.0.0 to 127.255.255.255. We notice that we are

dealing with base 256 numbers here.

Page 27: Chapter 4

27HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Solution (Continued)Solution (Continued)

Each byte in the notation has a weight. The weights are as follows:

2563 , 2562, 2561, 2560

Last address: 127  2563 + 255  2562 +  255  2561 + 255  2560 = 2,147,483,647

First address: = 0

If we subtract the first from the

last and add 1, we get 2,147,483,648.

Page 28: Chapter 4

28HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Netid 와 Hostid 주소

Page 29: Chapter 4

29HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

클래스 A 의 블록

Page 30: Chapter 4

30HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Millions of class A addresses Millions of class A addresses are wasted. are wasted.

Page 31: Chapter 4

31HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

클래스 B 의 블록

Page 32: Chapter 4

32HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Many class B addresses Many class B addresses are wasted.are wasted.

Page 33: Chapter 4

33HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

클래스 C 의 블록

Page 34: Chapter 4

34HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

The number of addresses in The number of addresses in a class C block a class C block is smaller than is smaller than

the needs of most organizations. the needs of most organizations.

Page 35: Chapter 4

35HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Class D addresses Class D addresses are used for multicasting; are used for multicasting;

there is only there is only one block in this class.one block in this class.

Page 36: Chapter 4

36HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Class E addresses are reservedClass E addresses are reservedfor special purposes; for special purposes;

most of the block is wasted. most of the block is wasted.

Page 37: Chapter 4

37HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

The network address is the first address.

The network address defines the network to the rest of the Internet.

Given the network address, we can find the class of the address, the block, and the range of the addresses in the block

네트워크 주소

Page 38: Chapter 4

38HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

In classful addressing, In classful addressing, the network address the network address

(the first address in the block) (the first address in the block) is the one that is assigned is the one that is assigned

to the organization. to the organization.

Page 39: Chapter 4

39HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.2 4.2 클래스클래스

Example 9Example 9

Given the network address 17.0.0.0, find the class, the block, and the range of the addresses.

SolutionSolution

The class is A because the first byte is between 0 and 127. The block has a netid of 17. The addresses range from 17.0.0.0 to 17.255.255.255.

Page 40: Chapter 4

40HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

Example 10Example 10

Given the network address 132.21.0.0, find the class, the block, and the range of the addresses.

SolutionSolution

The class is B because the first byte is between 128 and 191. The block has a netid of 132.21. The addresses range from 132.21.0.0 to 132.21.255.255.

Page 41: Chapter 4

41HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

Example 11Example 11

Given the network address 220.34.76.0, find the class, the block, and the range of the addresses.

SolutionSolution

The class is C because the first byte is between 192 and 223. The block has a netid of 220.34.76. The addresses range from 220.34.76.0 to 220.34.76.255.

Page 42: Chapter 4

42HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

마스크

A mask is a 32-bit binary number that gives the first address in the block (the network address) when bitwise ANDed with an address in the block.

Page 43: Chapter 4

43HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

마스킹 개념

Page 44: Chapter 4

44HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

AND 연산

Page 45: Chapter 4

45HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

The network address is the The network address is the beginning address of each block.beginning address of each block.

It can be found by applying It can be found by applying the default mask tothe default mask to

any of the addresses in the block any of the addresses in the block (including itself).(including itself).

It retains the It retains the netidnetid of the block of the block and sets the and sets the hostidhostid to zero. to zero.

Page 46: Chapter 4

46HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

디폴트 마스크

Class Mask in binary Mask in dotted-decimal

A 11111111 00000000 00000000 0000000 255.0.0.0

B 11111111 11111111 00000000 0000000 255.255.0.0

C 11111111 11111111 11111111 00000000 255.255.255.0

Page 47: Chapter 4

47HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

Example 12Example 12

Given the address 23.56.7.91 and the default class A mask, find the beginning address (network address).

SolutionSolution

The default mask is 255.0.0.0, which means that only the first byte is preserved and the other 3 bytes are set to 0s. The network address is 23.0.0.0.

Page 48: Chapter 4

48HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

Example 13Example 13

Given the address 132.6.17.85 and the default class B mask, find the beginning address (network address).

SolutionSolution

The default mask is 255.255.0.0, which means that the first 2 bytes are preserved and the other 2 bytes are set to 0s. The network address is 132.6.0.0.

Page 49: Chapter 4

49HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

Example 14Example 14

Given the address 201.180.56.5 and the class C default mask, find the beginning address (network address).

SolutionSolution

The default mask is 255.255.255.0, which means that the first 3 bytes are preserved and the last byte is set to 0. The network address is 201.180.56.0.

Page 50: Chapter 4

50HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.2 2 클래스클래스

We must not We must not apply the default mask apply the default mask

of one class to of one class to an address belonging an address belonging

to another class. to another class.

Page 51: Chapter 4

51HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

OTHER ISSUES

4.34.3

Page 52: Chapter 4

52HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

멀티홈드 장치서로 다른 네트워크에 연결된 하나의 컴퓨터

Page 53: Chapter 4

53HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.3 3 다른 이슈들다른 이슈들

특수주소

Special Address Netid HostidSource or

Destination

Network address Specific All 0s None

Direct broadcast address Specific All 1s Destination

Limited broadcast address All 1s All 1s Destination

This host on this network All 0s All 0s Source

Specific host on this network All 0s Specific Destination

Loopback address 127 Any Destination

Page 54: Chapter 4

54HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.3 3 다른 이슈들다른 이슈들

네트워크 주소

Page 55: Chapter 4

55HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

직접 브로드캐스트 주소direct broadcast address

hostid 가 모두 “ 1” 인 주소

라우터가 특정 네트워크에 있는 모든 호스트에 패킷을 보낼 때 사용

IP 패킷에서 목적지 주소로만 사용

Page 56: Chapter 4

56HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.3 3 다른 이슈들다른 이슈들

직접 브로드 캐스트 주소 예

Page 57: Chapter 4

57HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

제한된 브로드캐스트 주소limited broadcast address

현재 네트워크내에서 브로드캐스트 주소

로컬 네트워크내의 모든 호스트에게 메시지 전달 때 사용

다른 네트워크로 가는 것을 라우터가 제한함

클래스 E 주소

Page 58: Chapter 4

58HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.5 4.5 다른 이슈들다른 이슈들

제한된 브로드 캐스트 주소 예

Page 59: Chapter 4

59HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

현재 네트워크에 있는 호스트IP 주소가 모두 “ 0” 인 주소

this host on this network

IP 주소를 모르는 호스트가 bootstrap 시 사용

발신지 주소로만 이용

목적지 주소는 제한된 브로드캐스트 주소 이용

항상 클래스 A 주소

Page 60: Chapter 4

60HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

현재 네트워크에 있는 호스트 예

Page 61: Chapter 4

61HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

현재 네트워크에 있는 특정 호스트netid 가 모두 “ 0” 인 주소같은 네트워크에 있는 다른 호스트에게 메시지

보낼 때 사용

Page 62: Chapter 4

62HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

루프백 주소loopback address

첫 번째 바이트가 “ 127” 인 IP 주소컴퓨터에 설치된 소프트웨어를 시험하기 위해

사용클라이언트 프로세스가 동일한 시스템상에 있는

서버 프로세스에게 메시지 전송시 사용IP 패킷의 목적지 주소로만 사용

Page 63: Chapter 4

63HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

루프백 주소의 예

Page 64: Chapter 4

64HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

사설 주소

사설 네트워크 주소

A number of blocks in each class are assigned for private use. They are not recognized globally. These blocks are depicted in Table 4.4

Class Netids Blocks

A 10.0.0 1

B 172.16 to 172.31 16

C 192.168.0 to 192.168.255

256

Page 65: Chapter 4

65HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

유니캐스트 , 멀티캐스트 , 브로드 캐스트 주소

Unicast communication is one-to-one.

Multicast communication is one-to-many.

Broadcast communication is one-to-all.

Page 66: Chapter 4

66HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

협회 IP 주소Address Group

224.0.1.7 AUDIONEWS

224.0.1.10 IETF-1-LOW-AUDIO

224.0.1.11 IETF-1-AUDIO

224.0.1.12 IETF-1-VIDEO

224.0.1.13 IETF-2-LOW-AUDIO

224.0.1.14 IETF-2-AUDIO

224.0.1.15 IETF-2-VIDEO

224.0.1.6 MUSIC-SERVICE

224.0.1.7 SEANET-TELEMETRY

224.0.1.8 SEANET-IMAGE

Page 67: Chapter 4

67HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.3 4.3 다른 이슈들다른 이슈들

할당된 멀티캐스트 주소 (Assigned Multicast Address)

Address Group

224.0.0.0 Reserved

224.0.0.1 All SYSTEMS on this SUBNET

224.0.0.2 All ROUTERS on this SUBNET

224.0.0.4 DVMRP ROUTERS

224.0.0.5 OSPFIGP All ROUTERS

224.0.0.6 OSPFIGP Designated ROUTERS

224.0.0.7 ST Routers

224.0.0.8 ST Hosts

224.0.0.9 RIP2 Routers

224.0.0.10 IGRP Routers

224.0.0.11 Mobile-Agents

Page 68: Chapter 4

68HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.4.3 3 다른 이슈들다른 이슈들

Multicast delivery will be Multicast delivery will be discussed in depth in discussed in depth in

Chapter 14.Chapter 14.

Page 69: Chapter 4

69HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

A SAMPLE INTERNET

WITH CLASSFUL ADDRESSES

4.44.4

Page 70: Chapter 4

70HANNAM UNIVERSITYHttp://netwk.hannam.ac.kr

4.5 4.5 클래스 주소를 가진 인터넷 예클래스 주소를 가진 인터넷 예