Operations 4 min read

Step-by-Step Guide to Configuring VM Network for a Cluster

This tutorial walks you through editing the network interface files on a master and its slave nodes, setting static IPs, gateways, and DNS, then verifies connectivity with ping commands, completing the virtual machine cluster network configuration.

Python Crawling & Data Mining
Python Crawling & Data Mining
Python Crawling & Data Mining
Step-by-Step Guide to Configuring VM Network for a Cluster

Step 1: Modify Network Configuration File

Open the network interface file on the master node: vi /etc/sysconfig/network-scripts/ifcfg-eth0 Set the following parameters (replace IP‑related values for each node):

DEVICE=eth0
HWADDR=00:0C:29:33:85:27
TYPE=Ethernet
UUID=0099dc9f-a67a-4af5-a2c2-0b96e95ffe5d
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=202.118.86.11
NETMASK=255.255.255.224
GATEWAY=202.118.86.1
DNS1=8.8.8.8
DNS2=8.8.4.4
IPV6INIT=no

Image of the master configuration:

Master network configuration
Master network configuration

On each slave node (example slave1) use a similar file with its own MAC address and IP address:

DEVICE=eth0
HWADDR=00:0C:29:2E:73:5E
TYPE=Ethernet
UUID=6488cec5-24fe-487e-b2f6-83e1de889292
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=202.118.86.12
NETMASK=255.255.255.224
GATEWAY=202.118.86.1
DNS1=8.8.8.8
DNS2=8.8.4.4
IPV6INIT=no

Image of the slave configuration:

Slave network configuration
Slave network configuration

Other nodes follow the same pattern, only the IP address changes.

Step 2: Test Connectivity

Ping each host to verify the network is reachable:

ping master
ping -c 3 slave1
ping -c 3 slave2
ping -c 3 slave3
ping -c 3 slave4

Screenshot of ping results:

Ping test results
Ping test results

After completing these steps, the cluster virtual machines have their network configured and are ready for further operations.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

pingLinuxVM network
Python Crawling & Data Mining
Written by

Python Crawling & Data Mining

Life's short, I code in Python. This channel shares Python web crawling, data mining, analysis, processing, visualization, automated testing, DevOps, big data, AI, cloud computing, machine learning tools, resources, news, technical articles, tutorial videos and learning materials. Join us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.