A port number is a number that identifies different services that run on a PC or device using TCP or UDP (layer 4), while a socket number is an IP address with the port number included: eg. 192.168.0.10:21
Port numbers are assigned by the IANA (Internet Assigned Numbers Authority)
There a 3 different types of port numbers :
Well known Ports (1 - 1023) - Used for common services such as FTP, HTTP, Telnet, DHCP.
Registered Ports (1024 - 49151) - Used for services that are not as commonly used that they warrant a well known port number. Eg. WAP, MS SQL, World of Warcraft.
Private/Dynamic Ports (49152 - 65535) - Ports that can be used by anyone for any purpose.
You can view ports that are currently being used on your PC by typing 'netstat' into the DOS prompt (as seen below a after colon in private/public address).
What is a socket?
The combination of a source IP address and port number or a destination IP address and port number
the combination of the source and destination sequence numbers and port numbers
the combination of the source and destination sequence and acknowledgment numbers
the combination of the source and destination IP address and source and destination Ethernet address
A TCP socket is an endpoint instance defined by an IP address and a port in the context of either a particular TCP connection or the listening state.
A port is a virtualisation identifier defining a service endpoint (as distinct from a service instance endpoint aka session identifier).
A TCP socket is not a connection, it is the endpoint of a specific connection.
There can be concurrent connections to a service endpoint, because a connection is identified by both its local and remote endpoints, allowing traffic to be routed to a specific service instance.
No comments:
Post a Comment