๐Ÿ•ธ IPv4

2019/05/18

๊ถŒ ๊ธฐ์›… (DoonDoony)

@sat10am

๐Ÿ•ธ IPv4

๊ฐ‘์ž๊ธฐ ์ด๊ฑด ์™œ ๊ณต๋ถ€ ํ–ˆ๋‚˜์š”...?

Django ๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ํ•˜๋ ค๊ณ  ํ•จ โ†’ ๊ฐ€์ƒ ํ™˜๊ฒฝ ์„ค์ • โ†’ Pipenv ๊ฐ€ ์š”์ƒˆ ๋ณ„๋กœ์ž„ โ†’ ๋„์ปค๋ฅผ ์จ์•ผ๊ฒ ๋‹ค ๋„์ปค์ฑ… ์‚ผ โ†’ ๋„์ปค ์ฑ… ์•ž์— ์ธํ”„๋ผ ์„ค๋ช… ์ž”๋œฉ ๋‚˜์˜ด โ†’ ๋„คํŠธ์›Œํฌ ๋ถ€๋ถ„์ด ์ดํ•ด๊ฐ€ ์•ˆ๋จ

๐Ÿ•ธ IPv4

์—ฌ๊ธฐ๊ฐ€ ์–ด๋””... ์•ˆ์‹ฌ ํ•˜์„ธ์š” TCP/IP ์ฑ… 84 ํŽ˜์ด์ง€ ์ž…๋‹ˆ๋‹ค

๐Ÿ•ธ IPv4

Table of Contents

IPv4 ์ฃผ์†Œ์˜ ๊ตฌ์„ฑ

Subnet ๊ณผ Subnet Mask

CIDR

ย 

๐Ÿ•ธ IPv4

IPv4 ์ฃผ์†Œ์˜ ๊ตฌ์„ฑ

๐Ÿ•ธ IPv4

IPv4 ์ฃผ์†Œ์˜ ๊ตฌ์„ฑ

11111111.11111111.11111111.11111111

00000000.00000000.00000000.00000000

~

8bits

32 bits

. ์œผ๋กœ ๊ตฌ๋ถ„๋œ ์ด 32๋น„ํŠธ ์ˆซ์ž๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋‹ค

๐Ÿ•ธ IPv4

IPv4 ์ฃผ์†Œ์˜ ๊ตฌ์„ฑ

2 ** 32 = 4294967296 ... ๋งŒ๋“ค๋•Œ๋Š” ๋ชจ๋ฅด์…จ๊ฒ ์ง€๋งŒ ๋ชจ์ž๋ž๋‹ˆ๋‹ค

์Šค๋งˆํŠธํฐ, ์ปดํ“จํ„ฐ, IoT ๊ธฐ๊ธฐ ๋“ฑ...

๋„คํŠธ์›์ด ์—ฐ๊ฒฐ ๋˜์ง€ ์•Š์€ ๊ธฐ๊ธฐ๋ฅผ ์ฐพ๊ธฐ ๋” ์–ด๋ ต์Šต๋‹ˆ๋‹ค

๐Ÿ•ธ IPv4

IPv4 ์ฃผ์†Œ์˜ ๊ตฌ์„ฑ

IPv4 ์ฃผ์†Œ์˜ ๋ถ€์กฑ์„ ํ•ด์†Œํ•˜๊ธฐ ์œ„ํ•œ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ๊ณต๋ถ€ํ•ฉ๋‹ˆ๋‹ค

์‚ฌ์‹ค IPv4 ๋ผ๋Š” ๊ฒƒ์— ๋Œ€ํ•œ ์„ค๋ช…์€ ์ด๋ฏธ ๋์ž…๋‹ˆ๋‹ค

ํŒจํ‚ท ๊ตฌ์กฐ์™€ ์˜ˆ์ „์— ์‚ฌ์šฉํ•˜๋˜ Class ๋‹จ์œ„์˜ ๋„คํŠธ์› ๊ตฌ๋ถ„ ์ •๋„๊ฐ€ ๋” ์žˆ๊ฒ ๋„ค์š”

๐Ÿ•ธ IPv4

IPv4 ์ฃผ์†Œ์˜ ๊ตฌ์„ฑ

์˜ˆ์•ฝ๋œ IPv4 ๋ชฉ๋ก

์ฃผ์†Œ ๋Œ€์—ญ ์šฉ๋„
0.0.0.0/8 ์ž์ฒด ๋„คํŠธ์›Œํฌ
10.0.0.0/8 ์‚ฌ์„ค ๋„คํŠธ์›Œํฌ
127.0.0.0/8 ๋ฃจํ”„๋ฐฑ(loopback) ์ฆ‰, ์ž๊ธฐ์ž์‹ 
169.254.0.0/16 ๋งํฌ ๋กœ์ปฌ(link local)
172.16.0.0/12 ์‚ฌ์„ค ๋„คํŠธ์›Œํฌ
192.0.2.0/24 ์˜ˆ์ œ ๋“ฑ ๋ฌธ์„œ์—์„œ ์‚ฌ์šฉ
192.88.99.0/24 6to4 ๋ฆด๋ ˆ์ด ์• ๋‹ˆ์บ์ŠคํŠธ
192.168.0.0/16 ์‚ฌ์„ค ๋„คํŠธ์›Œํฌ
198.18.0.0/15 ๋„คํŠธ์›Œํฌ ์žฅ๋น„ ๋ฒค์น˜๋งˆํ‚น ํ…Œ์ŠคํŠธ
224.0.0.0/4 ๋ฉ€ํ‹ฐ์บ์ŠคํŠธ
240.0.0.0/4 ๋ฏธ๋ž˜ ์‚ฌ์šฉ ์šฉ๋„๋กœ ์˜ˆ์•ฝ

๐Ÿ•ธ IPv4

Subnetting

๐Ÿ•ธ IPv4

Subnetting

Subnetwork?

1. Network ๊ตฌ์„ฑ์€ ๋ฌผ๋ฆฌ์  ๊ฑฐ๋ฆฌ์˜ ์ œ์•ฝ์ด ์žˆ์Œ

2. ํ•˜๋‚˜์˜ ๋…ธ๋“œ์—์„œ ๋„คํŠธ์› ํŠธ๋ž˜ํ”ฝ์ด ๋„ˆ๋ฌด ๋†’์„ ๊ฒฝ์šฐ

3. ๋ณด์•ˆ ๊ทธ๋ฃน๊ณผ ๊ทธ๋ ‡์ง€ ์•Š์€ ๊ทธ๋ฃน์„ ๊ตฌ๋ถ„ํ•˜๊ธฐ ์œ„ํ•ด

4. IPv4 ์ฃผ์†Œ ์ž์›์˜ ๋ถ€์กฑ์„ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด

๐Ÿ•ธ IPv4

Subnetting

SubNetwork?

์ž์›์„ ๊ณต์œ ํ•˜๊ฑฐ๋‚˜, ์ „์ž์‹ ํ˜ธ๋ฅผ ์ฃผ๊ณ  ๋ฐ›๊ธฐ ์œ„ํ•ด ๋‘ ๋Œ€ ์ด์ƒ์˜ ์ปดํ“จํ„ฐ๋กœ ๊ตฌ์„ฑ๋œ ๋ง

์ผ€์ด๋ธ”(๊ด‘/๋™์ถ•), ์ „ํ™”์„ , ์œ„์„ฑ, ์ „ํŒŒ, ์ ์™ธ์„  ๋“ฑ์œผ๋กœ ์—ฐ๊ฒฐ๋  ์ˆ˜ ์žˆ๋‹ค

ย 

๋„คํŠธ์›Œํฌ์˜ ๋ฒ”์œ„์— ๋”ฐ๋ผ์„œ LAN/WAN ์ •๋„๋กœ ๋ณดํ†ต ๊ตฌ๋ถ„ํ•จ

๐Ÿ•ธ IPv4

Subnetting

IPv4 (์•ˆ ์•Œ๋ ค๋“œ๋ฆฐ) ๊ตฌ์กฐ

IPv4 Address = Network Address + Host Address

์ด ๋‚ด์šฉ์„ ์•Œ์•„์•ผ Subnetting ์„ ํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค

๐Ÿ•ธ IPv4

Subnetting

IPv4 ์˜ (์•ˆ ์•Œ๋ ค๋“œ๋ฆฐ) ๊ตฌ์„ฑ ๋‹จ์œ„ (Class)

CLASS ๊ตฌ์„ฑ ๋ฒ”์œ„ ์˜ˆ
A ํด๋ž˜์Šค xxx.xxx.xxx.xxx 1.0.0.1 ~ 126.255.255.254 61.211.123.22
B ํด๋ž˜์Šค xxx.xxx.xxx.xxx 128.0.0.1 ~ 191.255.255.254 181.123.211.33
C ํด๋ž˜์Šค xxx.xxx.xxx.xxx 192.0.0.1 ~ 223.255.255.254 221.23.222.222
D ํด๋ž˜์Šค 224.0.0.0 ~ 239.255.255.255
E ํด๋ž˜์Šค 240.0.0.0 ~ 254.255.255.254

๐Ÿ•ธ IPv4

Subnetting

๋ชจ๋“  Network ์€ ๋Œ€ํ‘œ๋ฒˆํ˜ธ์™€ ์ค‘๊ณ„์†Œ๊ฐ€ ์žˆ๋‹ค

C class Network

214.232.178.0

214.232.178.23

214.232.178.1

214.232.178.23

C class Network!

๐Ÿ•ธ IPv4

Subnetting

๋Œ€ํ‘œ๋ฒˆํ˜ธ๋Š” ์–ด๋–ป๊ฒŒ ์ฐพ๋‚˜์š”?

C class Network

214.232.178.0

214.232.178.23

214.232.178.1

214.232.178.23

C class Network!

Network Address

๐Ÿ•ธ IPv4

Subnetting

Subnet Mask

C Class IP ํ•˜๋‚˜๋งŒ์œผ๋กœ๋„ Host 256 (-2) ๊ฐœ ์‚ฌ์šฉ๊ฐ€๋Šฅ

IP ํ•˜๋‚˜๋ฅผ ๋ฐ›์•„์„œ ์ด๋ ‡๊ฒŒ ๊นŒ์ง€ ๋งŽ์ด ํ•„์š” ํ• ๊นŒ์š”...?

ย 

๊ทธ๋ž˜์„œ Subnet์„ ์”๋‹ˆ๋‹ค

๐Ÿ•ธ IPv4

Subnetting

Subnet Mask

๐Ÿ•ธ IPv4

Subnetting

Subnet Mask

Subnet Mask ๋Š” ๋กœ์ปฌ ๋„คํŠธ์›Œํฌ ๋‚ด๋ถ€ ๋Œ€์—ญ๊ณผ, ์™ธ๋ถ€๋ฅผ ๋ช…ํ™•ํ•˜๊ฒŒ ๊ตฌ๋ถ„ํ•˜๊ธฐ ์œ„ํ•œ ์ˆ˜๋‹จ์„ ํ‘œ์ค€ํ™” ํ•œ ๊ฒƒ

๐Ÿ•ธ IPv4

Subnetting

Subnet Mask

Subnet Mask ๋ฅผ ์ดํ•ดํ•˜๊ธฐ ์ „์— ์•Œ์•„์•ผ ํ•  ๊ฒƒ

2์ง„๋ฒ•, (&) AND ์—ฐ์‚ฐ... ์€ ๋‹ค ์•„์‹ ๋‹ค๊ณ  ์ƒ๊ฐํ• ๊ฒŒ์š”!

๐Ÿ•ธ IPv4

Subnetting

Subnet Mask

My IP Remote Host SubnetMask
172.168.0.234 172.168.0.96 255.255.255.128

Remote Host ๋Š” ์ง์ ‘ ์ €์—๊ฒŒ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์„๊นŒ์š”?

๐Ÿ•ธ IPv4

Subnetting

10101100.10101000.00000000.11101010

10101100.10101000.00000000.01100000ย  (172.168.0.96)

11111111.11111111.11111111.10000000ย  (172.168.0.234)

My IP

SubnetMask

Remote

&

10101100.10101000.00000000.00000000ย  (172.168.0.0)

Network IP

11111111.11111111.11111111.10000000ย  (172.168.0.234)

SubnetMask

&

10101100.10101000.00000000.10000000ย  (172.168.0.128)

Network IP

๐Ÿ•ธ IPv4

Subnetting

Remote host ์™€ ๋‚ด IP ๋Š” ๋‹ค๋ฅธ ๋„คํŠธ์›Œํฌ์ด๋ฏ€๋กœ

์ง์ ‘ ์ ‘๊ทผํ•  ์ˆ˜ ์—†์Œ (๋ผ์šฐํ„ฐ๋ฅผ ํ†ตํ•ด ์ ‘๊ทผ)

ย 

Subnetting ์— ๊ด€๋ จ๋œ ๋„ํ‘œ ์ฐธ๊ณ 

๐Ÿ•ธ IPv4

Subnetting

Class C์ธ 223.254.23 ๋„คํŠธ์›Œํฌ๋ฅผ ํ• ๋‹น๋ฐ›์€ ๊ธฐ๊ด€์—์„œ 6๊ฐœ์˜ ์„œ๋ธŒ ๋„คํŠธ์›Œํฌ๋ฅผ ๊ตฌ์„ฑํ•  ๋•Œ

(๋„คํŠธ์›Œํฌ ์ฃผ์†Œ์™€, ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ ์ฃผ์†Œ๋Š” ์ œ์™ธ)

Subnet ์„ ์–ด๋–ป๊ฒŒ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์„๊นŒ์š”?

๐Ÿ•ธ IPv4

Supernetting

๐Ÿ•ธ IPv4

Supernetting

A, B Class ์ฃผ์†Œ ๊ณต๊ฐ„์˜ ๊ณ ๊ฐˆ๋กœ Class C ์‚ฌ์šฉ

ํ˜ธ์ŠคํŠธ ๊ฐœ์ˆ˜์˜ ์ œ์•ฝ์œผ๋กœ (256๊ฐœ), ๋ผ์šฐํŒ… ํ…Œ์ด๋ธ” ๊ทœ๋ชจ๊ฐ€ ์ฆ๊ฐ€๋จ โ†’ ๋ผ์šฐํŒ… ์ฒ˜๋ฆฌ์˜ ๋ถ€ํ•˜

๐Ÿ•ธ IPv4

Supernetting

A, B Class ์ฃผ์†Œ ๊ณต๊ฐ„์˜ ๊ณ ๊ฐˆ๋กœ Class C ์‚ฌ์šฉ

ํ˜ธ์ŠคํŠธ ๊ฐœ์ˆ˜์˜ ์ œ์•ฝ์œผ๋กœ (256๊ฐœ), ๋ผ์šฐํŒ… ํ…Œ์ด๋ธ” ๊ทœ๋ชจ๊ฐ€ ์ฆ๊ฐ€๋จ โ†’ ๋ผ์šฐํŒ… ์ฒ˜๋ฆฌ์˜ ๋ถ€ํ•˜

๐Ÿ•ธ IPv4

Supernetting

Subnetting โ†’ ํ•˜๋‚˜์˜ ํฐ ๋„คํŠธ์›Œํฌ๋ฅผ ์—ฌ๋Ÿฟ์˜ ์ž‘์€ Subnetwork ๋กœ ๋‚˜๋ˆ”

Supernettingย โ†’ ์—ฌ๋Ÿฟ์˜ ์ž‘์€ Subnetwork ๋ฅผ ํ•˜๋‚˜์˜ ๋„คํŠธ์›Œํฌ๋กœ ํ†ตํ•ฉ

ย 

Supernetting ๋Š” ์ฃผ๋กœ ๋ผ์šฐํŒ… ํ…Œ์ด๋ธ”์„ ํ†ตํ•ฉํ•˜๊ณ  ์ถ•์†Œํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค

ย 

RFC 1519 Classless Inter-Domain Routing (CIDR):

an Address Assignment and Aggregation Strategy

๐Ÿ•ธ IPv4

Supernetting

๋‹ค์Œ์˜ ๋„คํŠธ์›Œํฌ๋“ค์„ ํ•˜๋‚˜์˜ ๋„คํŠธ์›Œํฌ๋กœ Supernetting ํ•œ๋‹ค๋ฉด, Network ID ๋Š”?

๐Ÿ•ธ IPv4

Supernetting

CIDR Notation

1. ๋„คํŠธ์›Œํฌ ๋น„ํŠธ๋ฅผ ํ˜ธ์ŠคํŠธ ๋น„ํŠธ๋กœ ๋„˜๊ธด๋‹ค

2. ๊ฐ ์ฃผ์†Œ์˜ ๊ณตํ†ต๋œ ๋„คํŠธ์›Œํฌ ๋น„ํŠธ๊ฐ€ ์กด์žฌ (์—ฐ์†๋œ ๋Œ€์—ญ)

IPv4

By Doon Doon

IPv4

  • 835