Thursday, December 11, 2014

Ports (TCP/UDP Protocol 0-65535)


TCP/UDP Protocol 0-65535
***********************

Port numbers are assigned in various ways, based on three ranges: 
System Ports (0-1023)
User Ports (1024-49151)
Dynamic and/or Private Ports (49152-65535)

0-1023======well known ports
1024-49151===registered ports
49152-65535==Dynamic and/or Private

port
*****
A port is piece of software which is used as docking point in your machine, where remote application can communicate.

hardware port
****************
This is a physical peripheral connecting point to a machine from a physical device.

socket
*******
Socket is combination of software Port and IP address.

range of ports
****************
Port numbers can vary from 0 to 65535, so total we can get 65536 ports

Why port numbers are just 65536
*************************************
This is because limitation in TCP/IP stack where the port number field is just 16bit size. So we get only 2^16(2 to the power of 16) ports which are equal to 65536 available ports

well-known ports or assigned ports
**************************************
Well known ports are from 0 to 1023(total 2^10=1024 ports)

default port
*************
Default port is a designated port for particular well-known service such as web server, mail server, ftp server etc. By default FTP uses 21 port, DNS uses 53 and Apache uses 80 port & we can change default port for a service (example Apache, squid). In Apache and DNS we can change this using listen configuration entry in httpd.conf and named.conf. Squid have port entry in its squid.conf file to mention port number.


you can see all the port information in Linuxfrom /etc/services files.Use nmap command to see open ports in Linux


TCP protocol number===6 (TCP have its own numbers in TCP/IP stack)
UDP protocol number===17 (UDP have its own numbers in TCP/IP stack)
squid===3129
http===80
https===443
ftp data transfer====20
telnet(For insecure remote administration)===23
ssh(For secure remote administration which uses SSL to encrypt the transmission)==22
SMTP(Mail Transfer Agent for e-mail server such as SEND mail)===25
dns(Special service which uses both TCP and UDP)==53
bootp===67
dhcp server===67
dhcp client===68
TFTP(Trivial file transfer protocol uses udp protocol for connection less transmission of data)===69
snmp===161
mysql===3306
pop3===110
imap====993
ntp===123
samba===901
nfs====2049
kerberos====88
tftp====69
ldap===389
uucp====540
nntp===563
luci====8084
ricci====11111

No comments:

Post a Comment

TCP/UDP Protocols/Prots & important port numbers in Linux OS

TCP/UDP Protocols/Ports are ranging from 0-65535 so total we have 65536 ports & because of the limitation in TCP/IP stack where the por...