[소켓 #00] Layered Architecture

이석환·2023년 4월 12일

Socket Programming

목록 보기
1/18

1. Data Communications

A data communications system has five components
1. Message
2. Sender
3. Receiver
4. Transmission Medium
5. Protocol

Message : Server와 Client의 통신을 하게 만드는 Software
Transmission Medium : Sender로부터 Receiver에게 Message를 보내는 물리적 경로
Protocol : Data Communications을 위한 약속의 집합

오늘 날 다양한 Form으로 정보를 주고 받을 수 잇다.

Text : Unicode
Numbers : binary
Images : RCB or YCM
Audio : Analog or Digital signals
Videos : Images의 조합 or 연속적인 Images


2. The Internet

인터넷은 2개 또는 그 이상의 네트워크가 서로 통신할 수 있게 하는 것
가장 주목할만한 인터넷은 Internet(uppercase I)라고 불리며 1,000,000개의 내부적인 network로 구성되어 있다.



3. Network Types

A network can be of two types : LANs and WANs


Local Area Network (LAN)

A local area network (LAN) is usually privately owned and connects some hosts in a single office, builing, or campus


주로 사적으로 사용하거나 단독의 사무실, 건물, 캠퍼스에서 연결할 때 사용

Wide Area Network (WAN)

A wide area network (WAM) is also a connection of devices capable of communication

WAN 또한 통신이 가능한 장치의 연결이다.

Differences between a LAN and a WAN

LAN은 일반적으로 크기에 제한이 있기 때문에 사무실, 빌딩, 대학에서 통신이 가능
LAN은 host를 상호연결

WAN은 더 큰 범위로 도시, 나라, 세계까지 가능
WAN은 스위치, 라우터 또는 모뎀과 같은 연결 장치를 상호 연결

Internetwork

오늘 날은 LAN 또는 WAN이 독립적으로 있는 것을 보기 힘들다.
2개 혹은 이상의 연결된 network는 internetwork, 혹은 internet을 만든다.

4. Protocol

In data communication and networking, a protocol defines the rules that both the sender and receiver and all intermediate devices need to follow to be able to communicate directrly

Data communication 그리고 Networking에서 protocol은 Sender와 Receiver가 직접 통신하기 위해 모든 중간 장치가 따르기 위해서 필요한 규칙을 정하는 것

  • Two scenarios to better understand the protocol layering

5. Layered Architecture - TCP/IP Protocol Suite

  • 오늘 날 인터넷에서 사용하는 Protocol (TCP/IP 5계층)

  • 두 개의 호스트 사이에서 통신이 이루어질 때 TCP/IP protocol에서의 layer 예시

각 layer의 논리적 연결에 대해 이야기 하기 전에 업무들에 대해 이해할 필요가 있다.
Applcations과 Transport layer에서는 논리적인 연결이 없다.
Applications - message를 통해 통신
Transport - segment or user datagram을 통해 통신
Network - datagram을 통해 통신
Data link - frame을 통해 통신
Physical - bits를 통해 통신

6. OSI Model

1947년에 ISO에서 국제 표준으로 나온 Model
Application 계층이 Application, Presentation, Session으로 나뉘었다.
3가지 이유로 성공하지 못했다.

  1. OSI가 완성되었을 때 TCP/IP Protocol에 너무 많은 시간과 돈이 사용되었다.
  2. Presentation과 Session layer가 완전히 정의되지 않았다.
  3. 시행된 OSI는 충분히 높은 performance를 보여주지 못했다.

7. Layers and Protocols

Transport layer의 format은 크게 UDP, TCP, SCTP로 나뉜다.
UDP는 datagram
TCP는 segment

TCP는 ACK를 보내줘야 하기 때문에 Header의 bytes가 더 많다.
UDP - Header 8 bytes, Header + Data : 8 to 65,635 bytes
TCP - Header 20 to 60 bytes

Transport Layer에서 Port Number를 Addressing
Port Number : 어떤 Process(Application)에 보낼지
IP : 어떤 Computer에 보낼지

Network 계층에서 들어온 Packet으로 목적지 IP를 선택하고
Transport 계층에서 port number를 정한다.


  • 본 블로그는 Socket Programming에 대해 다루기 때문에 각 계층이 주고 받는 단위에 대해서는 자세히 기술하지는 않습니다.





출처 : DATA COMMUNICATIONS & NETWORKING WITH TCP/IP PROTOCOL SUITE 6th EDITION / Behrouz A. Forouzan

profile
반갑습니다.

0개의 댓글