๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Computer Science/Network

10 ๋ฐ์ดํ„ฐ ๋งํฌ ๊ณ„์ธต - Data Link Layer + MAC Address

by Dowon Kang 2023. 12. 21.

 

๋ฐ์ดํ„ฐ ๋งํฌ ๊ณ„์ธต์€ OSI(Open Systems Interconnection) ๋ชจ๋ธ์—์„œ ๋‘ ์žฅ์น˜ ๊ฐ„์˜ ์ง์ ‘ ํ†ต์‹ ์„ ๋‹ด๋‹นํ•˜๋Š” ๋‘ ๋ฒˆ์งธ ๊ณ„์ธต์ž…๋‹ˆ๋‹ค.

 

๋ฐ์ดํ„ฐ ๋งํฌ ๊ณ„์ธต์€ ๋„คํŠธ์›Œํฌ ์žฅ๋น„ ๊ฐ„์— ์‹ ํ˜ธ๋ฅผ ์ฃผ๊ณ ๋ฐ›๋Š” ๊ทœ์น™์„ ์ •ํ•˜๋Š” ๊ณ„์ธต์ž…๋‹ˆ๋‹ค.

 

์ด ๋•Œ, ์‚ฌ์šฉ๋˜๋Š” ๊ทœ์น™(ํ”„๋กœํ† ์ฝœ)์ด '์ด๋”๋„ท(Ethernet)' ์ž…๋‹ˆ๋‹ค. ์ด๋”๋„ท์€ ๋žœ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ •์ƒ์ ์œผ๋กœ ์ฃผ๊ณ ๋ฐ›๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•œ ๊ทœ์น™์œผ๋กœ ์ปดํ“จํ„ฐ ๋„คํŠธ์›Œํฌ ๊ธฐ์ˆ  ์ค‘ ํ•˜๋‚˜๋กœ ์ „ ์„ธ๊ณ„ ์‚ฌ๋ฌด์‹ค์ด๋‚˜ ๊ฐ€์ •์—์„œ ๊ฐ€์žฅ ๋งŽ์ด ํ™œ์šฉ๋˜๋Š” ๊ธฐ์ˆ  ์ค‘ ํ•˜๋‚˜์ž…๋‹ˆ๋‹ค.

 

์ด๋”๋„ท์€ ๋ฐ์ดํ„ฐ ๋งํฌ ๊ณ„์ธต์—์„œ ๊ฐ€์žฅ ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๋Š” ํ”„๋กœํ† ์ฝœ ์ค‘ ํ•˜๋‚˜๋กœ, ๋กœ์ปฌ ์˜์—ญ ๋„คํŠธ์›Œํฌ(LAN)์—์„œ ์ฃผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. 

 

 

 

๊ทธ๋Ÿฐ๋ฐ ์—ฌ๋Ÿฌ ์ปดํ“จํ„ฐ๊ฐ€ ํŠน์ •ํ•œ ๋ชฉ์ ์ง€๋กœ ๋™์‹œ์— ๋ฐ์ดํ„ฐ๋ฅผ ์†ก์‹ ํ•˜๋ฉด ์ถฉ๋Œ(Collision)์ด ์ผ์–ด๋‚  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ฐ์ดํ„ฐ์˜ ์ถฉ๋Œ์„ ํ”ผํ•˜๊ธฐ ์œ„ํ•ด์„œ ์ด๋”๋„ท์€ CSMA/CD (Carrier Sense Multiple Access with Collision Detection) ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜์—ฌ ์ถฉ๋Œ์„ ๊ฐ์ง€ํ•˜๊ณ  ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

 

CSMA/CD

1) CS : ๋ฐ์ดํ„ฐ๋ฅผ ๋ณด๋‚ด๋ ค๊ณ  ํ•˜๋Š” ์ปดํ“จํ„ฐ๊ฐ€ ์ผ€์ด๋ธ”์— ์‹ ํ˜ธ๊ฐ€ ํ๋ฅด๋Š”์ง€ ํ™•์ธ

2) MA : ์ผ€์ด๋ธ”์— ๋ฐ์ดํ„ฐ๊ฐ€ ํ๋ฅด์ง€ ์•Š๋Š”๋‹ค๋ฉด ๋ฐ์ดํ„ฐ๋ฅผ ๋ณด๋‚ด๋„ ์ข‹๋‹ค๋Š” ๊ทœ์น™

3) CD : ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•˜๊ณ  ์žˆ๋Š”์ง€๋ฅผ ํ™•์ธ 

 

ํ•˜์ง€๋งŒ ์š”์ฆ˜์—๋Š” ํšจ์œจ์ด ๋ณ„๋กœ ์ข‹์ง€ ๋ชปํ•˜์—ฌ CSMA/CD ๋ฐฉ์‹๋ณด๋‹ค๋Š” ์Šค์œ„์น˜(Switch)๋ผ๋Š” ๋„คํŠธ์›Œํฌ ์žฅ๋น„๋ฅผ ๋” ์ž์ฃผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. 

 

 


 

 

 

์ด์ œ MAC ์ฃผ์†Œ์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๋žœ ์นด๋“œ๋Š” ๋น„ํŠธ์—ด (0๊ณผ 1)์„ ์ „๊ธฐ ์‹ ํ˜ธ๋กœ ๋ฐ”๊ฟ”๋Š” ์—ญํ• ์„ ํ•œ๋‹ค๊ณ  ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด ๋žœ ์นด๋“œ์—๋Š” MAC ์ฃผ์†Œ๋ผ๋Š” ๋ฒˆํ˜ธ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์Šต๋‹ˆ๋‹ค.

MAC ์ฃผ์†Œ๋Š” ๋žœ์— ์‚ฌ์šฉ๋˜๋Š” ๋„คํŠธ์›Œํฌ ๋ชจ๋ธ์ธ ์ด๋”๋„ท์˜ ๋ฌผ๋ฆฌ์ ์ธ ์ฃผ์†Œ๋กœ ์ปดํ“จํ„ฐ ๋„คํŠธ์›Œํฌ์—์„œ ๊ฐ๊ฐ์˜ ๊ธฐ๊ธฐ๋ฅผ ๊ตฌ๋ถ„ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด ์ „ ์„ธ๊ณ„์—์„œ ์œ ์ผํ•œ ๋ฒˆํ˜ธ๋กœ ํ• ๋‹น๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. 

 

MAC ์ฃผ์†Œ๋Š” 48๋น„ํŠธ ๊ธธ์ด์˜ ๊ณ ์œ ํ•œ ์‹๋ณ„์ž๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์ฃผ์†Œ๋Š” 16์ง„์ˆ˜๋กœ ๋‚˜ํƒ€๋‚ด๋ฉฐ, 12์ž๋ฆฌ๋กœ ํ‘œํ˜„๋ฉ๋‹ˆ๋‹ค.

MAC ์ฃผ์†Œ์˜ ์•ž 24๋น„ํŠธ๋Š” ์ œ์กฐ์—…์ฒด ์‹๋ณ„์ž(Organizationally Unique Identifier, OUI)๋กœ ์ผ๋ฐ˜์ ์œผ๋กœ ์žฅ์น˜๋ฅผ ์ œ์กฐํ•œ ํšŒ์‚ฌ๋‚˜ ์กฐ์ง์„ ์‹๋ณ„ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚˜๋จธ์ง€ 24๋น„ํŠธ๋Š” ์žฅ์น˜๋ฅผ ์ œ์กฐํ•œ ํšŒ์‚ฌ ๋‚ด์—์„œ ํ•ด๋‹น ์žฅ์น˜๋ฅผ ๊ณ ์œ ํ•˜๊ฒŒ ์‹๋ณ„ํ•˜๋Š” ์ผ๋ จ ๋ฒˆํ˜ธ ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค. 

 

๋ฐ์ดํ„ฐ ๋งํฌ ๊ณ„์ธต์—์„œ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ „์†กํ•˜๊ธฐ ์œ„ํ•ด์„œ ์ด๋”๋„ท ํ—ค๋”์™€ ํŠธ๋ ˆ์ผ๋Ÿฌ๋ฅผ ๋ถ™์ž…๋‹ˆ๋‹ค.

์ด๋”๋„ท ํ—ค๋”๋Š” ๋ชฉ์ ์ง€์˜ MAC ์ฃผ์†Œ(6๋ฐ”์ดํŠธ)์™€ ์ถœ๋ฐœ์ง€ MAC ์ฃผ์†Œ(6๋ฐ”์ดํŠธ)๊ฐ€ ํ• ๋‹น๋ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์œ ํ˜•(2๋ฐ”์ดํŠธ)๊ฐ€ ํ—ค๋”์™€ ๋ฐ์ดํ„ฐ ์‚ฌ์ด์— ์ถ”๊ฐ€๋กœ ๋ถ™์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ฐ์ดํ„ฐ ๋’ค์— ํŠธ๋ ˆ์ผ๋Ÿฌ๋ฅผ ๋ถ™์ด๋ฉด ๋ฐ์ดํ„ฐ๊ฐ€ ์ „์†ก ๋„์ค‘์— ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋Š” ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ FCS(Frame Check Sequence)๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ 2๊ณ„์ธต์—์„œ ์™„์„ฑ๋œ ๋ชจ์Šต์ด ๋ฐ”๋กœ 'ํ”„๋ ˆ์ž„(Frame)'์ž…๋‹ˆ๋‹ค. 

 

 


 

 

P.S)

2๋ฐ”์ดํŠธ๋ฅผ ์ฐจ์ง€ํ•˜๋Š” ์ด๋”๋„ท ์œ ํ˜•์€ ์ด๋”๋„ท์œผ๋กœ ์ „์†ก๋˜๋Š” ์ƒ์œ„ ๊ณ„์ธต ํ”„๋กœํ† ์ฝœ์˜ ์ข…๋ฅ˜๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. 

 

1) 0800 - IPv4 

2) 0806 - ARP 

3) 8035 - RARP 

4) 814C - SNMP over Ethernet 

5) 86DD - IPv6

 

์ด๋ ‡๊ฒŒ ์ƒ์œ„ ๊ณ„์ธต ํ”„๋กœํ† ์ฝœ์˜ 16์ง„์ˆ˜ ๋ฒˆํ˜ธ๊ฐ€ ๋“ค์–ด๊ฐ€๋ฉฐ ๊ตณ์ด ๋ฒˆํ˜ธ๊นŒ์ง€ ๊ธฐ์–ตํ•  ํ•„์š”๋Š” ์—†์ง€๋งŒ ์ด๋Ÿฌํ•œ ๋‚ด์šฉ์ด ๋“ค์–ด๊ฐ„๋‹ค๋Š” ์ ๋งŒ ์•Œ๊ณ  ๊ณ„์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. 

 

 

 


Data Link Layer: The second layer in the OSI model responsible for direct communication between devices on a network. It provides error detection, flow control, and addressing within the local network.

 

Ethernet: A widely used LAN technology that operates at the Data Link Layer. Ethernet uses a protocol to control access to the network and facilitates the transmission of data between devices.


CSMA/CD (Carrier Sense Multiple Access with Collision Detection): A network protocol used in Ethernet networks to manage access to the shared communication medium. Devices listen for a carrier signal, and if the medium is clear, they transmit; if a collision is detected, a backoff algorithm is used.


MAC Address (Media Access Control Address): A unique hardware address assigned to network interfaces for communication at the Data Link Layer. The 48-bit address is often represented in hexadecimal and is used for identifying devices on a network.

 

Frame: A data structure at the Data Link Layer that encapsulates the data being transmitted over a network. It includes header and trailer information, such as source and destination MAC addresses, to facilitate reliable communication between devices.

 

๋Œ“๊ธ€