This is a discussion on simple q on IP address and port number within the Linux Networking forums, part of the Linux Forums category; Can anyone tell me whether the Source port(eg., 8080,etc) ,dest port are in decimal format.And how many ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? Also, the tcp,ip,udp,other protocols have a protocol number.So, that is represented by how many bits? Thank You |
|
|||
|
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? > Also, the tcp,ip,udp,other protocols have a protocol number.So, that > is represented by how many bits? > > > Thank You For the First question your answer is right.It takes 2 bytes i.e.,16 bits. For the Second question, you said ip,tcp and udp i.e., the IP layer is the base layer for both TCP and UDP protocols. So in MAC Layer the Protocol lentgh is 2 bytes i.e,IP or some other one but in IP layer its 1byte specifying TCP or UDP, and there will be no protocol number mentioned in TCP layer it distinguishes the protocol depending on some pre-defined port numbers for a particular port number. |
|
|||
|
On 23 Mar 2007, in the Usenet newsgroup comp.os.linux.networking, in article
<1174644586.339950.214470@e1g2000hsg.googlegroups. com>, 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 |
|
|||
|
On Mar 24, 12:53 am, ibupro...@painkiller.example.tld (Moe Trin)
wrote: > On 23 Mar 2007, in the Usenet newsgroup comp.os.linux.networking, in article > > <1174644586.339950.214...@e1g2000hsg.googlegroups. com>, dew wrote: > > Can anyone tell me whether theSourceport(eg., 8080,etc) ,destport > > 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 bitnumber. How you represent 16 bits is up to you. Most > people speak in decimal, but theprotocolrepresents it as a binary. > See the appropriate specification > > 0768 User DatagramProtocol. J. Postel. August 1980. (Format: TXT=5896 > bytes) (Also STD0006) (Status: STANDARD) > > 0793 Transmission ControlProtocol. J. Postel. September 1981. > (Format: TXT=172710 bytes) (Updated by RFC3168) (Also STD0007) > (Status: STANDARD) > > Remember that any service _MIGHT_ use anyportnumber. There exists anumberof "well-known"portnumbers where you can expect to find a > service, but just because something is usingport$FOO does NOT mean that > it must be service $BAR. Seehttp://www.iana.org/assignments/port-numbers > > > Also, the tcp,ip,udp,other protocols have aprotocolnumber.So, that > > is represented by how many bits? > > See RFC0791 section 3.1 - or read your textbook. For a list of those > protocols seehttp://www.iana.org/assignments/protocol-numbers > > 0791 InternetProtocol. 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. > Old guy ok thanks and > Oh, and please stop posting the same article to multiple groups. You > are acting like a spammer when you do so. > sorry abt that |