Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ports on IP addresses

  1. Feb 2, 2013 #1
    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....

  2. jcsd
  3. Feb 2, 2013 #2


    User Avatar
    Homework Helper

    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:


    Last edited: Feb 2, 2013
  4. Feb 5, 2013 #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 dont 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.
  5. Feb 11, 2013 #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?

  6. Feb 12, 2013 #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.
  7. Mar 6, 2013 #6


    User Avatar
    Gold Member

    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:


Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Ports on IP addresses
  1. Ip address tracing (Replies: 11)

  2. Ip address assignment! (Replies: 3)

  3. IP address (Replies: 4)