小编six*_*bit的帖子

为什么流行的 TCP 使用服务在 /etc/services 中有 UDP 和 TCP 条目?

我正在阅读一本关于使用 Go 进行网络编程的书。其中一章涉及 /etc/services 文件。在探索这个文件时,我注意到某些流行的条目,如 HTTP 和 SSH,它们都在传输层使用 TCP,还有一个用于 UDP 的条目。例如在 Ubuntu 14.04 上:

ubuntu@vm1:~$ grep ssh /etc/services  
ssh             22/tcp         # SSH Remote Login Protocol 
ssh             22/udp

ubuntu@vm1:~$ grep http /etc/services  
http            80/tcp          www             # WorldWideWeb HTTP            
http            80/udp                          # HyperText Transfer Protocol
Run Code Online (Sandbox Code Playgroud)

有谁知道为什么这些有两个条目?我不相信 SSH 或 HTTP 曾经使用过 UDP(这个问题证实了 SSH)。

linux networking services protocols

22
推荐指数
1
解决办法
2116
查看次数

标签 统计

linux ×1

networking ×1

protocols ×1

services ×1