> For the complete documentation index, see [llms.txt](https://krjaeh0.gitbook.io/j-log/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://krjaeh0.gitbook.io/j-log/network/fundamentals/tcpip4layer.md).

# TCPIP4Layer

## TCP/IP 4계층이란?

* 실제 인터넷에서 사용하는 네트워크 모델
* 실제 인터넷 통신에서 사용되는 프로토콜을 기반으로 설계된 4계층 구조로 되어 있다.

✔ **인터넷 표준 네트워크 모델로 전 세계에서 사용됨**

✔ **OSI 7계층 모델을 단순화하여 4계층으로 구성됨**

✔ **각 계층별로 특정 네트워크 프로토콜을 담당하여 데이터 통신 수행**

***

## TCP/IP 4계층 구조

| 계층 | 명칭                                 | 역할                      | 주요 프로토콜                   |
| -- | ---------------------------------- | ----------------------- | ------------------------- |
| 4  | 응용 계층 (Application Layer)          | 사용자와 직접 상호작용, 애플리케이션 지원 | HTTP, FTP, SMTP, DNS, SSH |
| 3  | 전송 계층 (Transport Layer)            | 포트 번호 기반 데이터 전송, 신뢰성 제공 | TCP, UDP                  |
| 2  | 인터넷 계층 (Internet Layer)            | 패킷 라우팅, 논리 주소(IP) 할당    | IP, ICMP, ARP, RIP, OSPF  |
| 1  | 네트워크 액세스 계층 (Network Access Layer) | 물리적 데이터 전송, MAC 주소 관리   | Ethernet, Wi-Fi, PPP      |

* OSI 7계층보다 간단한 구조
* 실제 네트워크에서 사용되는 프로토콜을 중심으로 설계되었다.

***

## TCP/IP 4계층 상세 설명

{% stepper %}
{% step %}

### 네트워크 액세스 계층 (Network Access Layer)

* 물리적 데이터 전송(전기 신호, 무선 신호)
* MAC 주소 기반 데이터 프레임 전송
* LAN, WAN, Wi‑Fi 등 네트워크 기술 포함
* 물리적 네트워크 장비(스위치, 허브, NIC 등) 사용

> 프로토콜: Ethernet, Wi‑Fi, PPP\
> 장비: 네트워크 카드, 허브, 스위치

* OSI 7계층의 물리 계층(1계층) + 데이터 링크 계층(2계층)과 유사
  {% endstep %}

{% step %}

### 인터넷 계층 (Internet Layer)

* IP 주소를 기반으로 데이터 패킷 라우팅
* 출발지 → 목적지까지 최적의 경로 찾기(라우팅)
* 패킷(Packet) 단위로 데이터 전송
* IP 주소 관리, ARP를 통한 MAC 주소 변환

> 프로토콜: IP, ICMP, ARP, RIP, OSPF, BGP

* OSI 7계층의 네트워크 계층(3계층)과 동일한 역할
  {% endstep %}

{% step %}

### 전송 계층 (Transport Layer)

* 포트 번호 기반 프로세스 간 데이터 전송
* 신뢰성 있는 데이터 전송 또는 빠른 전송 가능
* 흐름 제어(Flow Control) & 오류 제어(Error Control) 제공
* 세그먼트(Segment) 단위로 데이터 전송

> 프로토콜: TCP, UDP

* OSI 7계층의 전송 계층(4계층)과 동일한 역할
  {% endstep %}

{% step %}

### 응용 계층 (Application Layer)

* 사용자가 직접 접근하는 애플리케이션 계층
* 웹 브라우저, 이메일, 파일 전송 등의 네트워크 서비스 제공
* 데이터 요청 및 응답 처리

> 프로토콜: HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS, SSH

* OSI 7계층의 응용 계층(7계층), 표현 계층(6계층), 세션 계층(5계층)을 통합한 개념
  {% endstep %}
  {% endstepper %}

***

## TCP/IP 4계층 장점

1. 실제 네트워크에서 사용되는 표준 모델
2. OSI 모델보다 간단하고 이해하기 쉽다.
3. 모든 인터넷 프로토콜(TCP, IP, HTTP, DNS 등)이 기반하는 모델
4. 계층별 역할이 명확하여 유지보수 및 네트워크 설계에 용이하다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://krjaeh0.gitbook.io/j-log/network/fundamentals/tcpip4layer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
