728x90
https://www.inflearn.com/course/http-%EC%9B%B9-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC
위 강의를 듣고 정리한 내용입니다
1. 인터넷 네트워크
IP(인터넷 프로토콜)
지정한 iP 주소에 데이터 전달
패킷이라는 통신 단위로 데이터 전달
IP 패킷 정보
출발지 IP, 목적지 IP, 기타 …
IP 프로토콜의 한계
- 비연결성
- 패킷을 받을 대상이 없거나 서비스 불능 상태여도 패킷 전송
- 비신뢰성
- 중간에 패킷이 사라지면?
- 패킷이 순서대로 안오면?
- 프로그램 구분
- 같은 IP를 사용하는 서버에서 통신하는 애플리케이션이 둘 이상이면?
TCP UDP
인터넷 프로토콜 스택의 4계층
애플리케이션 계층 - HTTP, FTP
전송 계층 - TCP, UDP
인터넷 계층 - IP
네트워크 인터페이스 계층
- 프로그램이 Hello, World! 메시지 생성
- SOCKET 라이브러리를 통해 전달
- TCP 정보 생성, 메시지 데이터 포함
- IP 패킷 생성, TCP 데이터 포함
TCP 특징
전송 제어 프로토콜(Transmission Control Protocol)
- 연결 지향 - TCP 3 way handshake (가상 연결)
- 데이터 전달 보증
- 순서 보장
- 신뢰할 수 있는 프로토콜
- 현재는 대부분 TCP 사용
TCP 3 way handshake
- 클라이언트 → 서버: SYN(접속 요청)
- 서버 → 클라이언트: SYN+ACK(요청 수락)
- 클라이언트 → 서버: ACK
연결: 논리적 연결
데이터 전달 보증
순서 보장
UDP 특징
사용자 데이터그램 프로토콜(User Datagram Protocol)
하얀 도화지에 비유
데이터 전달 및 순서가 보장되지 않지만, 단순하고 빠름
- IP와 거의 같다 + PORT, 체크섬 기능 추가
- 애플리케이션에서 추가 작업 필요
PORT
한번에 둘 이상 연결?
클라이언트 - 게임 / 화상통화 / 웹 브라우저 요청
IP=목적지 서버를 찾는 것 + PORT 기능 추가
패킷 정보: 출발지 IP, PORT, 목적지 IP, PORT
“같은 IP 내에서 프로세스 구분
한 아파트 내에서의 동호수
0~65535 할당 가능
0~1023: 잘 알려진 포트, 사용하지 않는 것이 좋음
- FTP - 20, 21
- TELNET - 23
- HTTP - 80
- HTTPS - 443
DNS
IP는 기억하기 어렵다, 변경될 수 있다
DNS: 도메인 네임 시스템(Domain Name System)
도메인 명을 IP 주소로 변환
728x90
'CS > Network' 카테고리의 다른 글
[HTTP 웹 기본지식] 3. HTTP 기본 (0) | 2022.11.14 |
---|---|
[HTTP 웹 기본지식] 2. URI와 웹 브라우저 요청 흐름 (0) | 2022.11.14 |
[네트워크] 12. 네트워크 프로그래밍 (0) | 2022.10.23 |
[네트워크] 11. 상위 계층 (0) | 2022.10.23 |
[네트워크] 10. 전송 계층 (0) | 2022.10.21 |