To understand network flow, it is important to understand the flow of HTTP communication. HTTP communication belongs to the application layer. Similarly, to understand HTTP communication deeply, you need to learn low-level layers like TCP and UDP.

Internet Protocol

IP & IP Packet

Rules are needed for data to pass safely from client to server.

So set the IP address on the computer to communicate. IP transfer data by what called packets.

IP Packet includes departure IP and destination IP information, for data transmission.

In order to deliver the packet to the destination IP, each node transfer data.

When the server receives data, it responds. The server also uses the IP packet to respond.

Limitations of IP Protocol

  • unconnected (비연결성)
    Packet is transmitted even if there is no IP destination or service is unavailable.
    (This is because the client cannot know the state of the server.)

  • unreliability (비신뢰성)
    If there is a problem in the Node during data transmission. Client can't recognize the problem.


TCP & UDP

Network protocol layer can be divided into OSI 7 layer and TCP/IP 4 layer.

TCP protocol can compensate for the limitations of the IP protocol.

TCP/IP Layer 4 was developed before OSI Layer 7. TCP/IP Layer 4 does not exactly match OSI Layer 7


When an HTTP message is generated, it is passed through the Socket library.

Sockets are designed to allow programs to send and receive data on the network.

Why the TCP protocol overcomes the limitations of the IP protocol

TCP segment includes departure PORT, destination PORT, transmission control, sequence, verification information, etc. This can supplement the departure IP and destination IP information of the IP packet.


TCP Features

  • Transmission Control Protocol
    TCP 3 way handshake, Data Delivery Guarantee, order guarantee, Trusted Protocol(신뢰할 수 있는 프로토콜)

TCP 3 way handshake

Client sends a SYN Packet request to the server.

The server receives the SYN request, response to the client with an ACK and a SYN, after client request back with an ACK.

When the client request ACK to the server, Connection is established and the request can be sent.

If the server is off, when a client sends a SYN, the server does not respond.

Data Delivery Guarantee

In TCP, when a client request to server, the server returns a response. It can compensate for unconnected, which is a limitation of IP Packet.

order guarantee

If the packet does not arrive in order, it can request another packet based on the information in the TCP segment. It can compensate for unreliability, which is a limitation of IP Packet.


UDP Features

UDP is a simple protocol with only PORT and checksum field information added to the IP protocol.

Compared to TCP, it's not easy to reliable. but UDP is faster than TCP. because it does not use 3 way handshake.
(No data delivery guarantee, no order guarantee. but it's fast.)

Used for services where speed is more important than reliability.

Livestreaming

  • Checksum: Checksum is an error detection method.


profile
메일은 매일 확인하고 있습니다. 궁금하신 부분이나 틀린 부분에 대한 지적사항이 있으시다면 언제든 편하게 연락 부탁드려요 :)

0개의 댓글