Networking in DevOps
Rahul Kumar
Posted on July 29, 2024
In today's interconnected world, computer networking plays a crucial role in DevOps, enabling seamless communication and collaboration between systems and teams. This blog post will delve into the fundamentals of computer networking, exploring key concepts and their relevance in the DevOps landscape.
What is Computer Networking?
Computer networking is the exchange of data between two or more network interfaces. Each device on a network is assigned an IP address, a unique identifier that facilitates communication.
Components of a Computer Network
A computer network comprises various components, including:
- Two or more computers or devices (e.g., computers, smartphones, IoT devices)
- Cables or wireless connections to link devices
- Network Interface Cards (NICs) to connect devices to the network
- Computers to process and interpret data
- Switches to connect multiple network interfaces
- Routers to connect multiple networks
- Operating systems to manage network operations
The OSI Model
The Open Systems Interconnection (OSI) model is a conceptual framework that standardizes network communication. It consists of seven layers, each with specific functions:
- When we transfer information from one device to another, it travels through 7 layers of OSI model. First data travels down through 7 layers from the sender’s end and then climbs back 7 layers on the receiver’s end.
- Data flows through the OSI model in a step-by-step process:
- Application Layer: Applications create the data.
- Presentation Layer: Data is formatted and encrypted.
- Session Layer: Connections are established and managed.
- Transport Layer: Data is broken into segments for reliable delivery.
- Network Layer: Segments are packaged into packets and routed.
- Data Link Layer: Packets are framed and sent to the next device.
- Physical Layer: Frames are converted into bits and transmitted physically.
- Each layer adds specific information to ensure the data reaches its destination correctly, and these steps are reversed upon arrival.
- Let’s look at it with an Example:
Luffy sends an e-mail to his friend Zoro.
Step 1: Luffy interacts with e-mail application like Gmail, outlook, etc. Writes his email to send. (This happens in Layer 7: Application layer)
Step 2: Mail application prepares for data transmission like encrypting data and formatting it for transmission. (This happens in Layer 6: Presentation Layer)
Step 3: There is a connection established between the sender and receiver on the internet. (This happens in Layer 5: Session Layer)
Step 4: Email data is broken into smaller segments. It adds sequence number and error-checking information to maintain the reliability of the information. (This happens in Layer 4: Transport Layer)
Step 5: Addressing of packets is done in order to find the best route for transfer. (This happens in Layer 3: Network Layer)
Step 6: Data packets are encapsulated into frames, then MAC address is added for local devices and then it checks for error using error detection. (This happens in Layer 2: Data Link Layer)
Step 7: Lastly Frames are transmitted in the form of electrical/ optical signals over a physical network medium like ethernet cable or WiFi.
- After the email reaches the receiver i.e. Zoro, the process will reverse and decrypt the e-mail content. At last, the email will be shown on Zoro’s email client.
Network Classification by Geography
Networks can be classified based on their geographical scope:
LAN (Local Area Network): Covers a small area, such as a room or building.
WAN (Wide Area Network): Spans a large geographical area, like the internet.
MAN (Metropolitan Area Network): Covers a city or metropolitan area.
CAN (Campus Area Network): Connects networks within a campus or office complex.
PAN (Personal Area Network): Covers a small personal space, like Bluetooth connections.
Switches and Routers
Switches and routers are essential networking devices:
Switches: Connect devices within a LAN, enabling resource sharing.
Routers: Connect multiple networks, facilitating communication between them.
Home and Corporate Networks
Understanding home networks helps grasp the basics of networking. Home networks typically include a router that connects to the internet and a switch to connect devices within the home.
Corporate networks are more complex, with multiple switches, routers, and firewalls for security. They often have multiple internet service providers and are divided into subnets for better organization and management.
Protocols
Protocols are rules governing data transmission and reception. They define data format, timing, sequencing, and error checking. Each service running on a computer has a port number associated with a specific protocol.
- Tomcat service, which is an application, a Web application service, wants to communicate with a MySQL server to store some data.
- A Tomcat server is going to send traffic to the destination IP address of my SQL Server and the port number of the service, 3306 That's the default port for MySQL That's how the Tomcat will have an assurity that it is going to reach to the MySQL server.
Networking Commands
Several networking commands are useful for troubleshooting and network management:
- ifconfig or ip addr show: Displays active network interfaces.
- ping: Tests connectivity to a remote host.
- tracert: Traces the route to a remote host.
- netstat or ss: Shows open TCP ports.
- dig or nslookup: Performs DNS lookups.
- route: Displays routing tables.
- arp: Manages the ARP cache.
- mtr: Combines ping and traceroute functionality.
- telnet: Tests connectivity to a specific port on a remote host.
Posted on July 29, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 27, 2024