关于第四层协议端口号使用情况的技术咨询
Great question—let’s unpack this clearly.
You’re spot-on with the core ones you listed: all these IANA-registered layer 4 protocols use port numbers to multiplex different applications on a single host:
- TCP (protocol number
6) - UDP (
17) - SCTP (
132) - DCCP (
33)
Beyond those, there are a few other IANA-registered transport protocols that also utilize port numbers:
- UDP-Lite (
136): A lightweight variant of UDP that only checks a portion of the payload for errors, but retains source and destination port fields to route traffic to the correct application. - TP (
29): Also known as ISO Transport Protocol Class 4, an older reliable transport protocol that includes port number fields in its header for application multiplexing.
As you noted, not all layer 4 protocols use port numbers. For example, ICMP (1) is a control plane protocol focused on network diagnostics and error reporting—it doesn’t have port fields because it doesn’t need to multiplex application traffic like the protocols above. Other examples include IGMP (2) and OSPF (89), which serve network control purposes rather than application-level data delivery.
备注:内容来源于stack exchange,提问作者WakkaTrout

