954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Ports

One aspect of computers that I just don't find clear learning material on is networking. There seems to be loads of information on 'how to' but I still don't understand the underlying basics.

What is meant by a Port? Why are ports numbered so strange (as in, not 1,2,3).

I am using Ubuntu Linux. I can see what ports I have open (or something like that) and I have successfully connected up a nice home network. But I don't actually understand the what a port is and how it differed from directories.

If it is something that can be easily summed up, that would be great. If not, is there any clear, beginner intro to understanding linux (or any other) ports.

Namibnat
Junior Poster in Training
82 posts since May 2009
Reputation Points: 33
Solved Threads: 13
 

All the port numbers, and what they're used for.
http://www.iana.org/assignments/port-numbers

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 
All the port numbers, and what they're used for. http://www.iana.org/assignments/port-numbers

Thanks so much.

Namibnat
Junior Poster in Training
82 posts since May 2009
Reputation Points: 33
Solved Threads: 13
 

A single computer may run a bunch of network applications simultaneously. Each incoming network packet must be routed to a particular one. Since the network layer has no idea of applications, the routing is done by means of ports. An applications (say, a server) binds its socket to a specific port, and a peer uses that port number as a part of destination address, so that the full address is ip:port, where ip identifies a computer, and port identifies an application (a socket, in fact) within that computer.

Ports are numbered from 0 to 65535. Some of them are assigned to specific servers. Everybody knows that port 80 is assigned to http server, port 22 to SSH etc. For a complete list of port assignments look at the IANA page.

Hope it helps.

nezachem
Posting Shark
903 posts since Dec 2009
Reputation Points: 719
Solved Threads: 194
 

A port is just an extra number tacked onto your IP address. Basically, they exist so multiple applications can use the same IP address simultaneously when they use different ports.

I recommend Beej's Guide to Network Programming for increased understanding. The section on port numbers has a bit more explanation.

gusano79
Posting Pro
521 posts since May 2004
Reputation Points: 182
Solved Threads: 77
 

A single computer may run a bunch of network applications simultaneously. Each incoming network packet must be routed to a particular one. Since the network layer has no idea of applications, the routing is done by means of ports. An applications (say, a server) binds its socket to a specific port, and a peer uses that port number as a part of destination address, so that the full address is ip:port, where ip identifies a computer, and port identifies an application (a socket, in fact) within that computer.

Ports are numbered from 0 to 65535. Some of them are assigned to specific servers. Everybody knows that port 80 is assigned to http server, port 22 to SSH etc. For a complete list of port assignments look at the IANA page.

Hope it helps.

Thanks...it helps.

Namibnat
Junior Poster in Training
82 posts since May 2009
Reputation Points: 33
Solved Threads: 13
 

A port is just an extra number tacked onto your IP address. Basically, they exist so multiple applications can use the same IP address simultaneously when they use different ports.

I recommend Beej's Guide to Network Programming for increased understanding. The section on port numbers has a bit more explanation.

Thanks, I'll be reading Beej's Guide to Network Programming over the weekend.


It says:It is probably at its best when read by individuals who are just starting out with socket programming and are looking for a foothold.

That's me

Namibnat
Junior Poster in Training
82 posts since May 2009
Reputation Points: 33
Solved Threads: 13
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You