773 views
3 votes
3 votes
Is there any way / Approach or any idea to how to learn port addresses for different protocols.

I have seen many questions in test series regarding ports.

I have never seen GATE asking such questions. But what if it comes.

If anyone of you, has any technique to by heart them, then please share here .

It will be beneficial to all .

Thanks !!!

1 Answer

Best answer
6 votes
6 votes

U have to learn port numbers of only some common protocols like HTTP,FTP,SMTP,UDP , TELNET , DNS ,POP .So not a big deal in my opinion.

Also if you are talking about classification of ports in general ,there are 3 types of ports :

a) Predefined ports (also known as universal ports or fixed ports) : Having port number 0 to 1023 e.g. HTTP : 80 , FTP : 20,21

b) Registered ports : Having port number  ranging from 1024 to 49151

c) Dynamic Ports (or epemeral ports) : Having port nos from 49152 to 65535

Maximum possible port no = 65535 since we have 16 bits specified for a port number.

Now we have to remember 2 points :

a) If the source port is a fixed port(e.g. HTTP server having port no 80) and destination port is a dynamic port , then the data is moving from server to client.

b) If the source port is a dynamic port and destination port is a fixed port (e.g. HTTP server port having port no 80 or an FTP port) , then the data is moving from client to server .

Keeping in mind the above points , the header information of TCP or UDP can be given and can be asked if the data is moving from server to client or vice versa.

I hope these points will be useful to all.

selected by

Related questions

1 votes
1 votes
0 answers
4
Pavan Kumar Munnam asked Aug 8, 2017
1,552 views
What will be the ip address-A, subnet mask-B, default gateway-C for the router A given in the below diagramFind A,B,C?