OSI 7 Layers
Last updated
Last updated
μμ΄λ‘ λ λΆλΆμ μ²μμ 곡λΆν λ΄μ© & νκΈλ‘ λ λΆλΆμ μ± λ³΄λ©° λ€μ 곡λΆν λ΄μ©
Reference: [μ± ] IT μμ§λμ΄λ₯Ό μν λ€νΈμν¬ μ λ¬Έ
κ³Όκ±°μλ ν΅μ μ© κ·μ½μ΄ νμ€νλμ§ μμμ νΈνλμ§ μλ systemμ΄λ applicationμ΄ λ§μκ³ ν΅μ μ΄ λΆκ°λ₯ νμ
μ΄κ²μ νλμ κ·μ½μΌλ‘ ν΅ν© νλ €λ λ
Έλ ₯μ΄ νμ¬μ OSI 7 Layers
λ‘ λ¨μμλ€!
OSI 7 Layers
κ° network λμμ λλμ΄ μ΄ν΄νκ³ κ°λ°νλλ° λμμ΄ λλ―λ‘ main network reference modelλ‘ νμ©λκ³ μμ§λ§,
νμ¬ λλΆλΆμ protocolμ TCP/IP protocol stack κΈ°λ°μΌλ‘ λμ΄ μλ€
OSI (= Open Systems Interconnection) is a 7 layer architecture with each layer having specific functionality to perform.
All these 7 layers work collaboratively to transmit the data from one person to another across the globe.
OSI 7 Layersλ κ³μΈ΅μ μν κ³Ό λͺ©νμ λ°λΌ λ κ°μ§ κ³μΈ΅μΌλ‘ λλ μ μλ€.
Lower Layer
Data Flow Layer
dataλ₯Ό μλλ°©μκ² μ μ λ¬νλ μν μ κ°κ³ μλ€
Upper Layer
Application Layer
dataλ₯Ό λ§λλ μν μ νλ λΆλΆμ΄λ€
application κ°λ°μ
data flow layerλ₯Ό κ³ λ €νμ§ μκ³ dataλ₯Ό νννλ λ° μ΄μ μ λ§μΆλ€
Top-down
νμμΌλ‘ networkλ₯Ό λ°λΌλ³Έλ€
network engineer
application layerλ application κ°λ°μλ€μ΄ κ³ λ €ν΄μΌ ν μμμ΄λ―λ‘ network engineerλ μ΄ λΆλΆμ λν΄ μΌλ°μ μΌλ‘ μ¬κ°νκ² κ³ λ―Όνμ§ μλλ€
Bottom-up
νμμΌλ‘ networkλ₯Ό λ°λΌλ³Έλ€
The lowest layer of the OSI reference model is the physical layer.
It is responsible for the actual physical connection between the devices.
The physical layer contains information in the form of bits.
It is responsible for transmitting individual bits from one node to the next.
When receiving data, this layer will get the signal received and convert it into 0s and 1s and send them to the Data Link layer, which will put the frame back together.
물리μ μ°κ²°κ³Ό κ΄λ ¨λ μ 보λ₯Ό μ μ
μ£Όλ‘ μ κΈ° μ νΈ λ₯Ό μ λ¬νλλ° μ΄μ μ΄ λ§μΆμ΄μ Έ μμ
λ€μ΄μ¨ μ κΈ° μ νΈλ₯Ό κ·Έλλ‘ μ μ λ¬νλ κ²μ΄ λͺ©μ μ΄λ―λ‘ μ κΈ° μ νΈκ° 1κ³μΈ΅ μ₯λΉ
μ λ€μ΄μ€λ©΄ μ΄ μ κΈ° μ νΈλ₯Ό μ¬μμ±νμ¬ λ΄λ³΄λΈλ€
1κ³μΈ΅ μ₯λΉλ μ£Όμμ κ°λ μ΄ μλ€!
μ νΈκ° λ€μ΄μ¨ portλ₯Ό μ μΈνκ³ λͺ¨λ portμ κ°μ μ κΈ° μ νΈλ₯Ό μ μ‘νλ€
μ¦, μΆλ°μ§μ λͺ©μ μ§λ₯Ό κ΅¬λΆ ν μ μλ€
The data link layer is responsible for the node to node delivery of the message.
The main function of this layer is to make sure data transfer is error-free from one node to another, over the physical layer.
When a packet
arrives in a network, it is the responsibility of DLL to transmit it to the Host using its MAC address
.
Data Link Layer is divided into two sub layers :
Logical Link Control (LLC)
Media Access Control (MAC)
The packet received from Network layer is further divided into frames depending on the frame size of NIC(Network Interface Card)
.
DLL encapsulates Sender and Receiverβs MAC address in the header.
μ κΈ° μ νΈλ₯Ό λͺ¨μ μ°λ¦¬κ° μμλ³Ό μ μλ data ννλ‘ μ²λ¦¬νλ€
1κ³μΈ΅κ³Όλ λ€λ₯΄κ² μ κΈ° μ νΈλ₯Ό μ νν μ λ¬νκΈ° 보λ€λ μ£Όμ μ 보
λ₯Ό μ μνκ³ μ νν μ£Όμ
λ‘ ν΅μ νλλ° μ΄μ μ΄ λ§μΆμ΄μ Έ μλ€
μΆλ°μ§
μ λμ°©μ§
μ£Όμλ₯Ό νμΈνκ³ λ΄κ² λ³΄λΈ κ²μ΄ λ§λμ§ or λ΄κ° μ²λ¦¬ν΄μΌ νλμ§μ λν΄ κ²μ¬ν νμ data μ²λ¦¬λ₯Ό μννλ€
2κ³μΈ΅μμλ μ£Όμ 체κ³
κ° μκΈ°λ©΄μ μ¬λ¬ ν΅μ μ΄ νκΊΌλ²μ μ΄λ£¨μ΄μ§λ κ²μ ꡬλΆνκΈ° μν κΈ°λ₯μ΄ μ£Όλ‘ μ μλλ€
μ κΈ° μ νΈ
λ₯Ό λͺ¨μ data ννλ‘ μ²λ¦¬νλ―λ‘ dataμ λν errorλ₯Ό νμ§νκ±°λ κ³ μΉλ μν μ μνν μ μλ€
Ethernet κΈ°λ° networkμ 2κ³μΈ΅μμλ errorλ₯Ό νμ§νλ μν λ§ μννλ€
μ£Όμ 체κ³κ° μκΈ΄λ€λ κ²μ ν λͺ κ³Ό ν΅μ νλ κ²μ΄ μλλΌ λμμ μ¬λ¬ λͺ κ³Ό ν΅μ ν μ μλ€λ κ²μ΄λ―λ‘ λ¬΄μμ dataλ₯Ό λμ§λ κ²μ΄ μλλΌ λ°λ μ¬λμ΄ νμ¬ dataλ₯Ό λ°μ μ μλμ§ νμΈ νλ μμ λΆν° ν΄μΌ νλ€
μ΄ μν μ Flow Control
μ΄λΌκ³ λΆλ₯Έλ€
Flow Control
μλ²μμ μ€μμΉλ‘ data μ μ‘
μ€μμΉ νΌμ‘ μν© λ°μ. μ€μμΉλ μλ²λ‘ Pause frame μ μ‘
μλ²λ Pause frame μμ μ λκΈ°
2κ³μΈ΅μ network κ΅¬μ± μμλ Network Interface Card
μ Switch
μ΄λ€
2κ³μΈ΅μ κ°μ₯ μ€μν νΉμ§μ MAC μ£ΌμλΌλ μ£Όμ 체κ³κ° μλ€λ κ²μ΄λ€
2κ³μΈ΅μμ λμνλ Network Interface Card
μ Switch
λͺ¨λ MAC μ£Όμλ₯Ό μ΄ν΄ν μ μκ³ , Switch
λ MAC μ£Όμλ₯Ό λ³΄κ³ ν΅μ ν΄μΌ ν portλ₯Ό μ§μ ν΄ λ΄λ³΄λ΄λ λ₯λ ₯μ΄ μλ€
Network Interface Card λμ λ°©μ
μ κΈ° μ νΈλ₯Ό data ννλ‘ λ§λ λ€
λͺ©μ μ§ MAC μ£Όμμ μΆλ°μ§ MAC μ£Όμλ₯Ό νμΈνλ€
Network Interface Cardμ MAC μ£Όμλ₯Ό νμΈνλ€
λͺ©μ μ§ MAC μ£Όμμ Network Interface Cardκ° κ°κ³ μλ MAC μ£Όμκ° λ§μΌλ©΄ dataλ₯Ό μ²λ¦¬νκ³ , λ€λ₯΄λ©΄ dataλ₯Ό νκΈ°νλ€
Switch λμ λ°©μ
Swtichλ λ¨λ§μ΄ μ΄λ€ MAC μ£ΌμμΈμ§, μ°κ²°λ portλ μ΄λ κ²μΈμ§ μ£Όμ μ΅λ (Address learning) κ³Όμ μμ μ μ μλ€
μ΄ dataλ₯Ό κΈ°λ°μΌλ‘ λ¨λ§λ€μ΄ ν΅μ ν λ portλ₯Ό μ μ ν filtering νκ³ , μ νν portλ‘ forwarding ν΄μ€λ€
Switchμ μ μ ν filteringκ³Ό forwarding κΈ°λ₯μΌλ‘ ν΅μ μ΄ νμν portλ§ μ¬μ©νκ³ , network μ 체μ λΆνμν μ²λ¦¬κ° κ°μνλ©΄μ
Ethernet network ν¨μ¨μ±μ΄ ν¬κ² ν₯μλμκ³ ,
Ethernet κΈ°λ° networkκ° κΈμ¦νλ κ³κΈ°κ° λμλ€!
Network layer works for the transmission of data from one host to the other located in different networks.
It also takes care of packet routing
i.e. selection of the shortest path to transmit the packet, from the number of routes available.
The sender & receiverβs IP address are placed in the header by the network layer.
The functions of the Network layer are :
Routing
The network layer protocols determine which route is suitable from source to destination.
This function of network layer is known as routing.
Logical Addressing
In order to identify each device on internetwork uniquely, network layer defines an addressing scheme.
The sender & receiverβs IP address are placed in the header by network layer.
Such an address distinguishes each device uniquely and universally.
Network layer is implemented by networking devices such as routers
3κ³μΈ΅μμλ IP μ£Όμ
μ κ°μ λ
Όλ¦¬μ μΈ μ£Όμκ° μ μλλ€
data ν΅μ μ ν λμλ λ κ°μ§ μ£Όμκ° μ¬μ©λλ€
2κ³μΈ΅μ 물리μ μΈ MAC μ£Όμ
3κ³μΈ΅μ λ Όλ¦¬μ μΈ IP μ£Όμ
MAC μ£Όμμ λ¬λ¦¬ IP μ£Όμλ μ¬μ©μκ° νκ²½μ λ§κ² λ³κ²½ν΄ μ¬μ©ν μ μλ€
IPμ£Όμλ λ€νΈμν¬ μ£Όμ λΆλΆ
κ³Ό νΈμ€νΈ μ£Όμ λΆλΆ
μΌλ‘ λλλ€
3κ³μΈ΅μ μ΄ν΄ν μ μλ μ₯λΉλ λ¨λ§μ λ€νΈμν¬ μ£Όμ μ 보λ₯Ό μ΄μ©ν΄μ
μμ μ΄ μν λ€νΈμν¬
μ μκ²©μ§ λ€νΈμν¬
λ₯Ό ꡬλΆν μ μκ³
μκ²©μ§ λ€νΈμν¬λ₯Ό κ°λ €λ©΄ μ΄λλ‘ κ°μΌνλμ§ κ²½λ‘λ₯Ό μ§μ ν μ μλ€
3κ³μΈ΅μμ λμνλ μ₯λΉλ Routerλ€
Routerλ 3κ³μΈ΅μμ μ μν IP μ£Όμλ₯Ό μ΄ν΄ν μ μλ€
Routerλ IP μ£Όμλ₯Ό μ¬μ©ν΄ μ΅μ μ κ²½λ‘λ₯Ό μ°Ύμμ£Όκ³ , ν΄λΉ κ²½λ‘λ‘ packet
μ μ μ‘νλ μν μ νλ€
Transport layer provides services to application layer and takes services from network layer.
The data in the transport layer is referred to as Segments
.
It is responsible for the End to End Delivery of the complete message.
The transport layer also provides the acknowledgement of the successful data transmission and re-transmits the data if an error is found.
Transport layer is operated by the Operating System
.
It is a part of the OS and communicates with the Application Layer (Layer 7) by making system calls.
Transport Layer is called as Heart of OSI model.
4κ³μΈ΅μ 1~3κ³μΈ΅κ³Όλ λ€λ₯Έ μν μ νλ€
νμ κ³μΈ΅ (Layer 1~4)μ dataλ₯Ό μͺΌκ° μ 보λ₯Ό λΆμ¬ λͺ©μ μ§κΉμ§ μ μ λ¬νλ μν μ νλλ°,
1~3κ³μΈ΅μ μ νΈμ dataλ₯Ό μ¬λ°λ₯Έ μμΉλ‘ 보λ΄κ³ , μ€μ μ νΈλ₯Ό μ λ§λ€μ΄ 보λ΄λλ° μ§μ€νλ€
λ°λ©΄ 4κ³μΈ΅μ μ€μ λ‘ ν΄λΉ dataλ€μ΄ μ μμ μΌλ‘ μ 보λ΄μ§λλ‘ νμΈνλ μν μ νλ€
Packet network
λ dataλ₯Ό λΆν ν΄ packetμ μ€μ΄λ³΄λ΄λ€ 보λ μ€κ°μ packetμ΄ μ μ€λκ±°λ μμκ° λ€λ°λλ κ²½μ°κ° μκΈΈ μ μλ€
μ΄λ΄ λ λ°λ‘ μ‘μμ£Όλ μν μ 4κ³μΈ΅μμ λ΄λΉνλ€
4κ³μΈ΅μμ packetμ λΆν ν λ packet header
μ 보λ΄λ μμμ λ°λ μμλ₯Ό μ μ΄ ν΅μ νλ―λ‘
packetμ΄ μ μ€λλ©΄ μ¬μ μ‘μ μμ²ν μ μκ³ ,
μμκ° λ€λ°λλλΌλ λ°λ‘ μ‘μ μ μλ€
Packetμ 보λ΄λ μμλ₯Ό λͺ
μν κ²μ΄ μνμ€ λ²νΈ(Sequence Number)
μ΄κ³ ,
Packetμ λ°λ μμλ₯Ό λͺ
μν κ²μ΄ ACK λ²νΈ(Acknowledgement Number)
μ΄λ€
μ₯μΉ λ΄μ λ§μ applicationμ ꡬλΆν μ μλλ‘ ν¬νΈ λ²νΈ(Port Number)
λ₯Ό μ¬μ©ν΄ μμ applicationμ ꡬλΆνλ€
4κ³μΈ΅μμ λμ₯νλ μ₯λΉλ Load Balancerμ λ°©νλ²½μ΄λ€
μ΄ μ₯λΉλ€μ 4κ³μΈ΅μμ λ³Ό μ μλ application ꡬλΆμ (Port Number
)μ Sequence
, ASK number
μ 보λ₯Ό μ΄μ©ν΄μ
λΆνλ₯Ό λΆμ°νκ±°λ 보μ μ μ± μ μλ¦½ν΄ packetμ ν΅κ³Ό, μ°¨λ¨νλ κΈ°λ₯μ μννλ€
The Session layer is responsible for establishment of connection, maintenance of sessions, authentication and also ensures security.
The functions of the session layer are :
Session establishment, maintenance and termination
The layer allows the two processes to establish, use and terminate a connection.
Synchronization
This layer allows a process to add checkpoints which are considered as synchronization points
into the data.
These synchronization point help to identify the error so that the data is re-synchronized properly, and ends of the messages are not cut prematurely and data loss is avoided.
Dialog Controller
The session layer allows two systems to start communication with each other in half-duplex or full-duplex.
5κ³μΈ΅μΈ **μΈμ κ³μΈ΅(Session Layer)**μ μ λλ¨μ μμ© νλ‘μΈμ€κ°
μ°κ²°μ μ±λ¦½νλλ‘ λμμ£Όκ³ ,
μ°κ²°μ΄ μμ μ μΌλ‘ μ μ§λλλ‘ κ΄λ¦¬νκ³ ,
μμ μλ£ νμλ μ°κ²°μ λλ μν μ νλ€
Session
μ κ΄λ¦¬νλ κ²μ΄ μ£Ό μν μΈ session layerλ TCP/IP sessionμ λ§λ€κ³ μμ λ μν μ νλ€
Errorλ‘ μ€λ¨λ ν΅μ μ λν 볡ꡬμ μ¬μ μ‘λ μννλ€
Presentation layer is also called the Translation layer.
The data from the application layer is extracted here and manipulated as per the required format to transmit over the network.
The functions of the presentation layer are :
Translation
For example, ASCII to EBCDIC.
Encryption/ Decryption
Data encryption translates the data into another form or code.
Compression
Reduces the number of bits that need to be transmitted on the network.
6κ³μΈ΅μΈ presentation layerλ νν λ°©μμ΄ λ€λ₯Έ applicationμ΄λ system κ°μ ν΅μ μ λκΈ° μν΄ νλμ ν΅μΌλ ꡬ문 νμμΌλ‘ λ³νμν€λ κΈ°λ₯μ μννλ€
μΌμ’
μ λ²μκΈ°
λ λ³νκΈ°
μν μ μννλ κ³μΈ΅μ΄κ³ ,
μ΄λ¬ν κΈ°λ₯μ μ¬μ©μ systemμ μμ© κ³μΈ΅μμ dataμ νμμμ μ°¨μ΄λ₯Ό λ€λ£¨λ λΆλ΄μ λμ΄μ€λ€
MIME encoding
μ΄λ μνΈν
, μμΆ
, μ½λ λ³ν
κ³Ό κ°μ λμμ΄ μ΄ κ³μΈ΅μμ μ΄λ£¨μ΄μ§λ€
At the very top of the OSI Reference Model stack of layers, we find Application layer which is implemented by the network applications.
These applications produce the data, which has to be transferred over the network.
This layer also serves as a window for the application services to access the network and for displaying the received information to the user.
Ex: Application β Browsers, Skype Messenger etc.
Application Layer is also called as Desktop Layer.
OSI 7 Layersμ μ΅μμ 7κ³μΈ΅μΈ application layerλ application processλ₯Ό μ μνκ³ application serviceλ₯Ό μννλ€
Network softwareμ UI λΆλΆμ΄λ μ¬μ©μ I/O λΆλΆμ μ μνλ κ²μ΄ application layerμ μν μ΄λ€
application layerμ protocolμ μμ²λκ² λ§μ μ’
λ₯κ° μμ§λ§ λνμ μΈ Protocolλ‘λ FTP
, SMTP
, HTTP
TELNET
μ΄ μλ€
Layer | Protocol | μ₯λΉ |
---|---|---|
Application Layer | HTTP, SMP, SMTP, STUN, TFTP, TELNET | ADC, NGFW, WAF |
Presentation Layer | TLS, AFP, SSH | |
Session Layer | L2TP, PPTP, NFS, RPC, RTCP, SIP, SSH | |
Transport Layer | TCP, UDP, SCTP, DCCP, AH, AEP | LB, Firewall |
Network Layer | ARP, IPv4, IPv6, NAT, IPSec, VRRP, Routing protocol | Router, L3 Switch |
Datalink Layer | IEEE 802.2, FDDI | Switch, Bridge, NIC |
Physical Layer | RS-232, RS-449, V.35, S λ±μ cable | Cable, Hub, TAP |
The Receiverβs MAC address is obtained by placing an ARP(Address Resolution Protocol)
request onto the wire asking βWho has that IP address?β and the destination host will reply with its MAC address.
Segment in Network layer is referred as Packet.