When application communicates - it first choose TCP or UDP.
Then application generates source and destination port numbers.
When source communicates with server,it must establish a session.
lets say a web browser is open,source sends a message via HTTP using TCP port 80.
source -------------------session------------host
ip : 10.1.1.10 ip : 10.5.1.100
tcp port 80 tcp port 80
note : 80 is port number assigned for HTTP.
- to see the list of well known port numbers ..go to the website http://www.iana.org
When you open a browser in your computer.
-Type cmd and open a cmd prompt.
-type netstat -f
this command shows the list of all
port numbers used ,ip address etc
for example :TCP 172.25.2.54:51895
here , 51895 is the source port number.
-type netstat -n
TCP/UDP both has ( 0 to 655357) port numbers.
some well known port numbers are from 0- 1023
TCP :
21- FTP
22- SSH -sending email
23- TELNET
25 - SMTP
53 - DNS SERVER
80- HTTP
110- POP3 - post office protocol - to receive emails
443- HTTPS - secure protocol
UDP:
53- DNS CLIENT
69-TFTP