When a PC, for example, is connecting to a Web server on the Internet, traffic will be sent from
a source IP address to a destination IP address.
So the source IP address and this transmission will be from the host.
Ten 111.
To the server ten 1 to 1 traffic will be routed from the PC to the server, and when the traffic arrives
at the server, the server needs a way to differentiate which application to send this traffic to.
Well-known port numbers are used for various common day applications like HTTP.
So this server will be running a web server application like IIS or Apache, which serves up the web
pages for the web browser.
Using Apache as an example, the Apache server will be listening to traffic on Port 80, which is the
well known port number for HTTP.
Your browser will automatically open up a connection to the server's IP address on that port number.
If the defaults are used.
When that traffic arrives at the transport layer, TCP will send that traffic to port 80.
The port number the Apache server is listening on.
And the Apache server, the application layer will process the data received.
The PC will use a random source port number in a specific range.
That range is dependent on the operating system and whether the icon is standards or followed.
But essentially a random port number is used as the source and a well known port number is used as the
destination in this conversation.
When the reply from the server is sent back to the PC.
Note that the source address will be the servers IP address and the port number will be port 80.
The destination IP address will be the PC's IP address and the port number the PC selected as the source
port number.
So note return traffic has the IP addresses reversed and the port numbers are reversed.
The PC's web browser.
Let's say, for instance, Internet Explorer will be listening on this port, 60,000.
And when the traffic arrives at the PCC's transport layer, in this case, TCP IP, TCP IP will push
that traffic to port 60,000.
The port number that Internet Explorer is expecting to receive the traffic on.
Thus, port numbers bind layer four to layer seven, allowing applications to communicate.
Now there are some well-known port numbers that you need to remember.
Well-known port numbers are in the range less than or equal to 1023.
So for example, HDPE uses Port 80.
And TCP as its transport layer protocol.
FTP control, which is used for FTP server and client negotiation, uses port 21 using TCP.
FTP data which is used for the actual transmission of data and FTP uses port 20.
And TCP.
Telnet used for management uses Port 23 and uses TCP.
DNS is an interesting case because it uses both TCP and UDP.
And uses Port 53.
DNS primarily uses UDP.
On Port 53 to serve requests.
In other words, when a host needs a resolution for, say, Cisco com that will use UDP port 53 TCP
is used when the response data exceeds 512 bytes or for tasks such as zone transfers.
Zone transfers are used for replication of databases containing DNS data across a set of DNS servers.
Two FTP uses UDP port 69 and SNMP uses UDP port 161.
Once again to see a list of port numbers.
Go to Google and type in on airport numbers.
And as you can see here, the Internet assigned numbers authority or I on a port number list is available
for viewing.
As you can see here, the well-known port numbers on the range, 0 to 1023.
However, because of the number of applications that are in use.
Is a second range known as the registered ports in the range 1024 through to 40 9151, which are generally
used for proprietary applications.
Dynamic or private port numbers on the range.
4915232 65,535.
As you can see, the full port range is from 0 to 6, five, five, three, five.
To search for a well-known application.
I'm just going to use the key sequence control F and then type in, for example, Telnet.
And as you can see here, Telnet uses port 23.
Now both TCP and UDP could be used for TELNET, but in most implementations, TCP is used.
I could search for another protocol like, let's say, tftp.
And as you can see here, TFTP uses Port 69 once again, TCP or UDP could be used, but in real world
applications UDP is used.
I could search, for example, for HDPE and as you can see here.
Notice Port 80.
There are many applications here.
Some of which you may never have used.
We'll see.
There's another example but p and it's derivative.
DHCP use port 67 and 68.
I could scroll down the list and show you many many port numbers.
Here's an example of VMware and.
Here's an example of some of the port numbers used by Bloomberg.
Now, according to the I honor, there are three ranges of port numbers.
Well known port numbers are less than or equal to 1023.
Registered port numbers on this range, 1024 to 4 9151.
And dynamically assigned port numbers, which should be used by hosts when initiating sessions to,
for instance, well known port numbers on the range.
49152265535.
However, vendor implementations do not necessarily follow that recommendation.
Ephemeral port numbers are short lived ports used for the client side of a connection.
So when your PC initiates a session to a web server, an ephemeral port will be used.
They are temporary and only lost for the duration of the session.
As I've shown you, the honor suggests the range 4915 2 to 65535.
However, BSD uses this range 1024 through 4999 Linux or Linux users ports 327682 61,000 Windows through
to server 2003.
Use the range 1025 to 5000.
Windows Vista and seven.
Use the actual on a range and free BSD uses the R on a range since version 4.6.
So just be a way the source port numbers used by hosts will vary.
Based on the vendor implementation and which ephemeral port numbers that vendor has decided to use.
So in this example, this host, which may be running Windows Vista, is using a source port of 60,000
when connecting to this Apache server on well known port 80.