IP, MAC, and Machine ID Allocation Manual

Network and Machine Configuration Guide

Overview

This document provides a detailed guide for configuring network and machine parameters, including XML editing for libvirt, managing VM disk formats, and establishing a systematic approach to assigning machine UUIDs, MAC addresses, and other related configurations. It also outlines the structure for assigning unique identifiers to servers and VMs based on their roles and environments.


File Types and Their Usage

  1. XML File: Used for importing the image into libvirt.
  2. qcow2 File: QEMU copy-on-write file format, compatible exclusively with other KVM hosts.

Signatures to Update

  1. Machine UUID: Unique identifier for the virtual machine.
  2. SSH Host Keys: Regenerate to ensure secure SSH communication.
  3. Hostname: Update to reflect the role or purpose of the VM.

XML Editing and VM Preparation

  1. Extract XML of Guest: Export the XML configuration of the existing VM.
  2. Modify XML: Change the MAC address and update the UUID to a new unique value.
  3. Prepare Disk Image: Use the .qcow2 disk from a system-prepared VM and delete all previous signatures (e.g., SSH keys, hostname, file system UUID).
  4. Apply Changes: Edit the XML to reflect the updated MAC and UUID, and define the modified XML file on the prepared disk image.
  5. Undefine and Redefine VM: Undefine the previous VM configuration and define the new configuration using the modified XML.
  6. Start the VM: Boot the new VM and verify functionality.

MAC Addressing Scheme

Octet-3: Role or Environment

Code Description
e0 Development
e1 Staging
e2 DevOps
e3 Load Balancer (local domains)
e4 Monitor
e5 Webxi
e6 MySQL Backup
e7 Miscellaneous

Octet-4: Interface ID

It is based on the KVM bridge on the bare metal server. If the bridge name is virbr20 this octet will be 20.

Bridge Name Code Description
Virbr20 20 Prmary Interface(Bridged)
Virho10 10 Host-only Interface
Virbr30 30 Prmary Interface(Bridged)

Octet-5 & Octet-6: Sequence Number

Octet Description
00 Default sequence
01, 02… Specific project/environment sequence

Complete MAC Address Formats

Staging Changes:

Octet Description Example Value
Octet-3 Staging environment e1
Octet-4 Primary interface 20
Octet-5&6 Sequence number specific to the project 00, 01, 02
Format Complete MAC Address Format 0a:01:e1:20:00:00

Syntax

Octet Field Description
Octet 1 data-center-id Identifier for the data center
Octet 2 Bare metal server number Unique machine number
Octet 3 Environment-number Environment code (e.g., e1 for staging)
Octet 4 interface-number Interface ID (e.g., 20 for primary interface)
Octet 5 & 6 sequence-1 & 2 Sequential numbers for project or environment

Example:

  • MAC Address: 0a:01:e1:20:00:01
  • Machine ID: 00000000-0000-0000-0000-0a01e1200001

DevOps Configuration Examples

Role MAC Address Description
DevOps Server 0a:01:e2:20:00:01 Bridge MAC: 0a:01:e2:20:00:01 Host-only MAC: 0a:01:e2:10:00:01
MySQL Backup 0a:01:e6:20:00:01 Look at the octets
Miscellaneous Server 0a:01:e7:30:00:01 Look at the octets

Determining Machine UUID of a VM

The machine UUID is derived by removing the colons (:) from the primary interface’s MAC address of the VM and appending it to the UUID base 00000000-0000-0000-0000-.

Example:

Primary MAC Address: 0a:01:e1:20:00:01

Machine UUID: 00000000-0000-0000-0000-0a01e1200001

By adhering to these guidelines and the outlined structure, you can maintain a standardized and conflict-free environment for managing VMs and their network configurations.

Guidelines for Network and Machine ID Configuration

  1. Use distinct MAC addresses for each VM to avoid network conflicts.
  2. Ensure UUIDs are unique across the environment.
  3. Define naming conventions for VMs and interfaces to facilitate easy identification.
  4. Validate changes post-deployment to ensure proper functionality and network connectivity.

By adhering to these guidelines and the outlined structure, you can maintain a standardized and conflict-free environment for managing VMs and their network configurations.

Deciding on Interface MAC, Machine UUID, and IP Address Reservation for Specific Purposes

After determining the interface MAC address and machine UUID for various environments, it is crucial to understand the reserved IP addresses for specific purposes. The following steps guide you in identifying and managing IP addresses in your infrastructure:

  1. Access Reserved IP Address Information:

    • For local administrative servers and project-specific development server details (e.g., pssb staging, msgcloud staging), refer to the spreadsheet provided in the link below:
      • Local Admin servers(staging server for all projects) and Project-wise Development Servers Details Link
  2. Review IP Addresses Reserved for Employees:

    • The IP address reservations for each employee, including for VPN, development servers, and their laptops, can be found in the following spreadsheet: IP Address Reservation for Employees
  3. Understanding the IP Range:

    • In the provided link, the reserved IP addresses fall within specific ranges designated for particular purposes such as VPN, development servers, laptops, etc.
    • These IP ranges are mapped out to ensure proper allocation of resources and easy identification of devices within the network.
  4. Check for Specific Sequences:

    • Within the reserved range, there are specific IP sequences allocated to particular devices (e.g., laptops, VPN servers). It is essential to check this sequence to ensure there are no conflicts or misallocations.

By referring to the above resources, you can efficiently manage and allocate IP addresses based on specific usage requirements and avoid conflicts in your network infrastructure.