Ports and protocols
Lets think of IP addresses as real life addresses and we can think of data packets sent over a network as parcels.
If we want to get a parcel to an address we need to choose a courier or mail service provider that can actually reach our destination, for example, if you are sending a package to a rural address, you would pay extra to have a rural address deliverer, deliver it.
That’s how ports work, they allow data to be sent and received by specific applications. Protocols are essentially the language used by those two specific applications to communicate. The easiest way to think of protocols is by imagining how to the parcels are packaged to be sent.
Port numbers and how they are used
So we know now that for data to travel through a network, it needs to use certain ports to access certain protocols. What if data tries to enter a network without a port number? Network security tools like firewalls will block its entry to prevent unauthorized access.
What ports do we use?
The first 1023 ports are used for common services and specifically linked to them. Known as system ports or commonly used ports, some of these include Port 80 (HTTP), Port 22 (SSH), Port 53 (DNS), Port 443 (HTTPS).
Ports 1023-49151 are called registered ports, these are used for applications that arent as commonly used for are registered for that service and never used by any other service. Anybody can register a port. Some examples of registered ports include Port 3306 (MySQL), Port 1725 (Steam Client), Port 25565 (Minecraft).
The third type of port is Dynamic ports which are not registered for any service and can be used anytime These ports range from 49152 to 65535
what are protocols used for?
So we know with our parcel analogy that protocols are how we package the parcel to be sent, how does this translate to networking? Protocols define the set of rules that specify how clients and servers communicate, using the network. For example, you would use a different type of protocol to revive data from a web browser compared to the protocol you would use to send an email.
There are three main types of protocols
Network Communication protocols
Network Security Protocols
Network Management Protocols
Network Comunication Protocols focus on communication between devices or clients and servers where different communication protocols will be used
Hypertext Transfer Protocol (HTTP) Uses TCP/IP communication to deliver web content to your browser
File Transfer Protocol (FTP) Is normally used to deliver files from a client to a server.
Simple Mail Transfer Protocol (SMTP) Used to send emails from a client via a server using TCP.
Network Security Protocols are designed to encrypt data as it travels across a network to maintain security and prevent packet sniffing.
Secure Socket Layer (SSL) provides standard encryption between the client and server/client.
Hypter Text Transfer Protocol Secure (HTTPS) is essentially HTTP but encrypted, it provides a connection between the web client and your browser using SSL encryption.
Secure Shell (SSH) is a cryptographic protocol that provides a secure data connection from a network.
Network Management Protocols are used for tasks such as monitoring, configuring, troubleshooting network devices. They provide a framework for gathering information.
Simple Network Management Protocol (SNMP) is a widely used protocol for gathering data from devices on your network
Remote Monitoring (RM) focuses on monitoring network traffic patterns.
Internet Control Message Protocol (ICMP) allows network connected devices like routers and laptops to send error messages and success or failure messages from requests.
how do they fit into the tcp/tp suite?
Most protocols are found in the application layer as they allow applications to communicate with each other.
protocols that handle data encryption will be found in the presentation layer.
The protocols found in the transport layer will ensure communication and data delivery
The protocols found in the network layer will handle routing and addressing
And the Data Link layer will look after data transfer between devices.
identifying protocols in use
you can find current protocols in session on your windows machine. We can start by opening up our command prompt app. Lets use the command ‘netstat -a’.