Ask the Expert

What is the difference between a port and a socket?

What is the difference between a port and a socket?

    Requires Free Membership to View

I am assuming you are referring to logical uses. A port is a logical connection method two end points communicate with. Ports operate at the Transport layer of the OSI. For example a VPN client connects to a VPN server over Port 1723. A socket is one end point of a connection. Sockets are a means of plugging the application layer in. Sockets are determined by an IP address and port number. For example, for a VPN client to connect the client would need to use the socket determined by the port number and IP of the local client.

This was first published in May 2003

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: