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.

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.

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.

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.