Understanding Networking, Ports, and Protocols in DevOps ๐ŸŒโš™๏ธ

ยท

6 min read

Understanding Networking, Ports, and Protocols in DevOps ๐ŸŒโš™๏ธ

In DevOps, it's important for different services, tools, and systems to communicate well. To make sure everything works together smoothly and automatically, DevOps teams need to know how networking, ports, and protocols function.

  • Network: Collection of โ€œcomputers connected togetherโ€.

  • Internet: Collection of these computer Networks.

    What Is The Internet & How Does It Work?

  • Ports: Defines the application that we are using. Port decides which application the data should be sent.

  • IP Address: Device can talk to each other with the help of IP.

  • MAC Address: Media Access Control is a unique Identifier for a device on a network. It is used to ensure that data packets are delivered to the correct device.

  • Routers: It is a Device that routes packets based on their IP addresses. It connects networks and subnetworks allowing devices to access the Internet and share data.

Note โ€“ A Router can connect networks in Different locations.

  • Switches: A switch is a Hardware device that receives data packets from connected devices. Switch determines the destination of the packet. If the packet is destined for another network, the switch forwards it to a Router.

  • Modems: It is used to convert Digital signals to Analog signals/ Electrical signals.

    Modem vs Router vs Switch: Exploring the Difference

  • VPN (Virtual Private Network): A VPN is a technology that makes a safe, encrypted link between your device and a private network over the internet. It protects your data and privacy by hiding your IP address and encrypting your internet traffic. VPNs are often used for remote work, accessing content that's restricted by region, and keeping communications secure.

  • Submarine Cables: Optical Fiber cables (for Internet) & Coaxial Cables (Physically).

  • SONET โ€“ (Synchronous Optical Networking): Basically, carries data using optical fibers, hence covering larger distances.

  • Frame Relay: A way to connect LAN to WAN

  • Wireless: Bluetooth, Wi Fi. 3G, 4G, LTE, 5G

  • Topologies: Bus topology, Ring Topology, Star Topology, Tree Topology, Mesh Topology.

LAN, WAN, MAN - Collection of these forms Internet.

In this blog, we will dive into these concepts, and break them down into a simple, human-readable format with a tabular overview.

NetworkStands forArea coveredInternet speedMaintenanceExamplesNetwork Devices
WANWide Area networkConnects devices over large areaSlowDifficultInternet services, Broadband servicesVPN, Satellite, 3G/4G
MANMetropolitan Area NetworkConnects devices within a city or large campus.ModerateMore Difficult than LANTelephone networks, TV networksOptical fiber rings
LANLocal Area NetworkConnects devices within a small area.FastEasy to MaintainHomes, Schools, OfficesRouters, Switches, Hubs, Wi -Fi Access points.

What Are Ports and Protocols in DevOps? ๐Ÿ› ๏ธ

  • Ports: A port is a logical access point for communication between devices and services over a network. Think of it like a door that allows data to flow in and out of a computer system.

Ports are 16- bit numbers. (2 to the power of 16 = 65,000)

0 โ€“ 1023 = Reserved ports

1024 โ€“ 49152 = Reserved for specific applications

Remaining = We can use

  • Protocols: A protocol is a set of rules or standards that govern how data is transmitted over a network. It defines the method of communication between two systems.

In DevOps, knowing the right protocols and ports ensures that different tools and services can communicate securely and efficiently.


Key Ports and Protocols in DevOps ๐Ÿ”Œ

The table below outlines the most important ports and protocols used in DevOps, with a description and example tools for each:

Stage/FunctionProtocolPort(s)PurposeExample Tools
1. Web CommunicationHTTP/HTTPSPort 80 (HTTP) / Port 443 (HTTPS)HTTP is used for web communication. HTTPS adds encryption for secure data transfer.Jenkins, GitHub, GitLab, Docker Hub ๐ŸŒ
2. Secure Remote AccessSSHPort 22Secure remote login and data transfer. Often used for server management and CI/CD pipeline execution.GitLab, Ansible, AWS EC2, Azure VM ๐Ÿ”
3. Version ControlGitPort 22 (SSH) / Port 443 (HTTPS)Used for managing code repositories. Git over SSH or HTTPS allows developers to push and pull code.GitHub, GitLab, Bitbucket ๐Ÿ—‚๏ธ
4. File TransferFTP/SFTPPort 21 (FTP) / Port 22 (SFTP)FTP (unsecure) and SFTP (secure) are used to transfer files between systems.Jenkins, GitLab, Docker ๐Ÿ“ค๐Ÿ“ฅ
5. Domain ResolutionDNSPort 53Resolves domain names into IP addresses, allowing systems to find each other in the network.Kubernetes, Docker ๐Ÿงญ
6. Time SynchronizationNTPPort 123Syncs the time across servers and services to maintain accurate logs and scheduled tasks.Prometheus, Grafana, Nagios ๐Ÿ•’
7. Email NotificationsSMTPPort 25 (SMTP) / Port 465 (SMTP Secure)SMTP is used to send emails for alerts, build results, and failure notifications.Jenkins, GitLab, Slack ๐Ÿ“ง
8. Network MonitoringSNMPPort 161 (SNMP) / Port 162 (SNMP Trap)Monitors network devices and services for performance and health.Nagios, Zabbix, Prometheus ๐Ÿ“ก
9. Continuous IntegrationWebSocketPort 8080WebSockets enable real-time communication for CI/CD systems. Often used for live updates.Jenkins, Travis CI, CircleCI ๐Ÿš€
10. Database ConnectivityJDBCVaries (Depends on DB)Used to connect applications (e.g., Java apps) to databases for queries and data updates.MySQL, PostgreSQL, MongoDB ๐Ÿ’พ
11. Lightweight MessagingMQTTPort 1883 (MQTT) / Port 8883 (MQTT Secure)MQTT enables lightweight messaging, often for IoT and event-driven systems.Grafana, Prometheus ๐Ÿ“ก


Best Practices for Managing Ports and Protocols ๐Ÿ”‘

  • Secure Communication: Always prioritize HTTPS (Hypertext Transfer Protocol) - Port 443 for encrypted communication over HTTP.

  • SSH Keys: Use SSH (Secure Shell) - Port 22 for secure remote logins and version control.

  • Close Unnecessary Ports: Keep your firewall closed for ports you don't need to reduce security risks.

  • Use VPNs: For safe internal communications, use VPNs or private networks between services.


Conclusion ๐ŸŽ‰

Understanding the networking protocols and ports that DevOps uses is important for smooth communication, automation, and security in your workflow. By managing these protocols well, you can improve performance and boost security in your DevOps process.

ย