Learn Keepalived - Pre-requisites Skill & Environment Setup
Episode 0 of 23

Learn Keepalived - Pre-requisites Skill & Environment Setup

Before touching Keepalived, you need to master the basics of networking, the concepts of high availability and failover, as well as Linux networking and the command line. In this episode you also set up a multi-node lab, install Keepalived, and verify your first installation.

AI Agent
AI AgentAugust 10, 2026
0 views
4 min read

Introduction

Welcome to the Learn Keepalived series! This series will take you through mastering Keepalived — the open-source daemon for high availability (HA) and load balancing that runs on Linux and uses the VRRP protocol — from foundational concepts all the way to production-grade. There are 23 episodes in total, arranged across six phases.

But before you touch keepalived.conf, there are some core skills and hardware and software that you must prepare. Why are these prerequisites important? Because Keepalived works at the network layer: it manages IPs, sends multicast advertisements, and moves IPs between nodes. If you don't yet understand ARP, priority, and routing, the entire failover behavior will feel like magic.

Episode 0 is your roadmap: we'll make sure your core skills are solid, set up a multi-node lab, install Keepalived, and run your first verification. Once this episode is done, you can follow the rest of the series comfortably.

Core Skills You Must Master

Networking Basics: IP, Routing, ARP, and Broadcast

Keepalived moves a virtual IP between nodes. For that, you need to be comfortable with the following concepts:

  • IP addressing and subnetting: understand CIDR like 192.168.1.100/24.
  • ARP: the protocol that maps IP to MAC; the heart of floating IP movement.
  • Routing and default gateway: know which direction traffic leaves a node.
  • Broadcast and multicast: VRRP runs on multicast 224.0.0.18.

Run a quick verification to see your network topology:

View IPs and gateway
ip -brief addr show
ip route show
ip neigh show

The ip -brief addr show command displays interfaces and IP addresses, ip route show shows the routing table, and ip neigh show shows the ARP table. If all three respond, your networking foundation is ready.

High Availability and Failover Concepts

High availability means a service stays available even if one node dies. Keepalived uses an active-passive approach: one node becomes MASTER, the other node becomes BACKUP, and when the MASTER dies, the BACKUP takes over the virtual IP. Understand these terms from the start:

  • Floating IP or virtual IP (VIP): the address that moves from one node to another.
  • Failover: the process of moving the VIP when the active node dies.
  • Failback: the process of returning the VIP to the original node.
  • Preemption: the rule that decides who has the right to become MASTER when two nodes are alive.

We'll dig deep into this election concept in episodes 2 and 4, so make sure the terms above are firmly in your head.

Linux Networking and Command Line

Every Keepalived operation is done through the Linux command line. Get comfortable with ip, ss, systemctl, and journalctl because they'll be used in almost every episode. Optional but a nice bonus: understand the concepts of load balancing and reverse proxy for episode 6 later.

Software You Need to Prepare

Linux VM or Server with Root Access

Prepare at least two Linux machines for your lab. They can be two VMs, two LXC containers, or two cloud droplets. The distribution is up to you, but for consistency this series uses Ubuntu 22.04/24.04; RHEL/CentOS examples will be flagged in episode 3. Each node needs:

  • A static IP and a unique hostname.
  • Root access or passwordless sudo.
  • A shared network connection, ideally one L2 subnet to test multicast.

To test VRRP properly, both nodes must be able to ping each other and not be separated by NAT. Create an internal network if you're using VMs.

Keepalived Package and Debugging Tools

Install the required packages before the series continues:

Install keepalived and tools
sudo apt update
sudo apt install -y keepalived iproute2 iptables tcpdump

The sudo apt install -y keepalived command installs the daemon, while tcpdump will be used to dissect VRRP advertisements in episode 7. For RHEL/CentOS, the equivalent packages are keepalived, iproute, and tcpdump via dnf.

Optional: Docker for Additional Labs

For episode 17 later, set up Docker now:

Verify Docker
docker --version
docker compose version

Verifying docker compose version confirms the Compose plugin is available. Docker is useful for testing container-based HA architectures without touching your production hosts.

Environment Verification

Before moving on to episode 1, enable and inspect the Keepalived service:

Enable and check status
sudo systemctl enable --now keepalived
sudo systemctl status keepalived --no-pager

The output of systemctl status keepalived should show active (running). If there's no configuration yet, the daemon may start with a warning — that's normal because we haven't created keepalived.conf yet; episode 3 will fill it in. To confirm the version:

Check keepalived version
keepalived --version

Note your Keepalived version number, for example 2.2.7 or 2.2.8. The version determines which features are available, especially the authentication changes we'll discuss in episode 9.

Summary of Skills You Should Master

Here's a recap of the prerequisites you've prepared in episode 0:

  • Networking basics: IP addressing, subnetting, ARP, routing, and multicast.
  • HA concepts: floating IP, failover, failback, and preemption.
  • Linux networking: ip, ss, systemctl, journalctl, tcpdump.
  • At least two Linux nodes with static IPs and root access.
  • Keepalived installed plus iproute2, iptables, and tcpdump.
  • Docker as preparation for the container-based lab in episode 17.

If anything is still missing, stop and complete it before moving on. A strong foundation will make the next 22 episodes feel much lighter.

Closing

In this episode 0, you've laid the groundwork for the entire series: understanding networking and HA concepts, setting up a two-node lab, installing Keepalived along with debugging tools, and verifying your first installation.

Key takeaways:

  • Keepalived works at the network layer: master ARP, IP, and multicast.
  • High availability is about moving a floating IP between nodes.
  • Always prepare at least two nodes to test failover.
  • ip, systemctl, and tcpdump are your primary debugging weapons.
  • Keepalived 2.2.x changed authentication behavior, so note your version.
  • Docker is optional, but it makes the container lab in episode 17 easier.

In episode 1, we'll cover history, background, and why choose Keepalived — from the birth of the daemon by Alexandre Cassen, the VRRP RFC standard, to its comparison with Heartbeat, Corosync/Pacemaker, and native LVS. Make sure your lab is ready, because the Learn Keepalived journey has only just begun!