[ํ์คํ] UDP - User Datagram Protocol
2023. 4. 11. 21:29ใComputerScience/FullStackProgramming
UDP User Datagram Protocol
- The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol.
- It does not add anything to the services of IP except to provide process-to-process communication instead of host-to- host communication.
- If UDP is so powerless, why would a process want to use it? Very simple protocol using a minimum of overhead
- if a process wants to send a small message and does not care much about reliability, it can use UDP
- if it sends a small message, taking much less interaction between the sender and receiver than it does using TCP
UDP Operation
- Connectionless Services :
UDP provides a connectionless services that each datagram sent by UDP is an independent datagram. - Flow and Error Control :
There is no flow control and hence no window mechanism.
There is no error control mechanism in UDP except for the checksum. - Encapsulation and Decapsulation :
The UDP protocol encapsulates and decapsulates messages in an IP datagram.
Queuing at client site
- When a process starts, it requests a port No. from the operating system.
The client process sends messages to the outgoing queue by using the source port No. specified in the request. - UDP removes the messages one by one and, after adding the UDP header, delivers them to IP.
- An outgoing queue can overflow.
If this happens, the OS can ask the client process to wait before sending any more messages. - When a message arrives for a client, UDP checks to see if an incoming queue has been created for the port No. specified in the destination port No. field of the user datagram.
If there is a queue, UDP sends the received user datagram to the end of the queue.
- ํด๋ผ์ด์ธํธ - ์ ๋ณด๋ฅผ ๋ณด๋ด๋ฉด ๋จ
์ด์์ฒด์ ๋ก๋ถํฐ ํฌํธ ๋ฒํธ๋ฅผ ๋ถ์ฌ๋ฐ๋๋ค. - ํต์ ์ ์ํ ํฌํธ๋ฒํธ๋ฅผ ์ด์์ฒด์ ์๊ฒ ์๊ตฌ
์ด์์ฒด์ ๋ ํ๋ก์ธ์ค์๊ฒ ํต์ ํฌํธ ๋ฒํธ๋ฅผ ์ค๋ค - UDP๋ ์ ๋ณด๋ฅผ ๊ฐ์ง๊ณ ์์ด์ผํจ - ๋ฉ๋ชจ๋ฆฌ ๊ณต๊ฐ ํ์
layer3 ์๊ฒ ๋ฐ์ ์ ๋ณด - UDP ๊ฐ๊ณ ์๋ค๊ฐ, 4์๊ฒ ์ค
* ์์ ๊ณ์ธต์ด ํ์ ๊ณ์ธต์๊ฒ ์ฃผ๋ฉด, ํ์ ๊ณ์ธต์ ์ฝ์ด๊ฐ๋ค. - ๋ณธ์ธ์ด ๋ฐ์ผ๋ก ๋ด๋ฆด ๋ ์๋ ๊ณ์ธต์ ํ์๋ค ์ฐ๊ณ , ์๋ ๊ณ์ธต์ ๊ทธ๊ฑธ ๋ค์ ์ฝ์ด ๊ฐ๋ค.
Queuing at server site
- When it starts running, a server asks for incoming and outgoing queues, using its well-known port.
- When a message arrives for a server, UDP checks to see if an incoming queue has been created for the port number specified in the destination port number field of the user datagram.
- If there is a queue, UDP sends the received user datagram to the end of the queue.
์ฐ๊ฒฐ ์ค์ ๊ณผ์ ์ด ์๋ค - When a server wants to respond to a client, it sends messages to the outgoing queue, using the source port No. specified in the request.
- UDP removes the messages one by one and, after adding the UDP header, delivers them to IP.
Applications of UDP
- UDP is suitable for a process that requires simple request-response communication with little concern for flow and error control.
- ํ์ผ ์ฌ์ด์ฆ๊ฐ ์์ ๋, ์๋ฒ์ ๊ฐ๊น์ด ์์ด ์์ ์ ์ผ ๋ -> UDP๋ก ํ์ผ์ ์ฃผ๊ณ ๋ฐ์ ์ ์๋ค.
- Not used for sending bulk data, such as FTP
- TFTP including internal flow and error control
- Suitable transport protocol for multicasting
- Used for some route updating protocols such as Routing Information Protocol (RIP)
๋ผ์ฐํฐ๋ผ๋ฆฌ ๊ฐ๋จํ ์ ๋ณด ์ฃผ๊ณ ๋ฐ์ ๋ - Used for management processes such as SNMP.
SNMP(Simple Network Management Protocol)๋?
UDP/IP(์ฌ์ฉ์ ๋ฐ์ดํฐ๊ทธ๋จ ํ๋กํ ์ฝ/์ธํฐ๋ท ํ๋กํ ์ฝ)๋ฅผ ์ฌ์ฉํ์ฌ ์ด๋๋ท ์ฐ๊ฒฐ์ ํตํด ๋คํธ์ํฌ ๊ด๋ฆฌ ์์ ์ ์ํํ๋ ์์ฉ ๊ณ์ธต ํ๋กํ ์ฝ
- ๊ตฌ๊ธ ์์ ํ UDP ๊ธฐ๋ฐ
์ ํ๋ธ - UDP ๊ธฐ๋ฐ
TCP๋ฅผ ๊ฑท์ด๋ธ ์๋ก์ด ํต์ ํ๋กํ ์ฝ - ํต์ผ๋ก ๊ตฌํ
๋ค์ด๋ฒ - ํต ๋ฒ ์ด์ค, 4๊ณ์ธต ํต์ ํ๋กํ ์ฝ๋ก ๋์ด๊ฐ - ์๋ก์ด ํต์ ํ๋กํ ์ฝ์ด UDP ์์ ์ค๊ณ๋๊ณ ์๋ค.
๊ฑฐ์ ๋ชจ๋ ์ด์์ฒด์ ์ UDP๋ ์๋ค.
'ComputerScience > FullStackProgramming' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ํ์คํ] TCP Socket programming (1:1) (0) | 2023.04.12 |
---|---|
[ํ์คํ] TCP - connection-oriented protocol (1) | 2023.04.12 |
[ํ์คํ] Transport Layer 4 / Process-to-Process Delivery (0) | 2023.04.11 |
[ํ์คํ] 3 Layer Router, IP address, DNS (0) | 2023.04.08 |
[ํ์คํ] CSMA/CD _ Random Access Protocols in MAC Layer (0) | 2023.04.08 |