We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
네트워킹 기초: OSI 7 - 레이어 2 - 데이터 링크 계층 - 1부
0:00 Welcome back.
0:01 And in this part of the lesson series,
0:03 we're going to look at layer two have the OSI model,
0:07 which is the data link layer.
0:08 Now the data link layer is one of the most critical layers
0:13 in the entire OSI seven layer model.
0:15 Everything above this point relies on the device to device
0:19 communication which the data link layer provides.
0:22 So when you're sending or receiving data
0:25 to or from the internet,
0:27 just be aware that the data link layer
0:29 is supporting the transfer of that data,
0:32 so it's essential that you understand.
0:35 Now this is going to be one of the longer parts
0:37 of this lesson series because layer two
0:40 actually provides a significant amount of functionality.
0:44 Now before I step through the architecture of layer two,
0:46 we have to start with the fundamentals.
0:50 Layer two, which is the data link layer runs over layer one.
0:55 So layer two network requires a functional
0:58 layer one network to operate.
1:00 And that's something which is common
1:02 throughout the OSI model.
1:04 Higher layers build on lower layers,
1:07 adding features and capabilities.
1:10 A layer two network can run on different types
1:13 of layer one network so copper, fiber, WiFi,
1:17 and provide the same capabilities.
1:20 Now there are different layer two protocols and standards
1:23 for different situations.
1:25 But for now, we're going to focus on Ethernet,
1:28 which is what most local networks use,
1:31 so things in your office or things in your home.
1:34 Now layer two rather than being focused
1:36 on physical wavelengths or voltages
1:39 introduces the concept of frames and frames are a format
1:44 for sending information over a layer two network.
1:48 Layer two also introduces a unique hardware address
1:52 called a MAC address for every device on a network.
1:56 This hardware address is a hexadecimal address,
1:59 it's 48 bits long, and it looks like this so three e, colon,
2:04 two two colon fb, and so on.
2:07 The important thing to understand is that a MAC address
2:09 generally for physical networking is not software assigned,
2:14 the address is uniquely attached
2:17 to a specific piece of hardware.
2:19 A MAC address is formed of two parts, the OUI,
2:23 which is the organizationally unique identifier,
2:27 and this is assigned to companies
2:29 who manufacture network devices.
2:31 So each of these companies will have a separate OUI.
2:36 The second part of the MAC address
2:38 is the network interface controller or NIC specific,
2:42 and this means together, the MAC address on a network card
2:46 should be globally unique.
2:49 Now layer two as I've mentioned uses layer one,
2:52 this means that a layer two or Ethernet frame can be
2:56 transmitted onto the shared physical medium by layer one.
3:01 This means that it's converted into voltages RF or light,
3:05 it's sent across the medium,
3:06 and then received by other devices
3:09 also connected to that shared medium.
3:12 It's important to understand this distinction.
3:15 Layer two provides frames as well as other things
3:18 which I'll cover soon.
3:19 And layer one handles the physical transmission
3:23 and reception onto and from the physical shared medium.
3:28 So when layer one is transmitting a frame
3:31 onto the physical medium,
3:33 layer one doesn't understand the frame,
3:35 layer one is simply transmitting raw data
3:38 onto that physical medium.
3:40 Now a frame which is the thing that layer two uses
3:43 for communication is a container of sorts.
3:46 It has a few different components.
3:49 The first part is the preamble and start frame delimiter.
3:53 And the function of this is to allow devices to know
3:56 that it's the start of the frame,
3:58 so they can identify the various parts of that frame,
4:02 you need to know where the start of the frame is
4:05 to know where the various parts of that frame start.
4:09 Next comes the destination and the source MAC addresses.
4:14 So all devices on a layer two network
4:16 have a unique MAC address and a frame can be sent
4:20 to a specific device on a network
4:23 by putting its MAC address in the destination field
4:26 or you can put all F's if you want to send the frame
4:30 to every device on the local network
4:32 and this is known as a broadcast.
4:34 Now the source MAC address field
4:36 is set to the device address
4:38 of whatever is transmitting the frame,
4:40 and this allows it to receive replies.
4:43 Next is EtherType, and this is commonly used to specify
4:48 which last three protocol is putting its data
4:52 inside a frame, just like layer two uses layer one
4:56 to move raw bitstream data across the shared physical medium
5:01 while layer three users layer two frames
5:04 for device to device communication on a local network.
5:08 And so when you're receiving a frame
5:10 at the other side of the communication,
5:13 you need to know which layer three protocol
5:16 originally put data into that frame.
5:19 A common example might be IP or the Internet Protocol.
5:22 So this is what the EtherType or ET field is used for.
5:26 Now these three fields are commonly known as the MAC header,
5:30 they control the frame destination,
5:32 they indicate the source and specify its function.
5:36 After the header is the payload and this is anywhere
5:39 from 46 to 1500 bytes in size for standard frames.
5:44 It contains the data that the frame is sending,
5:48 the data is generally provided by the layer three protocol
5:52 and the protocol which is being used, as I just mentioned,
5:55 is indicated within the EtherType or ET field.
5:59 Now this process is called encapsulation,
6:02 you have something which layer three generates
6:04 often this is an IP packet, and this is put inside
6:08 an Ethernet frame, it's encapsulated in that frame.
6:12 The frame delivers that data to a different
6:15 layer two destination.
6:17 On the other side, the frame is analyzed,
6:19 and the layer three packet is extracted
6:22 and given back to layer three at the destination side.
6:25 The EtherType field is used to determine
6:29 which layer three protocol receives this at the destination.
6:34 And then finally, at the end of the frame
6:35 is the frame check sequence which is used to identify
6:39 any errors in the frame.
6:41 It's a simple CRC check, it allows the destination to check
6:45 if corruption has occurred or not.
6:48 So that's the frame and it's an important thing
6:50 to understand if you are to understand how all of the bits
6:53 of layer one, two and three fit together.
6:56 So layer two frames are generated by the layer two software
7:00 at the source side, they're passed to layer one,
7:03 that raw data is transmitted onto the physical medium,
7:06 it's taken off the physical medium at the destination side,
7:09 it's passed to its layer two software,
7:12 and that can interpret the frame and pass that on
7:15 to layer three, which can then interpret that data.
7:18 Now as a reminder, this is the problem that we have
7:21 with a purely layer one network implementation.
7:25 We have two devices running a game,
7:27 a laptop on the left and a laptop on the right,
7:30 and these are connected using a single network cable,
7:34 a shared physical medium.
7:36 Now as I mentioned earlier in this lesson series,
7:39 layer one provides no media access control.
7:43 The layer one software running on a network card will simply
7:46 transmit any data it receives onto the physical medium.
7:51 So if the game on the left send some data
7:54 it will be transmitted onto the medium,
7:56 and it will be seen by the device on the right.
7:59 The problem is that the laptop on the right
8:02 could also be sending data at the same time.
8:05 This means the electrical signals
8:07 will overlap and interfere with each other,
8:09 and this is known as a collision.
8:11 And it impacts both pieces of data, it corrupts both.
8:16 This is one of the problems of layer one,
8:18 which is solved by layer two, and layer two provides
8:22 controlled access to the physical medium.
8:25 And let's explore how.
8:27 Okay, so this is the end of part one of this lesson.
8:31 It was getting a little bit on the long side,
8:33 and so I wanted to add a break,
8:35 it's an opportunity just to take a rest or grab a coffee.
8:38 Part two we'll be continuing immediately
8:41 from the end of part one.
8:43 So go ahead complete the video
8:44 and when you're ready, join me in part two.
0:00 다시 오신 걸 환영합니다.
0:01 이번 강의에서는 OSI 모델의 2계층, 즉 데이터 링크 계층에 대해 자세히 알아보겠습니다.
0:08 데이터 링크 계층은 OSI 7계층 모델에서 가장 중요한 계층 중 하나라고 할 수 있습니다.
0:15 이 계층 위로는 전부 데이터 링크 계층이 제공하는 장치 간 통신에 의존하고 있기 때문이죠.
0:22 인터넷으로 데이터를 주고받을 때 데이터 링크 계층이 데이터 전송을 지원한다는 점을 생각하면, 이 계층을 이해하는 것이 얼마나 중요한지 알 수 있습니다.
0:35 2계층은 제공하는 기능이 상당히 많기 때문에 이번 강의가 좀 길어질 것 같습니다.
0:44 2계층의 구조를 살펴보기 전에 기본적인 내용부터 먼저 짚고 넘어가야겠죠.
0:50 데이터 링크 계층, 즉 2계층은 1계층 위에서 작동합니다.
0:55 따라서 2계층 네트워크가 제대로 작동하려면 1계층 네트워크가 먼저 정상적으로 작동해야 합니다. 이건 OSI 모델 전체에 적용되는 일반적인 사항이죠.
1:04 상위 계층은 하위 계층을 기반으로 기능을 추가하는 방식으로 작동합니다.
1:10 2계층 네트워크는 구리, 광섬유, WiFi 등 다양한 유형의 1계층 네트워크에서 동일한 기능을 제공하며 작동할 수 있습니다.
1:20 상황에 따라 다른 2계층 프로토콜과 표준이 있지만, 지금은 대부분의 로컬 네트워크, 예를 들어 사무실이나 가정에서 사용하는 이더넷에 집중해서 살펴보겠습니다.
1:34 2계층은 물리적인 파장이나 전압에 집중하는 대신, '프레임'이라는 개념을 도입합니다. 프레임은 2계층 네트워크를 통해 정보를 보내기 위한 일종의 형식이라고 생각하시면 됩니다.
1:48 또한 2계층은 네트워크의 모든 장치에 'MAC 주소'라는 고유한 하드웨어 주소를 부여합니다.
1:56 이 하드웨어 주소는 16진수 주소로, 48비트 길이를 가지며, '3e:22:fb' 이런 식으로 표현됩니다.
2:07 중요한 점은 물리적 네트워킹에서 MAC 주소는 일반적으로 소프트웨어로 할당되지 않는다는 것입니다. 특정 하드웨어에 고유하게 연결되어 있다는 거죠.
2:19 MAC 주소는 OUI(Organizationally Unique Identifier)와 네트워크 인터페이스 컨트롤러(NIC)라는 두 부분으로 구성됩니다. OUI는 네트워크 장치를 제조하는 회사에 할당됩니다.
2:31 따라서 각 회사마다 고유한 OUI를 가지고 있습니다.
2:36 MAC 주소의 두 번째 부분은 네트워크 인터페이스 컨트롤러(NIC)에 특화되어 있습니다. 즉, 네트워크 카드의 MAC 주소는 전 세계적으로 유일해야 한다는 의미입니다.
2:49 앞서 말씀드렸듯이 2계층은 1계층을 사용합니다.
2:52 다시 말해, 2계층 또는 이더넷 프레임은 1계층에서 공유 물리적 매체로 전송될 수 있습니다.
3:01 즉, 전압, RF 또는 빛으로 변환되어 매체를 통해 전송된 다음, 해당 공유 매체에 연결된 다른 장치에서도 수신된다는 뜻입니다.
3:12 이 구분을 이해하는 것이 중요합니다.
3:15 2계층은 프레임과 관련된 여러 기능들을 제공하고, 1계층은 물리적인 공유 매체로의/로부터의 물리적인 전송 및 수신을 담당합니다.
3:28 따라서 1계층이 물리적 매체로 프레임을 전송할 때, 1계층은 프레임의 내용을 이해하지 못합니다. 그냥 원시 데이터를 해당 물리적 매체로 전송할 뿐이죠.
3:40 이제 2계층이 통신에 사용하는 프레임은 일종의 '컨테이너'라고 생각하시면 됩니다.
3:46 여기에는 몇 가지 구성 요소가 있습니다.
3:49 첫 번째는 프리앰블과 시작 프레임 구분 기호입니다. 이 기능은 장치가 프레임의 시작을 알 수 있도록 해서, 해당 프레임의 다양한 부분을 식별할 수 있도록 돕습니다.
4:02 프레임의 시작 위치를 알아야 그 안에 있는 다양한 부분들이 어디서부터 시작되는지 알 수 있겠죠.
4:09 다음은 대상 및 소스 MAC 주소입니다.
4:14 2계층 네트워크의 모든 장치에는 고유한 MAC 주소가 있으며, 이 MAC 주소를 대상 필드에 넣으면 네트워크의 특정 장치로 프레임을 보낼 수 있습니다. 또는 로컬 네트워크의 모든 장치로 프레임을 보내려면 'F'를 모두 채울 수 있는데, 이걸 '브로드캐스트'라고 합니다.
4:34 소스 MAC 주소 필드는 프레임을 전송하는 장치의 주소로 설정되며, 이를 통해 응답을 받을 수 있습니다.
4:43 다음은 EtherType입니다. 이건 3계층 프로토콜이 프레임 내부에 데이터를 넣는 것을 지정하는 데 주로 사용됩니다. 2계층이 1계층을 사용하여 공유 물리적 매체를 통해 원시 비트 스트림 데이터를 이동시키는 것처럼, 3계층 사용자는 로컬 네트워크에서 장치 간 통신을 위해 2계층 프레임을 사용하는 거죠.
5:08 따라서 통신하는 상대방에서 프레임을 수신할 때, 원래 해당 프레임에 데이터를 넣은 3계층 프로토콜이 무엇인지 알아야 합니다.
5:19 일반적인 예로는 IP, 즉 인터넷 프로토콜이 있습니다.
5:22 바로 이런 이유 때문에 EtherType 또는 ET 필드가 사용되는 겁니다.
5:26 이 세 필드는 일반적으로 'MAC 헤더'라고 불립니다. 프레임의 대상을 제어하고, 소스를 나타내며, 기능을 지정하죠.
5:36 헤더 다음에는 '페이로드'가 옵니다. 표준 프레임의 경우 크기가 46~1500바이트 정도 됩니다.
5:44 페이로드는 프레임이 보내는 데이터를 포함합니다.
5:48 이 데이터는 일반적으로 3계층 프로토콜에서 제공되며, 앞서 언급했듯이 사용 중인 프로토콜은 EtherType 또는 ET 필드 안에 표시됩니다.
5:59 이 과정을 '캡슐화'라고 합니다.
6:02 3계층에서 생성하는 것(주로 IP 패킷)이 있고, 이것이 이더넷 프레임 내부에 들어가는 거죠. 해당 프레임에 캡슐화되는 겁니다.
6:12 프레임은 해당 데이터를 다른 2계층 대상으로 전달합니다.
6:17 반대편에서는 프레임이 분석되고 3계층 패킷이 추출되어 대상 측의 3계층으로 다시 전달됩니다.
6:25 EtherType 필드는 대상에서 이를 수신하는 3계층 프로토콜을 결정하는 데 사용됩니다.
6:34 마지막으로 프레임 끝에는 프레임의 오류를 식별하는 데 사용되는 '프레임 검사 시퀀스'가 있습니다.
6:41 간단한 CRC 검사 방식이죠. 이걸 통해 대상은 데이터 손상이 발생했는지 여부를 확인할 수 있습니다.
6:48 이게 바로 프레임이며, 1, 2, 3계층의 모든 비트가 어떻게 연결되는지 이해하려면 반드시 알아야 할 중요한 개념입니다.
6:56 2계층 프레임은 소스 측의 2계층 소프트웨어에서 생성되어 1계층으로 전달됩니다. 해당 원시 데이터는 물리적 매체로 전송되어 대상 측에서 물리적 매체에서 다시 추출되어 2계층 소프트웨어로 전달됩니다. 그러면 프레임을 해석하고 3계층으로 전달할 수 있으며, 3계층은 해당 데이터를 해석할 수 있게 되는 거죠.
7:18 다시 한번 말씀드리지만, 이건 순수한 1계층 네트워크 구현에서 발생하는 문제입니다.
7:25 왼쪽에 있는 랩톱과 오른쪽에 있는 랩톱, 두 장치가 게임을 하고 있는데, 이들은 단일 네트워크 케이블, 즉 공유 물리적 매체를 사용하여 연결되어 있습니다.
7:36 이 강의 앞부분에서 언급했듯이 1계층은 미디어 액세스 제어를 제공하지 않습니다.
7:43 네트워크 카드에서 실행되는 1계층 소프트웨어는 수신하는 모든 데이터를 물리적 매체로 전송합니다.
7:51 따라서 왼쪽의 게임에서 데이터를 보내면 매체로 전송되어 오른쪽 장치에서도 볼 수 있습니다.
7:59 문제는 오른쪽 랩톱도 동시에 데이터를 보낼 수 있다는 겁니다.
8:05 즉, 전기 신호가 겹쳐서 서로 간섭을 일으키는데, 이걸 '충돌'이라고 합니다.
8:11 그리고 두 데이터 조각 모두 손상됩니다.
8:16 이것은 2계층에서 해결해야 하는 1계층의 문제 중 하나이며, 2계층은 물리적 매체에 대한 제어된 액세스를 제공합니다.
8:25 어떻게 하는지 한번 살펴보겠습니다.
8:27 좋습니다. 이걸로 이번 강의 1부가 끝났습니다.
8:31 내용이 좀 길어지고 있어서 잠시 쉬어가는 시간을 가지려고 합니다. 커피 한 잔 하면서 잠깐 쉬어가세요.
8:38 2부에서는 1부의 마지막 내용에서 바로 이어집니다.
8:43 자, 그럼 어서 비디오를 끝까지 시청하시고, 준비되면 2부에서 만나요!
번역된 시간: 2025-03-09T11:10:44Z
번역 버전: 3.1 Improved translation step with full context