bregman-arie/devops-exercises

▲ 64 stars today★ 84,669⑂ 20,344

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

About bregman-arie/devops-exercises

bregman-arie/devops-exercises is an open-source project on GitHub, mainly written in Python. Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network It currently holds 84,669 stars and 20,344 forks with 56 open issues, and was last pushed on 2025-12-27 (repository created 2019-10-03).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #46 with 64 new stars today.

GitHub Repository Details

Repository bregman-arie/devops-exercises · default branch master · size 8007 KB · watchers 1,328 · source: GitHub REST API and repository README

README

:information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE

:bar_chart:  There are currently 2624 exercises and questions

:warning:  You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read FAQ page for more details

:stop_sign:  If you are interested in pursuing a career as DevOps engineer, learning some of the concepts mentioned here would be useful, but you should know it's not about learning all the topics and technologies mentioned in this repository

:pencil:  You can add more exercises by submitting pull requests :) Read about contribution guidelines here

****

https://github.com/bregman-arie/devops-exercises/blob/HEAD/DevOps
DevOps
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Git
Git
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Network
Network
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Hardware
Hardware
https://github.com/bregman-arie/devops-exercises/blob/HEAD/kubernetes
Kubernetes
https://github.com/bregman-arie/devops-exercises/blob/HEAD/programming
Software Development
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Python
Python
https://github.com/bregman-arie/devops-exercises/blob/HEAD/go
Go
https://github.com/bregman-arie/devops-exercises/blob/HEAD/perl
Perl
https://github.com/bregman-arie/devops-exercises/blob/HEAD/RegEx
Regex
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Cloud
Cloud
https://github.com/bregman-arie/devops-exercises/blob/HEAD/aws
AWS
https://github.com/bregman-arie/devops-exercises/blob/HEAD/azure
Azure
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Google Cloud Platform
Google Cloud Platform
https://github.com/bregman-arie/devops-exercises/blob/HEAD/openstack
OpenStack
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Operating System
Operating System
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Linux
Linux
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Virtualization
Virtualization
https://github.com/bregman-arie/devops-exercises/blob/HEAD/DNS
DNS
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Bash
Shell Scripting
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Databases
Databases
https://github.com/bregman-arie/devops-exercises/blob/HEAD/sql
SQL
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Mongo
Mongo
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Testing
Testing
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Big Data
Big Data
https://github.com/bregman-arie/devops-exercises/blob/HEAD/cicd
CI/CD
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Certificates
Certificates
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Containers
Containers
https://github.com/bregman-arie/devops-exercises/blob/HEAD/OpenShift
OpenShift
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Storage
Storage
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Terraform
Terraform
https://github.com/bregman-arie/devops-exercises/blob/HEAD/puppet
Puppet
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Distributed
Distributed
https://github.com/bregman-arie/devops-exercises/blob/HEAD/you
Questions you can ask
https://github.com/bregman-arie/devops-exercises/blob/HEAD/ansible
Ansible
https://github.com/bregman-arie/devops-exercises/blob/HEAD/observability
Observability
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Prometheus
Prometheus
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Circle CI
Circle CI
https://github.com/bregman-arie/devops-exercises/blob/HEAD/DataDog
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Grafana
Grafana
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Argo
Argo
https://github.com/bregman-arie/devops-exercises/blob/HEAD/HR
Soft Skills
https://github.com/bregman-arie/devops-exercises/blob/HEAD/security
Security
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Design
System Design
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Chaos Engineering
Chaos Engineering
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Misc
Misc
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Elastic
Elastic
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Kafka
Kafka
https://github.com/bregman-arie/devops-exercises/blob/HEAD/NodeJs
NodeJs

DevOps Applications

https://github.com/bregman-arie/devops-exercises/blob/HEAD/KubePrep
KubePrep
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Linux Master
Linux Master
https://github.com/bregman-arie/devops-exercises/blob/HEAD/Sytem Design Hero
System Design Hero

Network

In general, what do you need in order to communicate?
  • A common language (for the two ends to understand)
  • A way to address who you want to communicate with
  • A Connection (so the content of the communication can reach the recipients)
What is TCP/IP?

A set of protocols that define how two or more devices can communicate with each other.

To learn more about TCP/IP, read here

What is Ethernet?

Ethernet simply refers to the most common type of Local Area Network (LAN) used today. A LAN—in contrast to a WAN (Wide Area Network), which spans a larger geographical area—is a connected network of computers in a small area, like your office, college campus, or even home.

What is a MAC address? What is it used for?

A MAC address is a unique identification number or code used to identify individual devices on the network.

Packets that are sent on the ethernet are always coming from a MAC address and sent to a MAC address. If a network adapter is receiving a packet, it is comparing the packet’s destination MAC address to the adapter’s own MAC address.

When is this MAC address used?: ff:ff:ff:ff:ff:ff

When a device sends a packet to the broadcast MAC address (FF:FF:FF:FF:FF:FF​), it is delivered to all stations on the local network. Ethernet broadcasts are used to resolve IP addresses to MAC addresses (by ARP) at the data link layer.

What is an IP address?

An Internet Protocol address (IP address) is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication.An IP address serves two main functions: host or network interface identification and location addressing.

Explain the subnet mask and give an example

A Subnet mask is a 32-bit number that masks an IP address and divides the IP addresses into network addresses and host addresses. Subnet Mask is made by setting network bits to all "1"s and setting host bits to all "0"s. Within a given network, out of the total usable host addresses, two are always reserved for specific purposes and cannot be allocated to any host. These are the first address, which is reserved as a network address (a.k.a network ID), and the last address used for network broadcast.

Example

What is a private IP address? In which scenarios/system designs, one should use it?
Private IP addresses are assigned to the hosts in the same network to communicate with one another. As the name "private" suggests, the devices having the private IP addresses assigned can't be reached by the devices from any external network. For example, if I am living in a hostel and I want my hostel mates to join the game server I have hosted, I will ask them to join via my server's private IP address, since the network is local to the hostel.
What is a public IP address? In which scenarios/system designs, one should use it?
A public IP address is a public-facing IP address. In the event that you were hosting a game server that you want your friends to join, you will give your friends your public IP address to allow their computers to identify and locate your network and server in order for the connection to take place. One time that you would not need to use a public-facing IP address is in the event that you were playing with friends who were connected to the same network as you, in that case, you would use a private IP address. In order for someone to be able to connect to your server that is located internally, you will have to set up a port forward to tell your router to allow traffic from the public domain into your network and vice versa.
Explain the OSI model. What layers there are? What each layer is responsible for?
  • Application: user end (HTTP is here)
  • Presentation: establishes context between application-layer entities (Encryption is here)
  • Session: establishes, manages, and terminates the connections
  • Transport: transfers variable-length data sequences from a source to a destination host (TCP & UDP are here)
  • Network: transfers datagrams from one network to another (IP is here)
  • Data link: provides a link between two directly connected nodes (MAC is here)
  • Physical: the electrical and physical spec of the data connection (Bits are here)
You can read more about the OSI model in penguintutor.com
For each of the following determines to which OSI layer it belongs:
  • Error correction
  • Packets routing
  • Cables and electrical signals
  • MAC address
  • IP address
  • Terminate connections
  • 3 way handshake

  • Error correction - Data link
  • Packets routing - Network
  • Cables and electrical signals - Physical
  • MAC address - Data link
  • IP address - Network
  • Terminate connections - Session
  • 3-way handshake - Transport
  • What delivery schemes are you familiar with?

    Unicast: One-to-one communication where there is one sender and one receiver.

    Broadcast: Sending a message to everyone in the network. The address ff:ff:ff:ff:ff:ff is used for broadcasting. Two common protocols which use broadcast are ARP and DHCP.

    Multicast: Sending a message to a group of subscribers. It can be one-to-many or many-to-many.

    What is CSMA/CD? Is it used in modern ethernet networks?

    CSMA/CD stands for Carrier Sense Multiple Access / Collision Detection. Its primary focus is to manage access to a shared medium/bus where only one host can transmit at a given point in time.

    CSMA/CD algorithm:

    1. Before sending a frame, it checks whether another host is already transmitting a frame. 2. If no one is transmitting, it starts transmitting the frame. 3. If two hosts transmit at the same time, we have a collision. 4. Both hosts stop sending the frame and they send everyone a 'jam signal' notifying everyone that a collision occurred 5. They are waiting for a random time before sending it again 6. Once each host waited for a random time, they try to send the frame again and so the cycle starts again

    Describe the following network devices and the difference between them:
    • router
    • switch
    • hub

    A router, switch, and hub are all network devices used to connect devices in a local area network (LAN). However, each device operates differently and has its specific use cases. Here is a brief description of each device and the differences between them:

    1. Router: a network device that connects multiple network segments together. It operates at the network layer (Layer 3) of the OSI model and uses routing protocols to direct data between networks. Routers use IP addresses to identify devices and route data packets to the correct destination. 2. Switch: a network device that connects multiple devices on a LAN. It operates at the data link layer (Layer 2) of the OSI model and uses MAC addresses to identify devices and direct data packets to the correct destination. Switches allow devices on the same network to communicate with each other more efficiently and can prevent data collisions that can occur when multiple devices send data simultaneously. 3. Hub: a network device that connects multiple devices through a single cable and is used to connect multiple devices without segmenting a network. However, unlike a switch, it operates at the physical layer (Layer 1) of the OSI model and simply broadcasts data packets to all devices connected to it, regardless of whether the device is the intended recipient or not. This means that data collisions can occur, and the network's efficiency can suffer as a result. Hubs are generally not used in modern network setups, as switches are more efficient and provide better network performance.

    What is a "Collision Domain"?
    A collision domain is a network segment in which devices can potentially interfere with each other by attempting to transmit data at the same time. When two devices transmit data at the same time, it can cause a collision, resulting in lost or corrupted data. In a collision domain, all devices share the same bandwidth, and any device can potentially interfere with the transmission of data by other devices.
    What is a "Broadcast Domain"?
    A broadcast domain is a network segment in which all devices can communicate with each other by sending broadcast messages. A broadcast message is a message that is sent to all devices in a network rather than a specific device. In a broadcast domain, all devices can receive and process broadcast messages, regardless of whether the message was intended for them or not.
    three computers connected to a switch. How many collision domains are there? How many broadcast domains?

    Three collision domains and one broadcast domain

    How does a router work?

    A router is a physical or virtual appliance that passes information between two or more packet-switched computer networks. A router inspects a given data packet's destination Internet Protocol address (IP address), calculates the best way for it to reach its destination, and then forwards it accordingly.

    What is NAT?

    Network Address Translation (NAT) is a process in which one or more local IP addresses are translated into one or more Global IP address and vice versa in order to provide Internet access to the local hosts.

    What is a proxy? How does it work? What do we need it for?

    A proxy server acts as a gateway between you and the internet. It’s an intermediary server separating end users from the websites they browse.

    If you’re using a proxy server, internet traffic flows through the proxy server on its way to the address you requested. The request then comes back through that same proxy server (there are exceptions to this rule), and then the proxy server forwards the data received from the website to you.

    Proxy servers provide varying levels of functionality, security, and privacy depending on your use case, needs, or company policy.

    What is TCP? How does it work? What is the 3-way handshake?

    TCP 3-way handshake or three-way handshake is a process that is used in a TCP/IP network to make a connection between server and client.

    A three-way handshake is primarily used to create a TCP socket connection. It works when:

    • A client node sends an SYN data packet over an IP network to a server on the same or an external network. The objective of this packet is to ask/infer if the server is open for new connections.
    • The target server must have open ports that can accept and initiate new connections. When the server receives the SYN packet from the client node, it responds and returns a confirmation receipt – the ACK packet or SYN/ACK packet.
    • The client node receives the SYN/ACK from the server and responds with an ACK packet.

    What is round-trip delay or round-trip time?

    From wikipedia: "the length of time it takes for a signal to be sent plus the length of time it takes for an acknowledgment of that signal to be received"

    Bonus question: what is the RTT of LAN?

    How does an SSL handshake work?
    SSL handshake is a process that establishes a secure connection between a client and a server.

    1. The client sends a Client Hello message to the server, which includes the client's version of the SSL/TLS protocol, a list of the cryptographic algorithms supported by the client, and a random value. 2. The server responds with a Server Hello message, which includes the server's version of the SSL/TLS protocol, a random value, and a session ID. 3. The server sends a Certificate message, which contains the server's certificate. 4. The server sends a Server Hello Done message, which indicates that the server is done sending messages for the Server Hello phase. 5. The client sends a Client Key Exchange message, which contains the client's public key. 6. The client sends a Change Cipher Spec message, which notifies the server that the client is about to send a message encrypted with the new cipher spec. 7. The client sends an Encrypted Handshake Message, which contains the pre-master secret encrypted with the server's public key. 8. The server sends a Change Cipher Spec message, which notifies the client that the server is about to send a message encrypted with the new cipher spec. 9. The server sends an Encrypted Handshake Message, which contains the pre-master secret encrypted with the client's public key. 10. The client and server can now exchange application data.

    What is the difference between TCP and UDP?

    TCP establishes a connection between the client and the server to guarantee the order of the packages, on the other hand, UDP does not establish a connection between the client and server and doesn't handle package orders. This makes UDP more lightweight than TCP and a perfect candidate for services like streaming.

    [Penguintutor.com](http://w

    GitHub Stars & Activity

    84,669Stars
    20,344Forks
    56Open issues
    PythonLanguage

    GitHub Popularity

    GitHub stars84,669
    Forks20,344
    Open issues56
    Primary languagePython
    LicenseNOASSERTION
    Stars gained today64
    Created2019-10-03
    Last pushed2025-12-27

    Trending History

    Daily boardrank #46 · ▲ 64 stars

    Related GitHub Projects

    More Trending Repositories