12 · Explaining the TCP_IP Transport Layer and Application Layer說明 TCP/IP 傳輸層與應用層

UDP CharacteristicsUDP 特性

Applications use the connectionless services of UDP to provide high-performance, low-overhead data communications between hosts. UDP includes several features that provide for low-latency data transmission.

應用程式使用 UDP 的無連線服務,在主機之間提供高效能、低額外負擔的資料通訊。UDP 具備多項特性,能提供低延遲的資料傳輸。

UDP is a simple protocol that provides basic transport layer functions:

UDP 是一種提供基本傳輸層功能的簡單協定:

  • UDP operates at the transport layer of the TCP/IP stack (OSI Layer 4).UDP 在 TCP/IP 堆疊的傳輸層運作(OSI 第 4 層)。
  • UDP provides applications with access to the Internet layer (OSI Layer 3, the network layer), without the overhead of reliability mechanisms.UDP 讓應用程式能存取網際網路層(OSI 第 3 層,即網路層),且不需負擔可靠性機制的額外負擔。
  • UDP is a connectionless protocol in which a one-way datagram is sent to a destination without advance notification to the destination device.UDP 是一種無連線協定,會在未事先通知目的裝置的情況下,將單向資料包傳送至目的地。
  • UDP performs only limited error checking. A UDP datagram includes a checksum value, which the receiving device can use to test the integrity of the data.UDP 只執行有限的錯誤檢查。UDP 資料包包含一個檢查碼值,接收裝置可用來檢驗資料的完整性。
  • UDP provides service on a best-effort basis and does not guarantee data delivery because packets can be misdirected, duplicated, or lost on the way to their destination.UDP 以盡力而為的方式提供服務,並不保證資料送達,因為封包在傳送到目的地的途中可能會被誤導、重複或遺失。
  • UDP does not provide any special features that recover lost or corrupted packets. UDP relies on applications that are using its transport services to provide recovery.UDP 不提供任何特殊機制來復原遺失或損毀的封包,UDP 依賴使用其傳輸服務的應用程式來提供復原機制。
  • Because of its low overhead, UDP is ideal for applications like DNS and Network Time Protocol (NTP), where there is a simple request-and-response transaction.由於額外負擔低,UDP 非常適合像 DNS 與網路時間協定(NTP)這類只有簡單請求與回應交易的應用程式。

The low overhead of UDP is evident when you review the UDP header length of only 64 bits (8 bytes). The UDP header length is significantly smaller compared with the TCP minimum header length of 20 bytes.

從 UDP 標頭長度僅 64 位元(8 位元組)就能看出其額外負擔之低,相較於 TCP 最小 20 位元組的標頭長度,UDP 的標頭長度明顯小得多。

The following list describes the field definitions in the UDP segment:

以下清單說明 UDP 區段中各欄位的定義:

  • Source port: Calling port number (16 bits)來源連接埠:撥號連接埠號(16 位元)
  • Destination port: Called port number (16 bits)目的連接埠:被叫連接埠號(16 位元)
  • Length: Length of UDP header and UDP data (16 bits)長度:UDP 標頭與 UDP 資料的長度(16 位元)
  • Checksum: Calculated checksum of the header and data fields (16 bits)檢查碼:根據標頭與資料欄位計算出的檢查碼(16 位元)
  • Data: ULP data (varies in size)資料:ULP 資料(大小不定)

Application layer protocols that use UDP include DNS, Simple Network Management Protocol (SNMP), DHCP, Routing Information Protocol (RIP), TFTP, Network File System (NFS), online games, and voice streaming.

使用 UDP 的應用層協定包括 DNS、簡易網路管理協定(SNMP)、DHCP、路由資訊協定(RIP)、TFTP、網路檔案系統(NFS)、線上遊戲以及語音串流。

Which statement about UDP is correct?關於 UDP,下列哪個敘述正確?