Transcript Solution

Chapter 4
IP Addresses:
Classful Addressing
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
1
CONTENTS
• INTRODUCTION
• CLASSFUL ADDRESSING
• OTHER ISSUES
• A SAMPLE INTERNET
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
2
4.1
INTRODUCTION
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
3
4.1 개요
An IP address is a
32-bit
address.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
4
4.1 개요
The IP addresses
are
unique.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
5
4.1 개요
Address Space
…………..
…………..
addr1
addr15
addr2 …………..
…………..
…………..
addr41 addr226
addr31
…………..
…………..
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
6
4.1 개요
RULE:
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.
addr31
…………..
………….. The address space
of IPv4 is
232
or
4,294,967,296.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
7
4.1 개요
표기법
2진 표기법(Binary Notation)
01110101 10010101 00011101 11101010
10진 표기법(Dotted-decimal notation)
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
8
4.1 개요
The binary, decimal, and
hexadecimal number
systems are reviewed in
Appendix B.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
9
4.1 개요
Example 1
Change the following IP address from binary
notation to dotted-decimal notation.
10000001 00001011 00001011 11101111
Solution
129.11.11.239
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
10
4.1 개요
Example 2
Change the following IP address from
dotted-decimal notation to binary notation.
111.56.45.78
Solution
01101111 00111000 00101101 01001110
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
11
4.1 개요
Example 3
Find the error, if any, in the following IP
address:
111.56.045.78
Solution
There are no leading zeroes in
dotted-decimal notation (045).
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
12
4.1 개요
Example 3 (continued)
Find the error, if any, in the following IP address:
75.45.301.14
Solution
In dotted-decimal notation,
each number is less than or
equal to 255; 301 is outside this range.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
13
4.1 개요
Example 4
Change the following IP addresses from binary
notation to hexadecimal notation.
10000001 00001011 00001011 11101111
Solution
0X810B0BEF or
Http://netwk.hannam.ac.kr
810B0BEF
HANNAM UNIVERSITY
14
4.2
CLASSFUL
ADDRESSING
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
15
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%
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
16
4.2 클래스
In classful addressing,
the address space is
divided into five classes:
A, B, C, D, and E.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
17
4.2 클래스
이진 표기법으로 클래스 찾기
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
18
4.2 클래스
클래스 주소 찾기
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
19
4.2 클래스
Example 5
How can we prove that we have 2,147,483,648
addresses in class A?
Solution
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
20
4.2 클래스
Example 6
Find the class of the address:
00000001 00001011 00001011 11101111
Solution
The first bit is 0. This is a class A address.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
21
4.2 클래스
Example 6 (Continued)
Find the class of the address:
11000001 10000011 00011011 11111111
Solution
The first 2 bits are 1; the third bit is 0.
This is a class C address.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
22
4.2 클래스
10진 표기법으로 클래스 찾기
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
23
4.2 클래스
Example 7
Find the class of the address:
227.12.14.87
Solution
The first byte is 227 (between 224 and 239);
the class is D.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
24
4.2 클래스
Example 7 (Continued)
Find the class of the address:
193.14.56.22
Solution
The first byte is 193 (between 192 and 223);
the class is C.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
25
4.2 클래스
Example 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?
Solution
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
26
4.2 클래스
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
27
4.2 클래스
Netid와 Hostid 주소
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
28
4.2 클래스
클래스 A의 블록
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
29
4.2 클래스
Millions of class A addresses
are wasted.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
30
4.2 클래스
클래스 B의 블록
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
31
4.2 클래스
Many class B addresses
are wasted.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
32
4.2 클래스
클래스 C의 블록
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
33
4.2 클래스
The number of addresses in
a class C block
is smaller than
the needs of most organizations.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
34
4.2 클래스
Class D addresses
are used for multicasting;
there is only
one block in this class.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
35
4.2 클래스
Class E addresses are reserved
for special purposes;
most of the block is wasted.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
36
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
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
37
4.2 클래스
In classful addressing,
the network address
(the first address in the block)
is the one that is assigned
to the organization.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
38
4.2 클래스
Example 9
Given the network address 17.0.0.0, find the class,
the block, and the range of the addresses.
Solution
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
39
4.2 클래스
Example 10
Given the network address 132.21.0.0, find the
class, the block, and the range of the addresses.
Solution
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
40
4.2 클래스
Example 11
Given the network address 220.34.76.0, find the
class, the block, and the range of the addresses.
Solution
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
41
4.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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
42
4.2 클래스
마스킹 개념
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
43
4.2 클래스
AND 연산
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
44
4.2 클래스
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
45
4.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
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
46
4.2 클래스
Example 12
Given the address 23.56.7.91 and the default class
A mask, find the beginning address (network
address).
Solution
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
47
4.2 클래스
Example 13
Given the address 132.6.17.85 and the default
class B mask, find the beginning address
(network address).
Solution
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
48
4.2 클래스
Example 14
Given the address 201.180.56.5 and the class C
default mask, find the beginning address
(network address).
Solution
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.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
49
4.2 클래스
We must not
apply the default mask
of one class to
an address belonging
to another class.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
50
4.3
OTHER
ISSUES
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
51
4.3 다른 이슈들
멀티홈드 장치
서로 다른 네트워크에 연결된 하나의 컴퓨터
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
52
4.3 다른 이슈들
 특수주소
Special Address
Netid
Hostid
Source 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
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
53
4.3 다른 이슈들
네트워크 주소
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
54
4.3 다른 이슈들
직접 브로드캐스트 주소
direct broadcast address
hostid가 모두 “1”인 주소
라우터가 특정 네트워크에 있는 모든 호스트에 패
킷을 보낼 때 사용
IP 패킷에서 목적지 주소로만 사용
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
55
4.3 다른 이슈들
직접 브로드 캐스트 주소 예
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
56
4.3 다른 이슈들
제한된 브로드캐스트 주소
limited broadcast address
현재 네트워크내에서 브로드캐스트 주소
로컬 네트워크내의 모든 호스트에게 메시지 전달
때 사용
다른 네트워크로 가는 것을 라우터가 제한함
클래스 E 주소
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
57
4.5 다른 이슈들
제한된 브로드 캐스트 주소 예
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
58
4.3 다른 이슈들
현재 네트워크에 있는 호스트
IP 주소가 모두 “0”인 주소
this host on this network
IP 주소를 모르는 호스트가 bootstrap시 사용
발신지 주소로만 이용
목적지 주소는 제한된 브로드캐스트 주소 이용
항상 클래스 A 주소
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
59
4.3 다른 이슈들
현재 네트워크에 있는 호스트 예
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
60
4.3 다른 이슈들
현재 네트워크에 있는 특정 호스트
netid가 모두 “0”인 주소
같은 네트워크에 있는 다른 호스트에게 메시지 보
낼 때 사용
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
61
4.3 다른 이슈들
루프백 주소
loopback address
첫 번째 바이트가 “127”인 IP 주소
컴퓨터에 설치된 소프트웨어를 시험하기 위해 사용
클라이언트 프로세스가 동일한 시스템상에 있는 서
버 프로세스에게 메시지 전송시 사용
IP 패킷의 목적지 주소로만 사용
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
62
4.3 다른 이슈들
루프백 주소의 예
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
63
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
192.168.255
256
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
64
4.3 다른 이슈들
유니캐스트, 멀티캐스트, 브로드 캐스트 주소
Unicast communication is one-to-one.
Multicast communication is one-to-many.
Broadcast communication is one-to-all.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
65
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
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
66
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
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
67
4.3 다른 이슈들
Multicast delivery will be
discussed in depth in
Chapter 14.
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
68
4.4
Http://netwk.hannam.ac.kr
A SAMPLE
INTERNET
WITH
CLASSFUL
ADDRESSES
HANNAM UNIVERSITY
69
4.5 클래스 주소를 가진 인터넷 예
Http://netwk.hannam.ac.kr
HANNAM UNIVERSITY
70