๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Dev Blog
42 Seoul/Netwhat

[42 Seoul] Netwhat

by ์œ ์ง„์˜ 2021. 6. 2.
ํ”„๋กœ์ ํŠธ ๋ชฉํ‘œ: ๋„คํŠธ์›Œํฌ๋ฅผ ์ดํ•ดํ•˜๊ณ  ๋‚ด๋ถ€ ์ž‘๋™์— ๋Œ€ํ•ด ๋ฐฐ์šธ ์ˆ˜ ์žˆ๋‹ค.
ํ”„๋กœ์ ํŠธ ์š”๊ตฌ ์‚ฌํ•ญ: ๋„คํŠธ์›Œํฌ ๊ด€๋ จ ์˜จ๋ผ์ธ ํ€ด์ฆˆ๋ฅผ ํ’€์–ด์•ผ ํ•œ๋‹ค.

 

Netwhat ์—ฐ์Šต ๋ฌธ์ œ๋ฅผ ํ’€์–ด๋ณด๊ณ  ๊ด€๋ จ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๋ ค ํ•œ๋‹ค.

 

1. IP Address

 

1-1)  IPv4์™€ IPv6 

 

IP address ๋ž€?

์ง€๊ธˆ ๋‚˜๋Š” ํ™๋Œ€์˜ ํ•œ ์นดํŽ˜์—์„œ ์ด ๊ธ€์„ ์ •๋ฆฌ ์ค‘์ด๋‹ค. ์ด ์นดํŽ˜์˜ IPv4 ์ฃผ์†Œ๋Š” 172.30.1.12 ๋‹ˆ๊นŒ, ์ด IP๋Š” Bํด๋ž˜์Šค์ž„์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค. ์—ฌ๊ธฐ์„œ ๋„คํŠธ์›Œํฌ ์ฃผ์†Œ๋Š” 172.30 ๊นŒ์ง€๊ณ , 1.12๋Š” ๋‚˜๋งŒ์˜ ํ˜ธ์ŠคํŠธ ์ฃผ์†Œ์ด๋‹ค.

velog.io

 

Q. What is the size of an IPv4 address?

- 128 bits
- 32 bits
- 64 miles
- 16 bits
- 8 bits
- 64 bytes
- 128 bytes

Answer: 32 bits

Q. What is the size of an IPv6 address?

- 128 bits
- 32 bits
- 64 miles
- 16 bits
- 8 bits
- 64 bytes
- 128 bytes

Answer : 128 bits

 

1-2) ๋ฃจํ”„๋ฐฑ ์ฃผ์†Œ

 

IP ์ฃผ์†Œ 127.0.0.1 ์˜ ์˜๋ฏธ - ๋ฃจํ”„๋ฐฑ(loopback) or ๋กœ์ปฌํ˜ธ์ŠคํŠธ(localhost) ์ฃผ์†Œ

๋„คํŠธ์›Œํฌ์—์„  ํŠน์ˆ˜ํ•œ IP ์ฃผ์†Œ๋กœ 127.0.0.1์ด๋ผ๋Š” IP ์ฃผ์†Œ๊ฐ€ ์žˆ๋‹ค. ํ•œ ๋ฒˆ์”ฉ ๋ดค์„ ๋ฒ•ํ•œ ์ฃผ์†Œ์ธ๋ฐ, ์ด๋Š” ๋ฃจํ”„๋ฐฑ(loopback) ํ˜น์€ ๋กœ์ปฌํ˜ธ์ŠคํŠธ ์ฃผ์†Œ(localhost)๋ผ๊ณ ๋„ ๋ถˆ๋ฆฐ๋‹ค. ๋„คํŠธ์›Œํฌ ํ†ต์‹ ์ด๋ž€ ์ธํ„ฐ๋„ท ์ƒ์— ์กด

woo-dev.tistory.com

 

127.0.0.1 ๊ณผ localhost์˜ ์ฐจ์ด

์šฐ๋ฆฌ๋Š” ๋‚ด๋ถ€์ ์œผ๋กœ ์„œ๋ฒ„๋ฅผ ๊ตฌ์ถ•ํ•˜๊ณ  ๋ฐฑ์—”๋“œ ์„œ๋ฒ„๋ฅผ ๊ฐœ๋ฐœํ•  ๋•Œ ํ”ํžˆ๋“ค localhost:3000 ์„ ์‚ฌ์šฉํ•˜๊ณค ํ•œ๋‹ค.๊ทธ๋ฆฌ๊ณ  localhost:3000 ๊ณผ ์ด๊ฒƒ์˜ ip์ฃผ์†Œ์ธ 127.0.0.1:3000 ์„ ๋ธŒ๋ผ์šฐ์ ธ ์ฐฝ์— ์ž…๋ ฅํ•˜๋ฉด ๊ฐ™์€ ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜

velog.io

 

Q. To the test IP stack on your local host, which IP address would you ping?

- 127.0.0.0
- 1.0.0.127
- 127.0.0.1
- 127.0.0.255

Answer : 127.0.0.1

ํ’€์ด) local host๋ž€ ์ปดํ“จํ„ฐ ๋„คํŠธ์›Œํฌ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋ฃจํ”„๋ฐฑ ํ˜ธ์ŠคํŠธ๋ช…์œผ๋กœ, ์ž์‹ ์˜ ์ปดํ“จํ„ฐ๋ฅผ ์˜๋ฏธํ•œ๋‹ค. ์ž์‹ ์˜ ์ปดํ“จํ„ฐ๋ฅผ ์Šค์Šค๋กœ ์„œ๋ฒ„๋กœ ๋งŒ๋“ค๊ณ  ๊ทธ ์ปดํ“จํ„ฐ์—์„œ ์ฝœ์„ ๋ณด๋‚ด ์‘๋‹ต์„ ๋ฐ›์„ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์„ ๋งํ•œ๋‹ค. ์ฆ‰ ๋„คํŠธ์›Œํฌ๋ฅผ ๊ตฌ์ถ•ํ•˜์ง€ ์•Š๊ณ ๋„ ๋„คํŠธ์›Œํฌ์ฒ˜๋Ÿผ ์‘๋‹ต์„ ๋ณด๋‚ด๊ณ  ๋ฐ›๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅํ•œ ๊ธฐ๋Šฅ์„ ๋œปํ•œ๋‹ค. IPv4์—์„œ๋Š” ๋ฃจํ”„๋ฐฑ ์ฃผ์†Œ๋Š” 127.0.0.1์ด๋‹ค.

 

1-3) IP Class 

 

IP address ๋ž€?

์ง€๊ธˆ ๋‚˜๋Š” ํ™๋Œ€์˜ ํ•œ ์นดํŽ˜์—์„œ ์ด ๊ธ€์„ ์ •๋ฆฌ ์ค‘์ด๋‹ค. ์ด ์นดํŽ˜์˜ IPv4 ์ฃผ์†Œ๋Š” 172.30.1.12 ๋‹ˆ๊นŒ, ์ด IP๋Š” Bํด๋ž˜์Šค์ž„์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค. ์—ฌ๊ธฐ์„œ ๋„คํŠธ์›Œํฌ ์ฃผ์†Œ๋Š” 172.30 ๊นŒ์ง€๊ณ , 1.12๋Š” ๋‚˜๋งŒ์˜ ํ˜ธ์ŠคํŠธ ์ฃผ์†Œ์ด๋‹ค.

velog.io

 

Q. What is the default IP address class available?

- A AND B
- FIRST
- C
- B

Answer : C

ํ’€์ด) ์ •ํ™•ํ• ์ง€๋Š” ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ defaul IP address๋ฅผ ๊ตฌ๊ธ€๋ง ํ•˜๋ฉด 192.168.0.1 ๋‚˜์˜ค๋Š” ๊ฑธ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ ์ด IP ์ฃผ์†Œ๋Š” ๋Œ€๋ถ€๋ถ„์˜ ๋ผ์šฐํ„ฐ ์ œํ’ˆ๋“ค์˜ default IP ์ฃผ์†Œ๋กœ ์“ฐ์ธ๋‹ค๊ณ  ํ•œ๋‹ค. 192.168.0.1์€ C ํด๋ž˜์Šค์— ํ•ด๋‹นํ•˜๋Š” IP ์ฃผ์†Œ ๊ฐ’์ด๋‹ค.

 

Q. Which IP address class has more host addresses available by default?

- C
- D
- E
- F
- FIRST(A)

Answer : FIRST(A)

ํ’€์ด) IP Class๋Š” ํ•˜๋‚˜์˜ IP ์ฃผ์†Œ์—์„œ ๋„คํŠธ์›Œํฌ ์˜์—ญ๊ณผ ํ˜ธ์ŠคํŠธ ์˜์—ญ์„ ๋‚˜๋ˆ„๋Š” ๋ฐฉ๋ฒ•์ด์ž, ์•ฝ์†์ด๋‹ค. A ํด๋ž˜์Šค๋Š” ๋„คํŠธ์›Œํฌ IP๋กœ ์‚ฌ์šฉ๋˜๋Š” ์ฒซ ์˜ฅํ…Ÿ์„ ์ œ์™ธํ•œ ๋‚˜๋จธ์ง€ ์„ธ ์˜ฅํ…Ÿ์„ ํ˜ธ์ŠคํŠธ IP๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ ์ œ์ผ ๋งŽ์€ ํ˜ธ์ŠคํŠธ๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋‹ค.

 

Q. Which of this is not a class of IP address?

- Class D
- Class F
- Class C
- Class E

Answer : Class F

 

2. Subnetting

 

2-1) ์„œ๋ธŒ๋„ท ๋งˆ์Šคํฌ ํ‘œ๊ธฐ๋ฒ•

 

CIDR (์‚ฌ์ด๋”) ๊ธฐ๋ฒ•์— ๋Œ€ํ•œ ์ •๋ฆฌ

CIDR(์‚ฌ์ด๋”) ๊ธฐ๋ฒ•์ด๋ž€, ๊ธฐ์กด์˜ IP ์ฃผ์†Œ ํ• ๋‹น๋ฐฉ์‹์ธ Network Class ๋ฐฉ์‹์„ ๋Œ€์ฒดํ•˜๊ธฐ ์œ„ํ•ด ๊ฐœ๋ฐœ๋œ ๋„๋ฉ”์ธ๊ฐ„ ๋ผ์šฐํŒ… ๊ธฐ๋ฒ•์œผ๋กœ ์ตœ์‹  IP ํ• ๋‹น ๋ฐฉ๋ฒ•์ด๋‹ค. CIDR ๊ธฐ๋ฒ•์€ ์‚ฌ์ด๋” ๋ธ”๋ก์ด๋ผ ๋ถˆ๋ฆฌ๋Š” ๊ทธ๋ฃน์œผ๋กœ IP ์ฃผ

jins-dev.tistory.com

 

[Network] ์„œ๋ธŒ๋„ท๋งˆ์Šคํฌ(Subnet Mask)๋ž€?

*์„ ํ–‰์ง€์‹ 2018/11/10 - [์ „๊ณต์ง€์‹/Network] - [Network] IP์ฃผ์†Œ๋ž€? 2018/11/11 - [์ „๊ณต์ง€์‹/Network] - [Network] IP์ฃผ์†Œ ํด๋ž˜์Šค(A,B,C class)๋ž€? 1) ์„œ๋ธŒ๋„คํŒ…์ด๋ž€? (Subnetting) ์„œ๋ธŒ๋„ท๋งˆ์Šคํฌ๋ฅผ ์•Œ๊ธฐ ์œ„ํ•ด์„  ๋จผ..

limkydev.tistory.com

 

Q. What is the CIDR notation of the 255.255.128.0 subnet mask?

- /8
- /16
- /9
- /17

Answer : /17

ํ’€์ด) 11111111.11111111.10000000.00000000 -> 1์˜ ๊ฐœ์ˆ˜: 17๊ฐœ

 

Q. What is the CIDR notation of the 255.255.192.0 subnet mask?

- /5
- /31
- /18
- /14

Answer : /18

ํ’€์ด) 11111111.11111111.11000000.00000000 -> 1์˜ ๊ฐœ์ˆ˜: 18๊ฐœ

 

Q. What is the subnet mask of /24?

- 255.255.255.255
- 255.255.255.0
- 255.0.0.0
- 255.255.128.0
- 255.192.0.0
- 255.224.0.0

Answer : 255.255.255.0

 

2-2) ๋„คํŠธ์›Œํฌ/๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ ์ฃผ์†Œ ๊ตฌํ•˜๊ธฐ

 

IP์ฃผ์†Œ, ์„œ๋ธŒ๋„ท๋งˆ์Šคํฌ, ๋„คํŠธ์›Œํฌ์ฃผ์†Œ, ๊ทธ๋ฆฌ๊ณ  ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ์ฃผ์†Œ

IP์ฃผ์†Œ์™€ ์„œ๋ธŒ๋„ท๋งˆ์Šคํฌ(Subnet Mask) ๋ฅผ ์•Œ๊ณ ์žˆ์„๊ฒฝ์šฐ ๋„คํŠธ์›Œํฌ์ฃผ์†Œ์™€ ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ์ฃผ์†Œ๋ฅผ ๊ตฌํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค. IP์ฃผ์†Œ๋Š” ๊ฐ๊ฐ์˜ ์ปดํ“จํ„ฐ์— ๋„คํŠธ์›Œํฌ ๊ด€๋ฆฌ์ž์—์˜ํ•ด ๊ณ ์ •์œผ๋กœ ํ˜น์€ DHCP๊ฐ€ ์œ ๋™์œผ๋กœ ๋ถ€์—ฌ

unabated.tistory.com

Q. What is the network address of a host with an IP address of 182.161.121.118/24?

- 180.0.0.0
- 182.161.121.64
- 182.161.120.0
- 182.161.121.116
- 0.0.0.0
- 182.161.96.0
- 182.160.0.0
- 182.161.121.0

Answer : 182.161.121.0

ํ’€์ด) 182.161.121.118๊ณผ 255.255.255.0๋ฅผ AND ์—ฐ์‚ฐํ•˜๋ฉด 182.161.121.0์ด๋‹ค.

 

Q. What is the network address of a host with an IP address of 107.212.146.212/25?

- 107.212.146.208
- 107.128.0.0
- 0.0.0.0
- 64.0.0.0
- 107.212.128.0
- 107.212.146.128
- 107.212.0.0
- 107.208.0.0
- 107.212.146.192

Answer : 107.212.146.128

ํ’€์ด) 107.212.146.212๊ณผ 255.255.255.128๋ฅผ AND ์—ฐ์‚ฐํ•˜๋ฉด 107.212.146.128์ด๋‹ค.

 

Q. What is the network address of a host with an IP address of 166.175.144.121/23?

- 166.128.0.0
- 166.175.144.0
- 166.175.144.96
- 128.0.0.0
- 166.174.0.0
- 166.0.0.0
- 166.0.0.0
- 166.175.144.120

Answer : 166.175.144.0

ํ’€์ด) 166.175.144.121๊ณผ 255.255.254.0๋ฅผ AND ์—ฐ์‚ฐํ•˜๋ฉด 166.175.144.0์ด๋‹ค.

 

Q. What is the network address of a host with an IP address of 116.45.224.50/8?

- 116.0.1.0
- 116.0.0.0
- 116.255.255.0
- 116.255.255.255

Answer : 116.0.0.0

ํ’€์ด) 116.45.224.50๊ณผ 255.0.0.0๋ฅผ AND ์—ฐ์‚ฐํ•˜๋ฉด 116.0.0.0์ด๋‹ค.

 

Q. What is the network address of a host with an IP address of 45.195.37.187/16?

- 45.194.37.187
- 45.0.0.0
- 45.194.0.0
- 45.195.0.0

Answer : 45.195.0.0

 

ํ’€์ด) 45.195.37.187๊ณผ 255.255.0.0๋ฅผ AND ์—ฐ์‚ฐํ•˜๋ฉด 45.195.0.0์ด๋‹ค.

 

Q. What is the broadcast address of a host with an IP address of 51.254.122.100/24?

- 51.254.122.0
- 51.254.122.1
- 51.254.122.254
- 51.254.122.255

Answer : 51.254.122.255

ํ’€์ด) ์„œ๋ธŒ๋„ท ๋งˆ์Šคํฌ 255.255.255.0์˜ 0์ธ ๋ชจ๋“  ๋ถ€๋ถ„์„ 1๋กœ ๋’ค์ง‘์€ ๊ฒƒ์˜ ์‹ญ์ง„์ˆ˜๋Š” 255์ด๋‹ค. ๋”ฐ๋ผ์„œ 51.254.122.255์ด๋‹ค.   

 

2-3) ํ˜ธ์ŠคํŠธ ๊ฐœ์ˆ˜์™€ ์ฃผ์†Œ ๋ฒ”์œ„ ๊ตฌํ•˜๊ธฐ

 

[Network] ์„œ๋ธŒ๋„ท๋งˆ์Šคํฌ(Subnet Mask)๋ž€?

*์„ ํ–‰์ง€์‹ 2018/11/10 - [์ „๊ณต์ง€์‹/Network] - [Network] IP์ฃผ์†Œ๋ž€? 2018/11/11 - [์ „๊ณต์ง€์‹/Network] - [Network] IP์ฃผ์†Œ ํด๋ž˜์Šค(A,B,C class)๋ž€? 1) ์„œ๋ธŒ๋„คํŒ…์ด๋ž€? (Subnetting) ์„œ๋ธŒ๋„ท๋งˆ์Šคํฌ๋ฅผ ์•Œ๊ธฐ ์œ„ํ•ด์„  ๋จผ..

limkydev.tistory.com

Q. What is the maximum number of IP addresses that can be assigned to hosts on a local subnet using the 255.255.255.128 subnet mask?

- 128
- 60
- 126
- 62
- 252
- 258
- 124
- 58
- 64

Answer : 126

ํ’€์ด) IP๋Š” ๋„คํŠธ์›Œํฌ ์˜์—ญ๊ณผ ํ˜ธ์ŠคํŠธ ์˜์—ญ์œผ๋กœ ๋‚˜๋ˆ ์ง€๋Š”๋ฐ ์„œ๋ธŒ๋„ท ๋งˆ์Šคํฌ๊ฐ€ 1์ธ ์˜์—ญ์ด ๋„คํŠธ์›Œํฌ ์˜์—ญ์ด๊ณ  0์ธ ์˜์—ญ์ด ํ˜ธ์ŠคํŠธ ์˜์—ญ์ด๋‹ค.

ํ˜ธ์ŠคํŠธ ์˜์—ญ์—์„œ ํ˜ธ์ŠคํŠธ IP์˜ ๊ฐœ์ˆ˜๋Š” ์„œ๋ธŒ๋„ท ๋งˆ์Šคํฌ์˜ 0์˜ ๊ฐœ์ˆ˜๋ฅผ ์ง€์ˆ˜๋กœ ํ•˜๋Š” 2์˜ ๊ฑฐ๋“ญ์ œ๊ณฑ์—์„œ ๋„คํŠธ์›Œํฌ ์ฃผ์†Œ์™€ ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ ์ฃผ์†Œ, ์ฆ‰ 2๋ฅผ ๋บ€ ๊ฐ’์ด๋‹ค. ์ˆ˜์‹์œผ๋กœ ๋‚˜ํƒ€๋‚ด๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. 2^(32 - 25) - 2 = 128 - 2 = 126

 

Q. What is the maximum number of IP addresses that can be assigned to hosts on a local subnet using the 255.224.0.0 subnet mask?

- 4194306
- 4194302
- 1048578
- 4194300
- 2097148
- 4194298
- 1048574
- 2097150
- 1048576

Answer : 2097150

ํ’€์ด) 2^(32 - 11) - 2 = 2097152 - 2 = 2097150

 

Q. You have an interface on a router with the IP address of 124.144.156.248/21. Including the router interface, how many hosts can have IP addresses on the local network connected to the router interface?

- 1020
- 2050
- 2044
- 4090
- 2046
- 2048
- 4092
- 2042
- 4094

Answer : 2046

 

ํ’€์ด) 2^(32 - 21) - 2 = 2048 - 2 = 2046

 

Q. You have an interface on a router with the IP address of 240.19.3.205/12. Including the router interface, how many hosts can have IP addresses on the local network connected to the router interface?

- 1048576
- 2097154
- 1048574
- 524284
- 1048578
- 2097148
- 1048572

Answer : 1048574

ํ’€์ด) 2^(32 - 12) - 2 = 1048576 - 2 = 1048574

 

Q. Which of the following proposals is the valid host range for the subnet on which the IP address 158.167.18.156/15 resides?

- 158.166.0.1 ~ 158.167.255.253
- 158.165.255.253 ~ 158.167.255.254
- 158.166.0.1 ~ 158.167.255.254
- 158.166.0.2 ~ 158.168.0.2

Answer : 158.166.0.1 ~ 158.167.255.254
Solution : (Network)158.166.0.0 (Broadcast) 158.167.255.255

ํ’€์ด) 158.167.18.156์— /15๋ฅผ ์ ์šฉํ•˜๋ฉด ๋„คํŠธ์›Œํฌ ์ฃผ์†Œ๋Š” 158.166.0.0, ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ ์ฃผ์†Œ๋Š” 158.167.255.255์ž„์„ ๊ตฌํ•  ์ˆ˜ ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ˜ธ์ŠคํŠธ ๋ฒ”์œ„๋Š” 158.166.0.1 ~ 158.167.255.254์ด๋‹ค.

 

Q. Which of the following proposals is the valid host range for the subnet on which the IP address 1.93.149.6/17 resides?

- 1.93.127.255 ~ 1.93.255.250
- 1.93.128.1 ~ 1.94.0.1
- 1.93.128.1 ~ 1.93.255.251
- 1.93.128.1 ~ 1.93.255.254
- 1.93.128.1 ~ 1.94.0.3

Answer : 1.93.128.1 ~ 1.93.255.254
Solution : (Network)1.93.128.0 (Broadcast) 1.93.255.255

ํ’€์ด) 1.93.149.6์— /17๋ฅผ ์ ์šฉํ•˜๋ฉด ๋„คํŠธ์›Œํฌ ์ฃผ์†Œ๋Š” 1.93.128.0, ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ ์ฃผ์†Œ๋Š” 1.93.255.255์ž„์„ ๊ตฌํ•  ์ˆ˜ ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ˜ธ์ŠคํŠธ ๋ฒ”์œ„๋Š” 1.93.128.1 ~ 1.93.255.254์ด๋‹ค.

3. Public/Private IP address

 

๊ณต์ธ(Public) && ์‚ฌ์„ค(Private) IP์˜ ์ฐจ์ด์ 

๐Ÿ’ปโžก๐ŸŒ : ์‚ฌ์„ค IP๋ฅผ ํ• ๋‹น๋ฐ›์€ ์Šค๋งˆํŠธํฐ ํ˜น์€ ๊ฐœ์ธ PC๊ฐ€ ๋ฐ์ดํ„ฐ ํŒจํ‚ท์„ ์ธํ„ฐ๋„ท์œผ๋กœ ์ „์†กํ•˜๋ฉด, ๋ผ์šฐํ„ฐ(๊ณต์œ ๊ธฐ)๊ฐ€ ํ•ด๋‹น ์‚ฌ์„ค IP๋ฅผ ๊ณต์ธ IP๋กœ ๋ฐ”๊ฟ”์„œ ์ „์†กํ•œ๋‹ค.

velog.io

3-1) ์‚ฌ์„ค IP์ฃผ์†Œ ๊ณ ๋ฅด๊ธฐ

Q. Which of the following IP addresses is a private address?

- 169.153.119.123
- 24.23.102.151
- 255.62.136.173
- 10.166.25.20
- 46.244.138.171
- 27.147.158.251

Answer : 10.166.25.20

ํ’€์ด) ์‚ฌ์„ค IP ์ฃผ์†Œ๋Š” 3๊ฐ€์ง€ ์ฃผ์†Œ ๋Œ€์—ญ์œผ๋กœ ๊ณ ์ •์ด ๋œ๋‹ค. Class A๋Š” 10.0.0.0 ~ 10.255.255.255, Class B๋Š” 172.16.0.0 ~ 172.31.255.255, Class C๋Š” 192.168.0.0 ~ 192.168.255.255์ด๋‹ค. ๋ณด๊ธฐ ์ค‘ 10.166.25.20์ด Class A์— ์†ํ•˜๋Š” ์‚ฌ์„ค IP ์ฃผ์†Œ์ด๋‹ค.

 

Q. Which of the following IP addresses is a private address?

- 222.9.230.144
- 135.167.134.35
- 172.32.0.5
- 27.157.141.96
- 172.16.0.2
- 129.244.78.149
- 137.223.167.235

Answer : 172.16.0.2

ํ’€์ด) ๋ณด๊ธฐ์ค‘ 172.16.0.2๊ฐ€ Class B์— ์†ํ•˜๋Š” ์‚ฌ์„ค IP ์ฃผ์†Œ์ด๋‹ค.

 

Q. Which of the following IP addresses is a private address?

- 108.246.233.231
- 146.227.105.173
- 59.155.254.18
- 253.29.133.220
- 192.168.20.253
- 94.152.104.99

Answer : 192.168.20.253

ํ’€์ด) ๋ณด๊ธฐ์ค‘ 192.168.20.253 ๊ฐ€ Class C์— ์†ํ•˜๋Š” ์‚ฌ์„ค IP ์ฃผ์†Œ์ด๋‹ค.

 

4. Transport Layer

 

4- 1) TCP/UDP ํŠน์ง•

 

"๋ฐ์ดํ„ฐ๊ฐ€ ์ „๋‹ฌ๋˜๋Š” ์›๋ฆฌ" OSI 7๊ณ„์ธต ๋ชจ๋ธ๊ณผ TCP/IP ๋ชจ๋ธ

์šฐ์„  ๋ฐ์ดํ„ฐ์˜ ๊ธฐ์ˆ ์  ๊ฐœ๋…๋ถ€ํ„ฐ ์ƒ๊ฐํ•ด๋ณด์ž. ๋ฐ์ดํ„ฐ๋Š” 0ํ˜น์€ 1๋กœ ์ด๋ฃจ์–ด์ง„ `์ˆซ์ž`์ด๊ณ , ์ปดํ“จํ„ฐ๋Š” ์ด์ง„๋ฒ•์˜ ์ˆซ์ž๋ฅผ ์ „๊ธฐ์˜ `์ผœ์ง`๊ณผ `๊บผ์ง`์œผ๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค. ์ฆ‰, ๋ฐ์ดํ„ฐ๋Š” ์•„์ฃผ ๊ธด `์ „๊ธฐ ์‹ ํ˜ธ`

velog.io

 

 

TCP ์™€ UDP ์ฐจ์ด๋ฅผ ์ž์„ธํžˆ ์•Œ์•„๋ณด์ž

TCP์™€ UDP๋Š” TCP/IP์˜ ์ „์†ก๊ณ„์ธต์—์„œ ์‚ฌ์šฉ๋˜๋Š” ํ”„๋กœํ† ์ฝœ์ด๋‹ค. ์ „์†ก๊ณ„์ธต์€ IP์— ์˜ํ•ด ์ „๋‹ฌ๋˜๋Š” ํŒจํ‚ท์˜ ์˜ค๋ฅ˜๋ฅผ ๊ฒ€์‚ฌํ•˜๊ณ  ์žฌ์ „์†ก ์š”๊ตฌ ๋“ฑ์˜ ์ œ์–ด๋ฅผ ๋‹ด๋‹นํ•˜๋Š” ๊ณ„์ธต์ด๋‹ค.

velog.io

 

 

Differences between TCP and UDP - GeeksforGeeks

A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

www.geeksforgeeks.org

Q. Which of the following propositions is not true?

1. UDP is faster, simpler and more efficient than TCP
2. UDP only has the basic error control mechanism
3. UDP is a datagram oriented protocol
4. UDP does not support broadcasting

Answer : UDP does not support broadcasting

ํ’€์ด) 

1. UDP๋Š” ์—ฐ๊ฒฐ์ด ํ•„์š”ํ•œ TCP์™€ ๋‹ฌ๋ฆฌ ๋น ๋ฅด๊ณ  ๊ฐ„๋‹จํ•œ ๋ฐฉ์‹์ด๋‹ค. ๋˜ํ•œ ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ(์ผ ๋Œ€ ๋‹ค)์™€ ๋ฉ€ํ‹ฐ์บ์ŠคํŠธ(๋‹ค ๋Œ€ ๋‹ค) ํ†ต์‹ ์—์„œ ํšจ์œจ์ ์ด๋‹ค.

2. ์ฒดํฌ์„ฌ์„ ์ด์šฉํ•œ ์˜ค๋ฅ˜ ์ œ์–ด ๋ฐฉ์‹๋งŒ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค.

3. ์ด๋ฆ„ ๊ทธ ์ž์ฒด๋กœ Datagram ํ”„๋กœํ† ์ฝœ์ด๋‹ค

4. UDP๋Š” ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ ํ†ต์‹ ์„ ์ง€์›ํ•  ๋ฟ ์•„๋‹ˆ๋ผ ํšจ๊ณผ์ ์ด๋‹ค.

 

Q. Which of the following propositions is not true?

1. TCP is a connection-oriented protocol
2. TCP does not support broadcasting
3. TCP provides extended error checking mechanisms, because it provides flow control and data acknowledgement
4. Data sequencing is a TCP feature (this means that packets arrive in order in the recipient)
5. The delivery of data to the destination cannot be guaranteed in TCP
6. TCP is reliable because it guarantees the delivery of data to the router of the destination

Answer : The delivery of data to the destination cannot be guaranteed in TCP

ํ’€์ด)

1. TCP๋Š” ์—ฐ๊ฒฐ์ด ์„ฑ๊ณตํ•ด์•ผ ํ†ต์‹ ์ด ๊ฐ€๋Šฅํ•œ ์—ฐ๊ฒฐํ˜• ํ”„๋กœํ† ์ฝœ์ด๋‹ค.

2. TCP๋Š” ์œ ๋‹ˆ์บ์ŠคํŠธ(์ผ ๋Œ€ ์ผ) ํ†ต์‹ ๋งŒ ์ง€์›ํ•œ๋‹ค.

3. ํ๋ฆ„ ์ œ์–ด(Flow Control)๋กœ ์ˆ˜์ง„์ž์˜ ๋ฒ„ํผ ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ๋ฅผ ๋ฐฉ์ง€ํ•˜๊ณ  ACK ๋ฒˆํ˜ธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒจํ‚ท์ด ๋„์ฐฉํ–ˆ๋Š”์ง€ ํ™•์ธํ•˜๋Š” ํ™•์žฅ๋œ ์˜ค๋ฅ˜ ๊ฒ€์ถœ ๋ฐฉ์‹์„ ์ œ๊ณตํ•œ๋‹ค.

4. TCP๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„ TCP ํ—ค๋”๋ฅผ ๋ถ™ํžˆ๋Š” ๋ฐ TCP ํ—ค๋”์—๋Š” ์‹œํ€€์Šค ๋ฒˆํ˜ธ๊ฐ€ ๋ถ€์—ฌ ๋˜์–ด์žˆ์–ด ์ˆœ์„œ๊ฐ€ ์กด์žฌํ•œ๋‹ค.

5.  TCP๋Š” ์†ก์‹ ํ•œ ํŒจํ‚ท์ด ์ œ๋Œ€๋กœ ๋„์ฐฉํ•˜์ง€ ์•Š์•˜์œผ๋ฉด ์žฌ์†ก์‹ ์„ ์š”๊ตฌํ•จ์œผ๋กœ ์‹ ๋ขฐ์„ฑ์ด ์žˆ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ „์†กํ•œ๋‹ค.

6. 5๋ฒˆ๊ณผ ๊ฐ™์€ ๋‚ด์šฉ

 

Q. Which of the following propositions is not true?

1. UDP is faster, simpler and more efficient than TCP
2. UDP provides extended error checking mechanisms, because it provides flow control and data acknowledgement
3. UDP is a datagram oriented protocol
4. UDP supports broadcasting

Answer : UDP provides extended error checking mechanisms, because it provides flow control and data acknowledgement

 

Q. Which of the following propositions is not true?

1. TCP is a datagram oriented protocol
2. TCP does not support broadcasting
3. TCP provides extended error checking mechanisms, because it provides flow control and data acknowledgement
4. Data sequencing is a TCP feature (packets arrive in order in the recipient)
5. TCP is reliable because it guarantees the delivery of data to the router of the destination
6. TCP is comparatively slower than UDP

Answer : TCP is a datagram oriented protocol

 

Q. Which of the following services use UDP?

 

1. DHCP 2. SMTP 3. FTP 4. HTTP

- 3
- 1
- 2
- All of the above

Answer : 1

ํ’€์ด) UDP๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์„œ๋น„์Šค: DNS, DHCP, TFTP, SNMP

         TCP๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์„œ๋น„์Šค: HTTP, FTP, SMTP

 

5. Application Layer

 

5-1) DNS/DHCP ํŠน์ง•

 

"๋” ํŽธ๋ฆฌํ•œ ์ธํ„ฐ๋„ท์„ ์œ„ํ•ด" DHCP && DNS ํ”„๋กœํ† ์ฝœ

์œ„์—์„œ ๋ฐฐ์› ๋“ฏ ํด๋ผ์ด์–ธํŠธ์—๊ฒŒ DNS (Domain Name Server)๋ฅผ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์€ DHCP ์„œ๋ฒ„์˜ ์ฑ…์ž„์ด๋‹ค. DNS๋Š” ๋ธŒ๋ผ์šฐ์ง•์„ ๋‹จ์ˆœํ™”ํ•˜๋Š” ๋งค์šฐ ํŠน๋ณ„ํ•œ ๋ชฉ์ ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์ธํ„ฐ๋„ท ์ƒ์˜ ๋˜ ๋‹ค๋ฅธ ์ปดํ“จํ„ฐ๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋‹ค

velog.io

Q. ____ translates Internet domain names and host names into IP addresses

- Network time protocol
- Default routing protocol
- Domain name system
- OSI model system

Answer : Domain name system

 

Q. You want to implement a mechanism that automates IP configuration, including IP address, subnet mask, default gateway and DNS information. What protocol will you use to achieve this?

- SNMP
- DHCP
- SMTP
- ARP

Answer : DHCP

 

Q. What DHCP protocol does it use at the transport layer level?

- ICMP
- TCP
- FTP
- UDP

Answer : UDP

ํ’€์ด) DHCP ํ”„๋กœํ† ์ฝœ์€ ๋ธŒ๋กœ๋“œ์บ์ŠคํŒ… ํ†ต์‹ ์ด ํ•„์š”ํ•˜๋ฏ€๋กœ ์ด๋ฅผ ์ง€์›ํ•ด์ฃผ๋Š” UDP๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.

 

Q. What type of address is supported by DHCP?

- IPv4
- IPv6
- IPv4 and IPv6
- None of them

Answer : IPv4 and IPv6

 

Q. DHCP is used for ___

- IPv4
- Both IPv6 and IPv4
- IPv6
- None of the mentioned

Answer : Both IPv6 and IPv4

๋Œ“๊ธ€