Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

On 2 CentOS VMware machines, how can I get 1 machine to recognize the IP of the other machine?

$
0
0

I'm trying to set up a cluster of 2, 3 or 4 CentOS VMware machines so that they can communicate with each other; the main idea is that I should be able to ping one machine's IP address from the other. (I am running them in VMware Workstation.)

 

For example, if I call one machine "red" and the second one "blue", I log in as "root" on the "red" machine and edit /etc/hosts as follows:

 

127.0.0.1 localhost (this line is already in there)

::1 localhost (this is already there too)

198.168.81.128 red

198.168.81.129 blue

 

I then log in as "root" on the "blue" machine and add the same lines to its /etc/hosts file.  I also go to /etc/sysconfig and edit the 'network' file to include 'hostname=red' (on the "red" machine) and 'hostname=blue' (of course on the "blue" machine).

 

However, when I run "ping red" (on "red"), it doesn't come back with anything; same thing if I run "ping blue" (on the "red" machine).  So I ran "ifconfig" and see that the output for the "eth0" port includes the IP (inet) of 192.168.81.128.  So I guess that's what I should put in /etc/hosts.

 

I also tried to bind IPs to each machine by creating multiple ifcfg-eth0:X files (e.g. ifcfg-eth0:0, ifcfg-eth0:1, etc.) in the /etc/sysconfig/network-scripts directory on "red"; then I copied the "red" VMware CentOS machine to three other machines (so that they'd have the same files). But when I go into "blue" and try to ping "red", it says it's unreachable. Even pinging itself ("ping blue") is unreachable. (Remember, it has the same /etc/hosts file as "red".)  I think one illustration of the problem is that I run "ifconfig | more" on the "blue" machine and it just comes back with what looks like a MAC address for port "eth0", not an IP.  This is because I only see HWaddr on the first line and inet6 address on the second line of the eth0 output (whereas the same output on the "red" machine has a specific line of "inet addr: 192.168.81.128 Bcast: 192.168.81.255 [etc.]).  You can see the steps I followed at:

 

http://www.xenocafe.com/tutorials/linux/redhat/bind_multiple_ip_addresses_to_single_nic/index.php

 

Any help would be appreciated. Thanks!


Viewing all articles
Browse latest Browse all 176483

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>