Binarycse

Computing For Everyone

Sun05202012

Last update09:47:49 AM

Network Port

What is a Network Port ?

Port is an application-specific or process-specific software construct serving as a communications endpoint used by Transport Layer protocols of the Internet Protocol Suite such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). A specific port is identified by its number commonly known as the port number.

Transport Layer protocol, such as TCP, UDP, SCTP, and DCCP specify a source and destination port in their packet headers. A port number is a 16-bit unsigned integer, ranging from 0 to 65535. A process "binds" to a particular port to send and receive data, meaning that it will listen for incoming packets whose destination port matches that port number, and/or send outgoing packets whose source port is set to that port number. Processes may bind to multiple ports.

Applications implementing common services will normally listen on specific port numbers which have been defined by convention for use with the given protocol — see list of TCP and UDP port numbers. Typically, these will be low port numbers, and in UNIX only processes owned by the super user can create ports with numbers from 0 to 1023. This is for security to prevent un trusted processes from acting as system services. Conversely, the client end of the connection will typically use a varying, high port number (ephemeral port).

Because the port number is a part of the packet header, it is readily interpreted not only by the sending and receiving computers, but also by other components of the networking infrastructure. In particular, firewalls are commonly configured to respond differently to packets depending on their source and/or destination port numbers. Port forwarding is an example application of this.

Processes implement connections to transport protocol ports by means of sockets. A socket is the software structure used as the transport end-point. It is created by the process and bound to a socket address which consists of a combination of a port and an IP address. Sockets may be set to send/receive data in one direction at a time, called half duplex, or simultaneously in both directions, called full duplex. In addition to the transport protocols, sockets are also used by interprocess communications protocols within a single host.

Because different services commonly listen on different port numbers, the practice of attempting to connect in sequence to a wide range of services on a single computer is commonly known as port scanning. This is usually associated either with malicious cracking attempts or with a search for possible vulnerabilities to help prevent such attacks.

Port connection attempts are frequently monitored and logged by computers connected to networks. The technique of port knocking uses a series of port connections or "knocks" from a client computer to enable a server connection.

IANA

The Internet Assigned Numbers Authority (IANA) is responsible for the global coordination of the DNS Root, IP addressing, and other Internet protocol resources.

A list of registered ports can be found on the IANA Website - http://www.iana.org/assignments/port-numbers

PORT NUMBERS

The port numbers are divided into three ranges: the Well Known Ports,the Registered Ports, and the Dynamic and/or Private Ports.

The Well Known Ports are those from 0 through 1023.

DCCP Well Known ports SHOULD NOT be used without IANA registration.

The registration procedure is defined in [RFC4340], Section 19.9.

The Registered Ports are those from 1024 through 49151.

Some Of the commonly used Ports are mentioned below.

 

Keyword

Number

Protocol(s)

Description

tcpmux

1

TCP, UDP

TCP Port Service Multiplexer

echo

7

TCP, UDP

Echo

discard

9

TCP, UDP

Discard

systat

11

TCP

Active Users

daytime

13

TCP, UDP

Daytime (RFC 867)

qotd

17

TCP

Quote of the Day

msp

18

TCP, UDP

message send protocol

chargen

19

TCP, UDP

Character Generator

ftp-data

20

TCP, UDP

File transfer default data

ftp

21

TCP, UDP

File transfer control

ssh

22

TCP, UDP

Remote login protocol

telnet

23

TCP, UDP

Telnet

smtp

25

TCP, UDP

Simple Mail Transfer

time

37

TCP, UDP

Time

rlp

39

TCP, UDP

Resource location protocol

nameserver

42

TCP, UDP

Host name server

whois

43

TCP, UDP

Who is

re-mail-ck

50

TCP, UDP

Remote mail checking protocol

domain

53

TCP, UDP

Domain name server

bootps

67

TCP, UDP

Bootstrap protocol server

bootpc

68

TCP, UDP

Bootstrap protocol client

tftp

69

TCP, UDP

Trivial file transfer protocol

gopher

70

TCP, UDP

Gopher

finger

79

TCP, UDP

Finger

www

80

TCP, UDP

World wide web or HTTP

kerberos

88

TCP, UDP

Kerberos

supdup

95

TCP, UDP

SUPDUP

hostname

101

TCP, UDP

NIC Host Name Server

iso-tsap

102

TCP, UDP

ISO-TSAP Class 0

csnet-ns

105

TCP, UDP

CCSO name server protocol

rtelnet

107

TCP, UDP

Remote Telnet Service

pop-2

109

TCP, UDP

Post Office Protocol - Version 2

pop-3

110

TCP, UDP

Post Office Protocol - Version 3

sunrps

111

TCP, UDP

SUN Remote Procedure Call

auth

113

TCP, UDP

Authentication Service

sftp

115

TCP, UDP

Simple File Transfer Protocol

uucp-path

117

TCP, UDP

UUCP Path Service

nntp

119

TCP, UDP

Network News Transfer Protocol

nyp

123

TCP, UDP

Network Time Protocol

netbios-ne

137

TCP, UDP

NETBIOS Name Service

netbios-dgram

138

TCP, UDP

NETBIOS Datagram Service

netbios-ssn

139

TCP, UDP

NETBIOS Session Service

imap

143

TCP, UDP

Internet Message Access Protocol

snmp

161

TCP, UDP

SNMP

snmp-trap

162

TCP, UDP

SNMPTRAP

cmip-man

163

TCP, UDP

CMIP/TCP Manager

cmip-agent

164

TCP, UDP

CMIP/TCP Agent

xdmcp

177

TCP, UDP

X Display Manager Control Protocol

nextstep

178

TCP, UDP

NextStep Window Server

bgp

179

TCP, UDP

Border Gateway Protocol

prospero

191

TCP, UDP

Prospero Directory Service

irc

194

TCP, UDP

Internet Relay Chat Protocol

smux

199

TCP, UDP

SMUX