0

to settle an argument at work. Is it possible, in theory, to create a network protocol with ports higher than 65535 and get it approved by IANA ?

if not, why not ?

Anirudh Ramanathan
  • 46,179
  • 22
  • 132
  • 191
Oren
  • 4,152
  • 3
  • 30
  • 37
  • This question seems to be more about the rules and regulations of IANA than anything programming related. – Flexo Dec 06 '12 at 19:40
  • Actually, as a programmer in the area of networks, it became very relevant to know if ports have a theoretical (at least regulatory) bound. maybe my wording could be better (suggestions for edits are welcome) but I still believe the question is valid and on topic. – Oren Dec 07 '12 at 07:59
  • What IANA would/wouldn't sign off on is a purely political thing. If you're defining your own protocol you can theoretically put any size integer you wanted as the port numbers, only politics stands in the way. – Flexo Dec 07 '12 at 23:35
  • that piece of information, the one you just gave in your comment, is the one I did not know, and needed to know in order to handle ports properly in my program. and the reason I posted this question here. so, thanks for your answer. it helps. @Flexo – Oren Dec 08 '12 at 08:30

2 Answers2

3

If you are using TCP or UDP on top of IP, then no. Both TCP and UDP only use 16 bits for the port number. If you are using some other protocol suite such as IPX/SPX, then it depends on that protocol. If you are making your own protocol, then you can do whatever you want. Getting it approved by IANA is a different story.

http://en.wikipedia.org/wiki/Transmission_Control_Protocol http://en.wikipedia.org/wiki/User_Datagram_Protocol

2^16 = 65536 different ports

Since computer numbers start counting at 0, this leaves 65535 as the max.

user1456786
  • 61
  • 1
  • 8
3

Yes. It is possible to create one with an arbitrary number of ports.

Getting it approved by IANA (and IETF, ISO and whoever else are concerned) is just a matter of getting enough people to use your wonderful new invention. Which is extremely unlikely but not theoretically impossible.

Minthos
  • 900
  • 4
  • 13