When talking about ports, sometimes I read articles that state TCP port
while others just say port
. Are there some features that make TCP port different from other ports in the OS
?
2 Answers
TCP and UDP are two protocols that operate in the layer 4 (transport) of the OSI/DOD Model, however tcp might use different port number for different type of service, for example if you are sending a mail, tcp will use smtp tcp port 25, if you send large file without messaging system like mail, tcp will use ftp tcp port 20/21
A port is really just a layer-4 address, the same way an IP address is a layer-3 address, or a MAC address is a layer-2 address. There are other layer-4 protocols than TCP. Some, like UDP, use ports, and some use something else, or nothing.
When referring to ports, you need to distinguish which layer-4 protocol that you mean. A TCP port number is not the same as a UDP port number. In some cases it may be obvious. For instance, HTTP uses TCP for its transport, so in that context, a port would mean a TCP port.