Port question
Results 1 to 8 of 8

Thread: Port question

  1. #1
    Junior Member
    Join Date
    Jul 2003
    Posts
    12

    Question Port question

    I was watching The Screen Savers on TechTV today and they were doing a Call-athon on hacking the entire show. One question was what was ports, and leo (host) said they are metaphoric holes(not like for hacking) where software talks into and out of, like quake is on 666... MY question is: Since ports are metaphoric, is it possible to make a program that talks to another computer on port 888888888(for example) or is there a set limit to the amount of ports on a computer. I was just wondering because the explanation kind of confused me. Thanx in advance! -(V)
    Whoever said Assembly was dead?

  2. #2
    Junior Member
    Join Date
    Jun 2003
    Posts
    2
    now im not completely sure but i think there are no set number of ports on a computer.

  3. #3
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    Firstly, ports only exist in some protocols. There are two commonly used protocols on the internet which have "ports". These are TCP and UDP. TCP and UDP are independent, an two applications wishing to communicate must use the same one (however many use both, often for different functions).

    In TCP and UDP, valid port numbers are 1-65535, hence there are 65,535 port numbers in total.

    Port zero is a bit of a tricky one - I read the RFCs on TCP, and I haven't found anything that explicitly prohibits using port zero, but most (i.e. All popular operating systems) implementations do not allow applications to usefully use it because it's used as a placeholder for "I don't care" in the bind() call.

    So no, there are not an infinite number of them.

    Some other protocols don't use ports (for example ICMP). Some people incorrectly refer to ICMP ports. There is no such thing.

    Lesser-used protocols also have ports. IPX is the protocol used by Novell networks (particularly older ones), common on LANs and smaller WANs. As far as I know, it also has 65,535 port numbers (someone correct me if I'm wrong).

    I have no idea about ipv6. Someone help out here

  4. #4
    Member
    Join Date
    Jul 2003
    Posts
    55
    I believe there's exactly 65,000 ports. But i could be very wrong
    [gloworange]\"Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live.\" Peter Cochrane[/gloworange]

  5. #5
    Senior Member
    Join Date
    Jul 2002
    Posts
    229
    Heh, heh nah, Slarty is exactly right, there are excactly 65,535 in those protocol suites.

    (\/)URD0CK, it's good that you show an intrest in ports. Sense they are a very important part of understanding how the internet actualy works and how to remain secure on the internet. Also it's important to know that each port that is assigned has a very specific function, here's a good list that will help you on that.

    http://www.opendoor.com/doorstop/ports.html

    There are also TONS of other links and tutorials that will give you more info on the subject. It's important to take it step by step though, so your not overwhelmed. Just search this site to find what your looking for or google if anything else...

    On a sidenote, The Screen Savers is a great show, I really wish I could have won that $100,000 tech makeover!

    --Peace
    The real question is not whether peace can be obtained, but whether or not mankind is mature enough for it...

  6. #6
    Senior Member IKnowNot's Avatar
    Join Date
    Jan 2003
    Posts
    792
    I believe slarty is correct ( I think he usually is )

    port numbers are made up of 16 bits

    1111111111111111 in binary is 65535 in dec.

    In addition to the RFCs you can read up on it in IBM's RedBook

    TCP/IP Tutorial and Technical Overview

    not for the faint of heart
    " And maddest of all, to see life as it is and not as it should be" --Miguel Cervantes

  7. #7
    Junior Member
    Join Date
    Jul 2003
    Posts
    12

    Thumbs up Thanx all!

    Thanx slarty, radical, and iknownot for the answer... helped me out a lot! So it is impossible to "create" a port i guess then. Thanx again or the help i understand them now!
    Whoever said Assembly was dead?

  8. #8
    Senior Member
    Join Date
    Feb 2003
    Posts
    282
    >>So it is impossible to "create" a port i guess then.

    You use an existing port, if two programs are to comunicate with one another, ports are used, this is implemented useing sockets. One end point may be the server, while the other is the client. Assumeing we are designing a server:

    You create the socket,
    You bind the socket to a port,
    You listen to the socket
    And you acept any incomeing conections

    The client, has less work to do

    Create the socket
    Then conect your socket to a remote host, useing Conect.

    EDIT: the port must not already be in use. And in Windows, Winsock must be initiated first using WSAStarup

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •