How to Configure Cluster VM Network Settings on Linux: Step-by-Step Guide
This guide walks you through editing the network interface file on a master node, replicating the settings on slave nodes, and verifying connectivity with ping commands, providing a complete step-by-step process to configure a clustered virtual machine network on Linux.
Virtual machine network configuration tutorial.
1. Modify network configuration file
Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and set device parameters such as IP address, gateway, netmask, DNS, and other options.
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=noApply the same steps to each slave node, only changing the 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=no2. Test network connectivity
Ping each server to verify the network is reachable.
[root@master ~]# ping master
[root@master ~]# ping -c 3 slave1
[root@master ~]# ping -c 3 slave2
[root@master ~]# ping -c 3 slave3
[root@master ~]# ping -c 3 slave4After completing these steps, the cluster VM network configuration is finished.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
