In /etc/services
, a service name can have multiple (transport protocol, port number) pairs. For example,
http 80/tcp # Hypertext Transfer Protocol
http 80/udp
ssh 22/tcp # Secure Shell
ssh 22/udp
telnet 23/tcp # Telnet
telnet 23/udp
smtp 25/tcp # Simple Mail Transfer Protocol
smtp 25/udp
When a service is specified as (host name, port number), does that specify a transport protocol?
If yes, where and when is the transport protocol inferred from (host name, port number)?
I guess not DNS server, because DNS server doesn't know about /etc/services
on individual server machines.
If no, how would you specify a service, so that its transport protocol can be specified as well as its host name and port number?
Thanks.