In order to understand how to eventually make a beowulf cluster, I tried, following this reading Building a simple Beowulf cluster with Ubuntu to link my PC with Ubuntu 18.04.01 Server Edition with my laptop where I installed a VMware version of the same Ubuntu 18.04.01 Server Edition.
This is the content of the file /etc/hosts in the VMware version of Ubuntu 18.04.01 in the laptop:
127.0.0.1 localhost
127.0.1.1 ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.1.3 pc01
And this is the content of the file /etc/hosts of Ubuntu 18.04.01 of PC:
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
192.168.229.128 laptop
fe00::0 ip6-localnet
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
192.168.1.3 pc01
172.17.0.1 pc01
172.18.0.1 pc01
172.20.0.1 pc01
172.19.0.1 pc01
172.21.0.1 pc01
Now... pinging from Ubuntu-laptop to Ubuntu-PC succeed 100%:
marco@ubuntu:~$ ping -c 3 pc01
PING pc01 (192.168.1.3) 56(84) bytes of data.
64 bytes from pc01 (192.168.1.3): icmp_seq=1 ttl=128 time=1.08 ms
64 bytes from pc01 (192.168.1.3): icmp_seq=2 ttl=128 time=2.42 ms
64 bytes from pc01 (192.168.1.3): icmp_seq=3 ttl=128 time=2.04 ms
--- pc01 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2017ms
rtt min/avg/max/mdev = 1.087/1.851/2.420/0.563 ms
marco@ubuntu:~$
While pinging from Ubuntu-PC to Ubuntu-laptop fails totally:
marco@pc01:~$ ping -c 3 laptop
PING laptop (192.168.229.128) 56(84) bytes of data.
--- laptop ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2040ms
What could be the cause? Looking forward to your kind help. Marco
Updates as rightly requested: 1) sudo iptables-save in laptop gives a "blank" output:
marco@ubuntu:~$ sudo iptables-save
marco@ubuntu:~$
2) output of ip a in the laptop:
marco@ubuntu:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state
UP group default qlen 1000
link/ether 00:0c:29:b0:ad:7b brd ff:ff:ff:ff:ff:ff
inet 192.168.229.128/24 brd 192.168.229.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:feb0:ad7b/64 scope link
valid_lft forever preferred_lft forever
3) : after enabling the first option "Bridged: Connected directly to the physical network, should I enable also the sub-option "Replicate physical network connection state"?
Three Important Updates: 1) According to this online document : VMwareWorkstation9DocumentationCenter the option "Replicate physical network connection state" should be enabled in order to let the IP Address to be renewed when moving from one wired or wireless network to another. So, I did two trials, enabling this option. But something strange happened: the virtual machine opened successfully with my username and my password. But I couldn't access it through the usual ssh connection because my password was not recognized. After disabling the option "Bridged: Connected directly to the physical connection", while enabling the option "NAT: used to share the host's IP address", my password was recognized by the SSH connection as well...
2) I discovered through ifconfig | grep inet that, after enabling the option "Bridged: Connected directly to the physical network" and the sub-option "Replicate physical network connection state" , the inet becomes 127.0.0.1 Then, in the /etc/hosts of my PC I updated the IP address of laptop to 127.0.0.1
marco@pc01:~$ ping -c 3 laptop
PING laptop (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64
time=0.046 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64
time=0.025 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64
time=0.042 ms
--- laptop ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2053ms
rtt min/avg/max/mdev = 0.025/0.037/0.046/0.011 ms
But still my password is not recognized when trying to access the VMware Virtual Machine'Ubuntu through SSH connection...
3) I tried also the unable another option in VMware Settings: VirtualMachineSettings02: "Host-only: A private network shared with the host" With this option enabled, like with the option "NAT:Used to share the host's IP address", I can connect to the Ubuntu's virtual machine through SSH connection, because in this case the password is recognized. But, after updating the IP address in PC's /etc/hosts the ping to laptop fails totally again:
marco@pc01:~$ ping -c 3 laptop
PING laptop (192.168.30.128) 56(84) bytes of data.
--- laptop ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2055ms
Looking forward to your kind help. Marco
and
gives us a good hint: the two machines are in different subnets. This was specifically the reason I asked you not to redact IP's: they give us information.
The network interface card (NIC) on the laptop is probably set to NAT mode in your vmware settings. This means that vmware performs masquerade of all traffic coming from the virtual machine to your other network devices.
Change the settings in virtual network configuration to bridge mode, and make sure the laptop has an IP in the same subnet (e.g. 192.168.1.x) as the server you're trying to access it from.
This Q&A at superuser.com gives a bit more information about the different NIC modes of VMWare Workstation.