Understanding Ports on IP Addresses

  • Thread starter fisico30
  • Start date
In summary: The first server's port number is 80, and the second server will be receiving requests on port 81. Which is why specifying the port number is so important when setting up an IP camera. You need to specify the port that the camera will use to send its video stream to the internet.
  • #1
fisico30
374
0
hello forum,

I am trying to understand what a port is.

Each device on a LAN is assigned an internal IP address. Does each device also have a port?

In some situations, like setting up an IP camera, we need to specify the port number. In other cases we seem to not worry about ports...

What is a port exactly? Why is the IP address not enough? Every device has a distinct IP address...

thanks
fisico30
 
Computer science news on Phys.org
  • #2
A port is an addtional application or process specific code used in addtion to an ip address. Ports are also used so a router like device can allow multiple computers on the router's LAN to share an IP address on the internet (as opposed to the option of assigning each computer on a internet modem's LAN a separate IP address on the internet).. Wiki articles:

http://en.wikipedia.org/wiki/IP_port

http://en.wikipedia.org/wiki/Port_forwarding
 
Last edited:
  • #3
Port is basically a logical construct that helps the computer figure out where the information is supposed to go. So for example, you have 3 browsers open, you have a torrent running and you are playing a game online.
When the information is going between computers its all just IP packets. What the system does is it tags on a port number to each packet and that port number uniquely refers to a program you have running.
So for example you go to www.physicsforums.com on browser 1, then your browser sends the request and attaches a reply port number to the reqest (say port 4444) then on browser 2 you go to www.google.com and the reply port is port 5555.
so when the packets containing the information you need come through, your system looks to see what the port number is, if its 4444 then it gets piped to browser 1 and physics forums shows up and google gets piped to browser 2. These reply ports are selected by the system and you don't decide.

This is a way for the system to keep track of what information goes where and what asked for it. Your IP Camera is slightly different as are online computer games. They generally have dedicated port numbers (making them easier to work with for the user, you can setup exceptions in firewalls and such if the numbers are static) as they ALWAYS want information on a specific port.

make sure you read the links rcgldr posted, they will give you a much more specific description, mine was a really basic one.
 
  • Like
Likes WWGD
  • #4
Thank you!

Is the IP camera acting like a server, since it is providing content to another computer on the internet?

To be a server, does a system always need serving specific software?

thanks,
fisico30
 
  • #5
If your definition of a server is anything that provides some service over the internet, then sure, by that definition the IP camera would be a server.
But generally to be called a server, you'd need to be a computer first. Say for example, you have your IP camera connected to a computer that's hosting an HTTP stream of whatever the camera is seeing. What's the server, the IP camera hosting to the single computer or the computer hosting the stream to the internet?

IMO, to be called server, you would need to be a computer that is providing some service Traditionally, this could be a file sharing service, a print server, a DHCP or DNS service host, database host, etc, but it could be anything.
 
  • #6
The port number identifies which program on the target computer will receive the internet packet.

Some programs have been assigned default port numbers, typically called "well known ports". So, for example, if you install a web server, it will usually get installed to expect to receive client requests on port 80. If you install a second web server on the same machine, it will be forced to use a different port number.

These two internet addresses are the same:

http://harbormist.com

http://harbormist.com:80
 

1. What is an IP address?

An IP address is a unique numerical label assigned to every device that is connected to a computer network using the Internet Protocol (IP) for communication. It serves as the address of the device on the network, allowing it to send and receive data.

2. What is a port on an IP address?

A port on an IP address is a virtual endpoint that enables a device to communicate with other devices on a network. It is identified by a number and is used to determine which application or service on the device should handle incoming data. Think of it as a door on a house, with the IP address being the address of the house and the port being the specific door to knock on.

3. How many ports are available on an IP address?

There are 65,535 available ports on an IP address. The first 1,024 ports are reserved for well-known services, such as web servers and email servers, while the rest are available for use by applications and services on the device.

4. How are ports assigned on an IP address?

Ports are assigned dynamically by the operating system or by the application or service using the port. The port number is included in the data packet's header when data is transmitted over the network, allowing the receiving device to know which application or service the data is meant for.

5. Why do I need to understand ports on IP addresses?

Understanding ports on IP addresses is important for troubleshooting network issues and configuring network devices. It also allows for efficient and secure communication between devices on a network, as different applications and services can use different ports to communicate. Additionally, knowing how ports work can help with network security, as certain ports can be closed or blocked to prevent unauthorized access to a device.

Similar threads

  • Computing and Technology
Replies
14
Views
1K
  • Computing and Technology
Replies
27
Views
2K
  • Programming and Computer Science
Replies
7
Views
334
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
3K
Replies
4
Views
2K
Replies
2
Views
747
Replies
2
Views
1K
Replies
3
Views
2K
Replies
2
Views
665
Back
Top