Re: simple q on IP address and port number



On 23 Mar 2007, in the Usenet newsgroup comp.os.linux.networking, in article
<1174644586.339950.214470@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, dew wrote:

Can anyone tell me whether the Source port(eg., 8080,etc) ,dest port
are in decimal format.And how many bits does it take up.There can be
65535 ports.so 16 bits am i right?

It's a 16 bit number. How you represent 16 bits is up to you. Most
people speak in decimal, but the protocol represents it as a binary.
See the appropriate specification

0768 User Datagram Protocol. J. Postel. August 1980. (Format: TXT=5896
bytes) (Also STD0006) (Status: STANDARD)

0793 Transmission Control Protocol. J. Postel. September 1981.
(Format: TXT=172710 bytes) (Updated by RFC3168) (Also STD0007)
(Status: STANDARD)

Remember that any service _MIGHT_ use any port number. There exists a
number of "well-known" port numbers where you can expect to find a
service, but just because something is using port $FOO does NOT mean that
it must be service $BAR. See http://www.iana.org/assignments/port-numbers

Also, the tcp,ip,udp,other protocols have a protocol number.So, that
is represented by how many bits?

See RFC0791 section 3.1 - or read your textbook. For a list of those
protocols see http://www.iana.org/assignments/protocol-numbers

0791 Internet Protocol. J. Postel. September 1981. (Format: TXT=97779
bytes) (Obsoletes RFC0760) (Updated by RFC1349) (Also STD0005)
(Status: STANDARD)

You can find the RFCs using the search engine you are posting from.
Oh, and please stop posting the same article to multiple groups. You
are acting like a spammer when you do so.

Old guy
.



Relevant Pages

  • Re: VPN error code 628
    ... Which ports need to be opened for running VPN ... Pass IP protocol 50 and 51. ... Posting on MS newsgroup will benefit all readers and you may get more help. ... > On the router I forwarded TCP Port 3389 to 10.30.1.1. ...
    (microsoft.public.windows.server.networking)
  • Re: [Full-Disclosure] SNMP Broadcasts
    ... > the standard assigns a common usage port), but it sure as hell is the ... It is the SSH protocol, but it is not the SSH *service*. ... violates the standard. ...
    (Full-Disclosure)
  • abort at the end of data transfer
    ... data chunk is i.e 6. ... int init_client(int port, char *ip) { ... Protocol Info ... Stream Control Transmission Protocol, Src Port: 1031, Dst Port: ...
    (comp.lang.c)
  • abort at the end of data transfer
    ... data chunk is i.e 6. ... int init_client(int port, char *ip) { ... Protocol Info ... Stream Control Transmission Protocol, Src Port: 1031, Dst Port: ...
    (comp.unix.programmer)
  • abort at the end of data transfer
    ... data chunk is i.e 6. ... int init_client(int port, char *ip) { ... Protocol Info ... Stream Control Transmission Protocol, Src Port: 1031, Dst Port: ...
    (comp.unix.internals)